graphical-interface.idl
Go to the documentation of this file.
1 // file graphicalinterface.idl
2 module gepetto {
4  exception Error
5  {
6  string msg;
7  };
8 
9 module corbaserver {
10 
11 // Comments :
12 // 1) Node names are parsed, so if you call a node "node1/xxx", this node will
13 // be automatically added as a child of node1
14 // 2) Functions return False if an error occured (in that case, check the
15 // SceneViewer-corbaserver window for more information)
16 // 3) applyConfiguration doesn't move object straigh forward, you need to used
17 // the "refresh" function each time you want actualize position of the Viewer.
18 // This system is used to synchronize movement of all objects.
19 
20 typedef float Transform [7];
21 typedef float Vector2 [2];
22 typedef float Position [3];
23 typedef float Color [4];
24 typedef string WindowID;
25 typedef sequence <string> Names_t;
26 typedef sequence<float> floatSeq;
27 typedef sequence<Position> PositionSeq;
28 typedef sequence<Color> ColorSeq;
29 typedef sequence<Transform> TransformSeq;
30 
31  interface NodeCallback {
32  void selected (in string name, in Position positionInWorldFrame, in Position normalInLocalFrame) raises (Error);
33  };
34 
44  interface GraphicalInterface {
45 
49 
53  WindowID createWindow(in string name) raises (Error);
54 
57  WindowID getWindowID (in string name) raises (Error);
58 
62  boolean setBackgroundColor1(in WindowID wid,in Color RGBAcolor);
63 
67  boolean setBackgroundColor2(in WindowID wid,in Color RGBAcolor);
68 
71  void createScene(in string sceneName) raises (Error);
72 
75  void createSceneWithFloor(in string sceneName) raises (Error);
76 
81  boolean addSceneToWindow(in string sceneName, in WindowID wid) raises (Error);
82 
84 
88 
91  boolean addFloor(in string floorName) raises (Error);
92 
99  boolean addBox(in string boxName, in float boxSize1, in float boxSize2, in float boxSize3, in Color RGBAcolor) raises (Error);
100 
106  boolean addCapsule(in string name, in float radius, in float height, in Color RGBAcolor) raises (Error);
107 
108 
114  boolean addArrow(in string name, in float radius, in float length, in Color RGBAcolor) raises (Error);
115 
116  boolean addRod(in string rodName, in Color RGBAcolor, in float radius, in float totalLength,in short maxCapsule) raises (Error);
117 
121  boolean resizeCapsule(in string capsuleName,in float height) raises (Error);
122 
123  boolean resizeArrow(in string capsuleName,in float radius, in float length) raises (Error);
124 
128  boolean addMesh(in string meshName, in string meshPath) raises (Error);
129 
132  void removeLightSources(in string meshName) raises (Error);
133 
135  boolean addCone(in string name, in float radius, in float height, in Color RGBAcolor) raises (Error);
136 
138  boolean addCylinder(in string cylinderName, in float radius, in float height, in Color RGBAcolor) raises (Error);
139 
141  boolean addSphere(in string sphereName, in float radius, in Color RGBAcolor) raises (Error);
142 
148  boolean addLight(in string lightName, in WindowID wid, in float radius, in Color RGBAcolor) raises (Error);
149 
155  boolean addLine(in string lineName, in Position pos1, in Position pos2, in Color RGBAcolor) raises (Error);
156 
160  boolean setLineStartPoint(in string lineName, in Position pos1) raises (Error);
161 
165  boolean setLineEndPoint(in string lineName, in Position pos2) raises (Error);
166 
171  boolean setLineExtremalPoints(in string lineName, in Position pos1, in Position pos2) raises (Error);
172 
178  boolean addCurve(in string name, in PositionSeq pos, in Color RGBAcolor) raises (Error);
179 
183  boolean setCurvePoints(in string name, in PositionSeq pos) raises (Error);
184 
188  boolean setCurveColors(in string name, in ColorSeq pos) raises (Error);
189 
193  boolean setCurveMode (in string name, in string mode) raises (Error);
194 
195  boolean setCurvePointsSubset (in string curveName, in long first, in long count) raises (Error);
196 
197  boolean setCurveLineWidth (in string curveName, in float width) raises (Error);
198 
203  boolean addSquareFace(in string faceName, in Position pos1, in Position pos2, in Position pos3, in Position pos4, in Color RGBAcolor) raises (Error);
204 
209  boolean setTexture (in string nodeName, in string filename) raises (Error);
210 
215  boolean addTriangleFace(in string faceName, in Position pos1, in Position pos2, in Position pos3, in Color RGBAcolor) raises (Error);
216 
217 
218  // Add a sphere with xyz axis
219  // The colors are x=red, y=green, z=blue (xyz=RGB)
220  // \param nodeName : name of the node
221  // \param RGBAcolor : color of the sphere
222  // \param radius : radius of the sphere
223  // \param sizeAxis : size of the axis
224  boolean addXYZaxis(in string nodeName, in Color RGBAcolor,in float radius,in float sizeAxis) raises(Error);
225 
226  // Add an empty roadmap to the scene
227  // \param nameCorba : name of the roadmap
228  // \param RGBAcolorNode : color of the sphere
229  // \param radius : radius of the sphere
230  // \param sizeAxis :size of the axis (proportionnaly to the sphere radius, size axis = 1 -> axis are radius*4 in length and radius/4 in radius)
231  // \param RGBAcolorEdge : color of the edges
232  boolean createRoadmap(in string nameCorba,in Color RGBAcolorNode, in float radius, in float sizeAxis, in Color RGBAcolorEdge) raises(Error);
233 
234  // Add an edge to the roadmap
235  // \param nameRoadmap : name of the roadmap
236  // \param posFrom : position of the beginning of the edge
237  // \param posTo : position of the end of the edge (not oriented edge, order doesn't matter)
238  boolean addEdgeToRoadmap(in string nameRoadmap, in Position posFrom, in Position posTo)raises(Error);
239 
240  // Add a node to the roadmap
241  // \param nameRoadmap : name of the roadmap
242  // \param configuration : configuration of the node
243  boolean addNodeToRoadmap(in string nameRoadmap, in Transform configuration)raises(Error);
244 
253  boolean addURDF (in string robotName, in string urdfFilePath)
254  raises (Error);
255 
267  boolean addUrdfCollision (in string robotName, in string urdfFilePath)
268  raises (Error);
269 
281  void addUrdfObjects (in string nodeName, in string urdfFilePath,
282  in boolean visual)
283  raises (Error);
284 
287  boolean createGroup(in string groupName) raises (Error);
288 
290 
294 
297  boolean nodeExists(in string nodeName) raises (Error);
298 
302  void deleteNode (in string nodeName, in boolean all) raises (Error);
303 
305  Names_t getNodeList() raises (Error);
306 
309  Names_t getGroupNodeList(in string group) raises (Error);
310 
312  Names_t getSceneList() raises (Error);
313 
315  Names_t getWindowList() raises (Error);
316 
320  boolean addToGroup(in string nodeName, in string groupName) raises (Error);
321 
325  boolean removeFromGroup(in string nodeName, in string groupName) raises (Error);
326 
328 
332 
336  boolean applyConfiguration(in string nodeName, in Transform configuration) raises (Error);
337 
340  boolean applyConfigurations(in Names_t nodeName, in TransformSeq configuration) raises (Error);
341 
343  void refresh() raises (Error);
344 
348  void setRefreshIsSynchronous (in boolean synchonous) raises (Error);
349 
353  Transform getNodeGlobalTransform(in string nodeName) raises (Error);
354 
356 
360 
365  boolean addLandmark(in string nodeName, in float size) raises (Error);
366 
369  boolean deleteLandmark(in string nodeName) raises (Error);
370 
373  Transform getStaticTransform(in string nodeName) raises (Error);
374 
378  boolean setStaticTransform(in string nodeName, in Transform configuration) raises (Error);
379 
383  boolean setVisibility(in string nodeName, in string visibilityMode) raises (Error);
384 
388  boolean setScale(in string nodeName, in Position scale) raises (Error);
389 
393  boolean setColor(in string nodeName, in Color scale) raises (Error);
394 
398  boolean setWireFrameMode(in string nodeName, in string wireFrameMode) raises (Error);
399 
403  boolean setLightingMode(in string nodeName, in string lightingMode) raises (Error);
404 
408  boolean setHighlight (in string nodeName, in long state) raises (Error);
409 
410  Names_t getPropertyNames(in string nodeName) raises (Error);
411  Names_t getPropertyTypes(in string nodeName) raises (Error);
412 
413  void setStringProperty(in string nodeName, in string propName, in string value) raises (Error);
414  string getStringProperty(in string nodeName, in string propName) raises (Error);
415 
416  void setColorProperty(in string nodeName, in string propName, in Color value) raises (Error);
417  Color getColorProperty(in string nodeName, in string propName) raises (Error);
418 
419  void setVector3Property(in string nodeName, in string propName, in Position value) raises (Error);
420  Position getVector3Property(in string nodeName, in string propName) raises (Error);
421 
422  void setVector2Property(in string nodeName, in string propName, in Vector2 value) raises (Error);
423  Position getVector2Property(in string nodeName, in string propName) raises (Error);
424 
425  void setFloatProperty(in string nodeName, in string propName, in float value) raises (Error);
426  float getFloatProperty(in string nodeName, in string propName) raises (Error);
427 
428  void setBoolProperty(in string nodeName, in string propName, in boolean value) raises (Error);
429  boolean getBoolProperty(in string nodeName, in string propName) raises (Error);
430 
431  void setIntProperty(in string nodeName, in string propName, in long value) raises (Error);
432  long getIntProperty(in string nodeName, in string propName) raises (Error);
433 
434  void callVoidProperty(in string nodeName, in string propName) raises (Error);
436 
441 
442  void captureFrame (in WindowID wid, in string imageFilename) raises (Error);
443 
457  boolean startCapture (in WindowID wid, in string filename,
458  in string extension) raises (Error);
459 
461  boolean stopCapture (in WindowID wid) raises (Error);
462 
467  boolean setCaptureTransform (in string filename, in Names_t nodeNames)
468  raises (Error);
469 
471  void captureTransformOnRefresh (in boolean autoCapture) raises (Error);
472 
474  void captureTransform () raises (Error);
475 
480  boolean writeBlenderScript (in string filename, in Names_t nodeNames) raises (Error);
481 
483  boolean writeNodeFile (in string nodeName, in string filename) raises (Error);
484 
486  boolean writeWindowFile (in WindowID wid, in string filename) raises (Error);
487 
489 
493 
499  boolean attachCameraToNode(in string nodeName, in WindowID wid) raises (Error);
500 
504  boolean detachCamera(in WindowID wid) raises (Error);
505 
511  Transform getCameraTransform(in WindowID wid) raises (Error);
512 
519  boolean setCameraTransform(in WindowID wid, in Transform configuration) raises (Error);
520 
521  // register a Node callback
522  boolean registerNodeCallback (in NodeCallback cb) raises (Error);
523 
525  };
526 };
527 };
Definition: graphical-interface.idl:44
float Position[3]
Definition: graphical-interface.idl:22
sequence< Transform > TransformSeq
Definition: graphical-interface.idl:29
void refresh()
Definition: api.hh:18
float Transform[7]
Definition: graphical-interface.idl:20
Helper class.
Definition: __init__.py:8
float Vector2[2]
Definition: graphical-interface.idl:21
sequence< string > Names_t
Definition: graphical-interface.idl:25
sequence< Position > PositionSeq
Definition: graphical-interface.idl:27
Corba exception travelling through the Corba channel.
Definition: graphical-interface.idl:4
string WindowID
Definition: graphical-interface.idl:24
Definition: graphical-interface.idl:31
sequence< Color > ColorSeq
Definition: graphical-interface.idl:28
string msg
Definition: graphical-interface.idl:6
sequence< float > floatSeq
Sequence of names.
Definition: graphical-interface.idl:26