Skip to content
Snippets Groups Projects
Commit 7608280f authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

Catch server exceptions and throw them to client via corba.

parent 7692199a
No related branches found
No related tags found
No related merge requests found
// file graphicalinterface.idl
module gepetto {
/// Corba exception travelling through the Corba channel
exception Error
{
string msg;
};
module corbaserver {
// Comments :
......@@ -9,7 +15,7 @@ module corbaserver {
// SceneViewer-corbaserver window for more information)
// 3) applyConfiguration doesn't move object straigh forward, you need to used
// the "refresh" function each time you want actualize position of the Viewer.
// This system is used to synchronize movement of all objects.
// This system is used to synchronize movement of all objects.
typedef double Transform [7];
typedef double Position [3];
......@@ -20,39 +26,36 @@ typedef double Color [4];
/// Set time between window frames
/// \param input rate : waiting time (ms) between two frames.
boolean setRate(in long rate);
boolean setRate(in long rate) raises (Error);
/// Change configurations according to the last applyConfigurations.d
void refresh();
void refresh() raises (Error);
/// Create a new window.
/// \param input name : name of the new window.
boolean createWindow(in string name);
boolean createWindow(in string name) raises (Error);
/// Print names of nodes on the SceneViewer-corbaserver terminal.
void getNodeList();
void getNodeList() raises (Error);
/// Print names of windows on the SceneViewer-corbaserver terminal.
void getWindowList();
//void createWindow(in string name, in unsigned long x, in unsigned long y, in unsigned long width, in unsigned long height) ;
void getWindowList() raises (Error);
/// Create a group node.
/// \param input sceneName : name of the group.
boolean createScene(in string sceneName) ;
boolean createScene(in string sceneName) raises (Error);
/// Create a group node and a GroudNode ("sceneName/floor") as child
/// \param input sceneName : name of the group
boolean createSceneWithFloor(in string sceneName) ;
boolean createSceneWithFloor(in string sceneName) raises (Error);
/// Add groupNode sceneName to the WindowManager windowName so
/// sceneName and all its children will be displayed in the window windowName.
/// \param input sceneName : name of the groupNode.
/// \param input windowName : name of rhe window.
boolean addSceneToWindow(in string sceneName, in string windowName) ;
boolean addSceneToWindow(in string sceneName, in string windowName) raises (Error);
/// create a box called boxName.
/// \param input boxName : name of the box.
......@@ -60,112 +63,103 @@ typedef double Color [4];
/// \param input boxSize2 : lenght of the box (y axis).
/// \param input boxSize3 : lenght of the box (z axis).
/// \param input RGBAcolor : Color of the box.
boolean addBox(in string boxName, in float boxSize1, in float boxSize2, in float boxSize3, in Color RGBAcolor) ;
//boolean addBox(in string boxName, in float boxSize1, in float boxSize2, in float boxSize3) ;
//boolean addCapsule(in string capsuleName, in float radius, in float height) ;
boolean addBox(in string boxName, in float boxSize1, in float boxSize2, in float boxSize3, in Color RGBAcolor) raises (Error);
/// create a box called CapsuleName.
/// \param input CapsuleName : name of the capsule.
/// \param input radius : radius of the capsule.
/// \param input height : lenght of the segment that generates the capsule.
/// \param input RGBAcolor : Color of the capsule.
boolean addCapsule(in string capsuleName, in float radius, in float height, in Color RGBAcolorid) ;
boolean addCapsule(in string capsuleName, in float radius, in float height, in Color RGBAcolorid) raises (Error);
/// create a node to display a mesh (works for .dae, .obj and some other formats)
/// \param input meshName : name of the new meshNode.
/// \param input meshPath : full path to the mesh file.
boolean addMesh(in string meshName, in string meshPath) ;
//boolean addCone(in string coneName, in float radius, in float height) ;
boolean addMesh(in string meshName, in string meshPath) raises (Error);
/// create a node to display a mesh (works for .dae, .obj and some other formats)
/// \param input meshName : name of the new meshNode.
/// \param input meshPath : full path to the mesh file.
boolean addCone(in string coneName, in float radius, in float height, in Color RGBAcolor) ;
//boolean addCylinder(in string cylinderName, in float radius, in float height) ;
boolean addCone(in string coneName, in float radius, in float height, in Color RGBAcolor) raises (Error);
/// create a Cyllinder called cylinderName
/// \param input cylinderName : name of the cylinder.
/// \param input radius : radius of the cylinder.
/// \param input height : lenght of the cylinder.
/// \param input RGBAcolor : color of the cylinder.
boolean addCylinder(in string cylinderName, in float radius, in float height, in Color RGBAcolor) ;
//boolean addSphere(in string sphereName, in float radius) ;
boolean addCylinder(in string cylinderName, in float radius, in float height, in Color RGBAcolor) raises (Error);
/// create a sphere called sphereName
/// \param input sphereName : name of the sphere.
/// \param input radius : radius of the sphere.
/// \param input RGBAcolor : color of the sphere.
boolean addSphere(in string sphereName, in float radius, in Color RGBAcolor) ;
boolean addSphere(in string sphereName, in float radius, in Color RGBAcolor) raises (Error);
/// create a line called lineName.
/// \param input lineName : name of the line.
/// \param input pos1 : position one extremity of the line.
/// \param input pos2 : position the other extremity of the line.
/// \param input RGBAcolor : color of the line.
boolean addLine(in string lineName, in Position pos1, in Position pos2, in Color RGBAcolor) ;
boolean addLine(in string lineName, in Position pos1, in Position pos2, in Color RGBAcolor) raises (Error);
/// create a four vertices face called faceName.
/// \param input faceName : name of the face.
/// \param input pos1, pos2, pos3, pos4 : position of the vertices.
/// \param input RGBAcolor : color of the face.
boolean addSquareFace(in string faceName, in Position pos1, in Position pos2, in Position pos3, in Position pos4, in Color RGBAcolor) ;
boolean addSquareFace(in string faceName, in Position pos1, in Position pos2, in Position pos3, in Position pos4, in Color RGBAcolor) raises (Error);
/// create a three vertices face called faceName.
/// \param input faceName : name of the face.
/// \param input pos1, pos2, pos3 : position of the vertices.
/// \param input RGBAcolor : color of the face.
boolean addTriangleFace(in string faceName, in Position pos1, in Position pos2, in Position pos3, in Color RGBAcolor) ;
boolean addTriangleFace(in string faceName, in Position pos1, in Position pos2, in Position pos3, in Color RGBAcolor) raises (Error);
/// parse an URDF model
/// a groupNode will be created and each link will be child node of this node.
/// Links will be named "urdfName/linkName", linkName is the name of the link in the URDF file.
/// \param input urdfName : name of the groupNode that will be created.
/// Links will be named "prefix/linkName", linkName is the name of the link
/// in the URDF file.
/// \param input prefix: name of the groupNode that will be created.
/// \param input urdfPath : full path to the URDF file.
/// \param input urddfPackage : path of the package to the package folder of the robot (this path should finish by "/").
boolean addURDF(in string urdfName, in string urdfPath, in string urdfPackage) ;
/// \param input urdfPackage : path of the package to the package folder of the robot (this path should finish by "/").
boolean addURDF(in string prefix, in string urdfPath, in string urdfPackage) raises (Error);
/// create a groupNode called groupName
/// \param input groupName : name of the group.
boolean createGroup(in string groupName) ;
boolean createGroup(in string groupName) raises (Error);
/// set a node as child to a group node.
/// \param input nodeName : name of the child node.
/// \param input groupName : name of the mother node (=group node).
boolean addToGroup(in string nodeName, in string groupName) ;
/// \param input groupName : name of the mother node (=group node).
boolean addToGroup(in string nodeName, in string groupName) raises (Error);
/// Set a new configuration to a node. THIS CONFIGURATION WILL AFFECTIVE ONLY AFTER CALLING REFRESH FUNCTION!!!
/// \param input nodeName : name of the node.
/// \param input configuration : Double[7] new configuration.
boolean applyConfiguration(in string nodeName, in Transform configuration) ;
boolean applyConfiguration(in string nodeName, in Transform configuration) raises (Error);
/// Add Landmark at the center of a node (x=blue, y=green, z=red).
/// \param input nodeName : name of the node
/// \param input size : lenght of axises.
boolean addLandmark(in string nodeName, in float size) ;
boolean addLandmark(in string nodeName, in float size) raises (Error);
/// delete Landmark of a node.
/// \param input nodeName : name of the node
boolean deleteLandmark(in string nodeName) ;
boolean deleteLandmark(in string nodeName) raises (Error);
/// Change the visibility of a node. If this node is a group node, visibility mode will be apply to all children.
/// \param input nodeName : name of the node.
/// \param input visibilityMode : visibility mode can be "ON", "OFF" or "ALWAYS_ON_TOP".
boolean setVisibility(in string nodeName, in string visibilityMode) ;
boolean setVisibility(in string nodeName, in string visibilityMode) raises (Error);
/// Change wireframe mode of a node. If this node is a group node, wireframe mode will be apply to all children.
/// \param input nodeName : name of the node.
/// \param input wireframeMode : wiredframe mode can be "FILL", "WIREFRAME" or "FILL_AND_WIREFRAME".
boolean setWireFrameMode(in string nodeName, in string wireFrameMode) ;
boolean setWireFrameMode(in string nodeName, in string wireFrameMode) raises (Error);
/// Change lighting mode of a node. If this node is a group node, lighting mode will be apply to all children.
/// \param input nodeName : name of the node.
/// \param input lightingMode : lighting mode can be "ON" or "OFF".
boolean setLightingMode(in string nodeName, in string lightingMode) ;
boolean setLightingMode(in string nodeName, in string lightingMode) raises (Error);
};
};
};
This diff is collapsed.
......@@ -46,6 +46,7 @@ class GraphicalInterface :
public virtual POA_gepetto::corbaserver::GraphicalInterface
{
private:
typedef gepetto::Error Error;
std::map<std::string, WindowManagerPtr_t> windowManagers_;
std::map<std::string, NodePtr_t> nodes_;
std::map<std::string, GroupNodePtr_t> groupNodes_;
......@@ -75,55 +76,49 @@ public:
*/
GraphicalInterface (corbaServer::Server* server);
virtual void getNodeList();
virtual void getWindowList();
virtual void getNodeList() throw (Error);
virtual void getWindowList() throw (Error);
virtual bool setRate(CORBA::Long rate);
virtual void refresh();
virtual bool setRate(CORBA::Long rate) throw (Error);
virtual void refresh() throw (Error);
virtual bool createWindow(const char* windowNameCorba);
//virtual void createWindow(const char* name, CORBA::ULong x, CORBA::ULong y, CORBA::ULong width, CORBA::ULong height) ;
virtual bool createWindow(const char* windowNameCorba) throw (Error);
virtual bool createScene(const char* sceneNameCorba) ;
virtual bool createSceneWithFloor(const char* sceneNameCorba) ;
virtual bool addSceneToWindow(const char* sceneNameCorba, const char* windowNameCorba) ;
virtual bool createScene(const char* sceneNameCorba) throw (Error);
virtual bool createSceneWithFloor(const char* sceneNameCorba) throw (Error);
virtual bool addSceneToWindow(const char* sceneNameCorba, const char* windowNameCorba) throw (Error);
virtual bool addBox(const char* boxName, float boxSize1, float boxSize2, float boxSize3, const double* color);
//virtual bool addBox(const char* boxNameCorba, float boxSize1, float boxSize2, float boxSize3) ;
virtual bool addBox(const char* boxName, float boxSize1, float boxSize2, float boxSize3, const double* color) throw (Error);
//virtual bool addCapsule(const char* capsuleNameCorba, float radius, float height) ;
virtual bool addCapsule(const char* capsuleName, float radius, float height, const double* color);
virtual bool addCapsule(const char* capsuleName, float radius, float height, const double* color) throw (Error);
virtual bool addMesh(const char* meshNameCorba, const char* meshPathCorba) ;
virtual bool addMesh(const char* meshNameCorba, const char* meshPathCorba) throw (Error);
//virtual bool addCone(const char* coneNameCorba, float radius, float height) ;
virtual bool addCone(const char* coneName, float radius, float height, const double* color);
virtual bool addCone(const char* coneName, float radius, float height, const double* color) throw (Error);
//virtual bool addCylinder(const char* cylinderNameCorba, float radius, float height) ;
virtual bool addCylinder(const char* cylinderName, float radius, float height, const double* color);
virtual bool addCylinder(const char* cylinderName, float radius, float height, const double* color) throw (Error);
//virtual bool addSphere(const char* sphereNameCorba, float radius) ;
virtual bool addSphere(const char* sphereName, float radius, const double* color);
virtual bool addSphere(const char* sphereName, float radius, const double* color) throw (Error);
virtual bool addLine(const char* lineName, const double* pos1, const double* pos2, const double* color);
virtual bool addLine(const char* lineName, const double* pos1, const double* pos2, const double* color) throw (Error);
virtual bool addSquareFace(const char* faceName, const double* pos1, const double* pos2, const double* pos3, const double* pos4, const double* color);
virtual bool addTriangleFace(const char* faceName, const double* pos1, const double* pos2, const double* pos3, const double* color);
virtual bool addSquareFace(const char* faceName, const double* pos1, const double* pos2, const double* pos3, const double* pos4, const double* color) throw (Error);
virtual bool addTriangleFace(const char* faceName, const double* pos1, const double* pos2, const double* pos3, const double* color) throw (Error);
virtual bool addURDF(const char* urdfNameCorba, const char* urdfPathCorba, const char* urdfPackagePathCorba);
virtual bool addURDF(const char* urdfNameCorba, const char* urdfPathCorba, const char* urdfPackagePathCorba) throw (Error);
virtual bool createGroup(const char* groupNameCorba) ;
virtual bool addToGroup(const char* nodeNameCorba, const char* groupNameCorba) ;
virtual bool createGroup(const char* groupNameCorba) throw (Error);
virtual bool addToGroup(const char* nodeNameCorba, const char* groupNameCorba) throw (Error);
virtual bool applyConfiguration(const char* nodeNameCorba, const double* configuration) ;
virtual bool applyConfiguration(const char* nodeNameCorba, const double* configuration) throw (Error);
virtual bool addLandmark(const char* nodeNameCorba, float size);
virtual bool deleteLandmark(const char* nodeNameCorba);
virtual bool addLandmark(const char* nodeNameCorba, float size) throw (Error);
virtual bool deleteLandmark(const char* nodeNameCorba) throw (Error);
virtual bool setVisibility(const char* nodeNameCorba, const char* visibilityModeCorba) ;
virtual bool setWireFrameMode(const char* nodeNameCorba, const char* wireFrameModeCorba) ;
virtual bool setLightingMode(const char* nodeNameCorba, const char* lightingModeCorba) ;
virtual bool setVisibility(const char* nodeNameCorba, const char* visibilityModeCorba) throw (Error);
virtual bool setWireFrameMode(const char* nodeNameCorba, const char* wireFrameModeCorba) throw (Error);
virtual bool setLightingMode(const char* nodeNameCorba, const char* lightingModeCorba) throw (Error);
}; // end of class
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment