iCub-main

A gui that shows the full state of the robot. More...

+ 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.

icubgui-merged.jpg
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.addDouble(dimX);
obj.addDouble(dimY);
obj.addDouble(dimZ);
// object position in millimiters
// reference frame: X=fwd, Y=left, Z=up
obj.addDouble(posX);
obj.addDouble(posY);
obj.addDouble(posZ);
// object orientation (roll, pitch, yaw) in degrees
obj.addDouble(rotX);
obj.addDouble(rotY);
obj.addDouble(rotZ);
// object color (0-255)
obj.addInt(R);
obj.addInt(G);
obj.addInt(B);
// transparency (0.0=invisible 1.0=solid)
obj.addDouble(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.