iCub-main
Loading...
Searching...
No Matches

A gui that shows the full state of the robot.

+ Collaboration diagram for iCubGui:

A gui that shows the full state of the robot.

At the moment encoders and inertial sensors.

Description

Display a kinematic model of the robot from the encoders. It also shows a representation of the output of the inertial sensor.

Screenshots: iCubGui running on Linux

Vision objects

iCubGui can also display data blobs from vision modules, representing them as 3D ellipsoids characterized by name, dimensions, color, transparency, position and orientation. Objects in iCubGui are managed by a port specified in the iCubGui.ini configuration file with the tag objport, as follows:

robot /icubSim
geometry skeleton.ini
objport /iCubGui/objects

To add an object to the display object list, send to iCubGui a bottle composed as following on the port specified in iCubGui.ini:

yarp::os::Bottle obj;
obj.addString("object"); // command to add/update an object
obj.addString("my_object_name");
// object dimensions in millimiters
// (it will be displayed as an ellipsoid with the tag "my_object_name")
obj.addFloat64(dimX);
obj.addFloat64(dimY);
obj.addFloat64(dimZ);
// object position in millimiters
// reference frame: X=fwd, Y=left, Z=up
obj.addFloat64(posX);
obj.addFloat64(posY);
obj.addFloat64(posZ);
// object orientation (roll, pitch, yaw) in degrees
obj.addFloat64(rotX);
obj.addFloat64(rotY);
obj.addFloat64(rotZ);
// object color (0-255)
obj.addInt32(R);
obj.addInt32(G);
obj.addInt32(B);
// transparency (0.0=invisible 1.0=solid)
obj.addFloat64(alpha);

To delete an object:

yarp::os::Bottle obj;
obj.addString("delete");
obj.addString("my_object_name");

To reset the object list:

yarp::os::Bottle obj;
obj.addString("reset");

Libraries

Parameters

None.

Ports Accessed

Needs access to all the robot interfaces and ports (from iCubInterface).

Tested OS

Linux and Windows.

Author
Alessandro Scalzo

Copyright (C) 2009 RobotCub Consortium

CopyPolicy: Released under the terms of the GNU GPL v2.0.

This file can be edited at src/gui/iCubGui/src/main.cpp.