Fawkes API  Fawkes Development Version
fawkes::OpenRaveConnector Class Reference

Interface for a OpenRave connection creator. More...

#include <>>

Inheritance diagram for fawkes::OpenRaveConnector:

List of all members.

Public Member Functions

virtual ~OpenRaveConnector ()
 Virtual empty destructor.
virtual void start_viewer () const =0
 Start OpenRave viewer.
virtual void run_planner (OpenRaveRobot *robot=NULL, float sampling=0.01f)=0
 Run planner on previously set target.
virtual void run_graspplanning (const std::string &target_name, OpenRaveRobot *robot=NULL)=0
 Run graspplanning script for a given target.
virtual OpenRaveEnvironmentget_environment () const =0
 Get pointer to OpenRaveEnvironment object.
virtual OpenRaveRobotget_active_robot () const =0
 Get pointer to currently used OpenRaveRobot object.
virtual void set_active_robot (OpenRaveRobot *robot)=0
 Set robot to be used.
virtual OpenRaveRobotadd_robot (const std::string &filename_robot, bool autogenerate_IK)=0
 Add a new robot to the environment, and set it as the currently active one.
virtual void set_manipulator (OpenRaveRobot *robot, OpenRaveManipulator *manip, float trans_x=0.f, float trans_y=0.f, float trans_z=0.f, bool calibrate=0)=0
 Set OpenRaveManipulator object for robot, and calculate coordinate-system offsets or set them directly.
virtual void set_manipulator (OpenRaveManipulator *manip, float trans_x=0.f, float trans_y=0.f, float trans_z=0.f, bool calibrate=0)=0
 Set OpenRaveManipulator object for robot, and calculate coordinate-system offsets or set them directly.
virtual bool add_object (const std::string &name, const std::string &filename)=0
 Add an object to the environment.
virtual bool delete_object (const std::string &name)=0
 Remove object from environment.
virtual bool rename_object (const std::string &name, const std::string &new_name)=0
 Rename object.
virtual bool move_object (const std::string &name, float trans_x, float trans_y, float trans_z, OpenRaveRobot *robot=NULL)=0
 Move object in the environment.
virtual bool rotate_object (const std::string &name, float quat_x, float quat_y, float quat_z, float quat_w)=0
 Rotate object by a quaternion.
virtual bool rotate_object (const std::string &name, float rot_x, float rot_y, float rot_z)=0
 Rotate object along its axis.
virtual bool attach_object (const std::string &name, OpenRaveRobot *robot=NULL)=0
 Attach a kinbody to the robot.
virtual bool release_object (const std::string &name, OpenRaveRobot *robot=NULL)=0
 Release a kinbody from the robot.
virtual bool release_all_objects (OpenRaveRobot *robot)=0
 Release all grabbed kinbodys from the robot.
virtual bool set_target_object (const std::string &name, OpenRaveRobot *robot, float rot_x=0)=0
 Set an object as the target.

Detailed Description

Interface for a OpenRave connection creator.

Author:
Bahram Maleki-Fard

Definition at line 36 of file openrave_connector.h.


Constructor & Destructor Documentation

virtual fawkes::OpenRaveConnector::~OpenRaveConnector ( ) [inline, virtual]

Virtual empty destructor.

Definition at line 46 of file openrave_connector.h.


Member Function Documentation

virtual bool fawkes::OpenRaveConnector::add_object ( const std::string name,
const std::string filename 
) [pure virtual]

Add an object to the environment.

Parameters:
namename that should be given to that object
filenamepath to xml file of that object (KinBody)
Returns:
true if successful

Implemented in OpenRaveThread.

virtual OpenRaveRobot* fawkes::OpenRaveConnector::add_robot ( const std::string filename_robot,
bool  autogenerate_IK 
) [pure virtual]

Add a new robot to the environment, and set it as the currently active one.

Parameters:
filename_robotpath to robot's xml file
autogenerate_IKif true: autogenerate IKfast IK solver for robot
Returns:
pointer to new OpenRaveRobot object

Implemented in OpenRaveThread.

virtual bool fawkes::OpenRaveConnector::attach_object ( const std::string name,
OpenRaveRobot robot = NULL 
) [pure virtual]

Attach a kinbody to the robot.

Parameters:
namename of the object
robotpointer to OpenRaveRobot that the target is set for
Returns:
true if successful

Implemented in OpenRaveThread.

virtual bool fawkes::OpenRaveConnector::delete_object ( const std::string name) [pure virtual]

Remove object from environment.

Parameters:
namename of the object
Returns:
true if successful

Implemented in OpenRaveThread.

virtual OpenRaveRobot* fawkes::OpenRaveConnector::get_active_robot ( ) const [pure virtual]

Get pointer to currently used OpenRaveRobot object.

Returns:
pointer

Implemented in OpenRaveThread.

virtual OpenRaveEnvironment* fawkes::OpenRaveConnector::get_environment ( ) const [pure virtual]

Get pointer to OpenRaveEnvironment object.

Returns:
pointer

Implemented in OpenRaveThread.

virtual bool fawkes::OpenRaveConnector::move_object ( const std::string name,
float  trans_x,
float  trans_y,
float  trans_z,
OpenRaveRobot robot = NULL 
) [pure virtual]

Move object in the environment.

Distances are given in meters

Parameters:
namename of the object
trans_xtransition along x-axis
trans_ytransition along y-axis
trans_ztransition along z-axis
robotif given, move relatively to robot (in most simple cases robot is at position (0,0,0) anyway, so this has no effect)
Returns:
true if successful

Implemented in OpenRaveThread.

virtual bool fawkes::OpenRaveConnector::release_all_objects ( OpenRaveRobot robot) [pure virtual]

Release all grabbed kinbodys from the robot.

Parameters:
robotpointer to OpenRaveRobot that objects are released from
Returns:
true if successful

Implemented in OpenRaveThread.

virtual bool fawkes::OpenRaveConnector::release_object ( const std::string name,
OpenRaveRobot robot = NULL 
) [pure virtual]

Release a kinbody from the robot.

Parameters:
namename of the object
robotpointer to OpenRaveRobot that object is released from
Returns:
true if successful

Implemented in OpenRaveThread.

virtual bool fawkes::OpenRaveConnector::rename_object ( const std::string name,
const std::string new_name 
) [pure virtual]

Rename object.

Parameters:
namecurrent name of the object
new_namenew name of the object
Returns:
true if successful

Implemented in OpenRaveThread.

virtual bool fawkes::OpenRaveConnector::rotate_object ( const std::string name,
float  quat_x,
float  quat_y,
float  quat_z,
float  quat_w 
) [pure virtual]

Rotate object by a quaternion.

Parameters:
namename of the object
quat_xx value of quaternion
quat_yy value of quaternion
quat_zz value of quaternion
quat_ww value of quaternion
Returns:
true if successful

Implemented in OpenRaveThread.

virtual bool fawkes::OpenRaveConnector::rotate_object ( const std::string name,
float  rot_x,
float  rot_y,
float  rot_z 
) [pure virtual]

Rotate object along its axis.

Rotation angles should be given in radians.

Parameters:
namename of the object
rot_x1st rotation, along x-axis
rot_y2nd rotation, along y-axis
rot_z3rd rotation, along z-axis
Returns:
true if successful

Implemented in OpenRaveThread.

virtual void fawkes::OpenRaveConnector::run_graspplanning ( const std::string target_name,
OpenRaveRobot robot = NULL 
) [pure virtual]

Run graspplanning script for a given target.

Parameters:
target_namename of targeted object (KinBody)
robotrobot to use planner on. If none is given, the currently used robot is taken

Implemented in OpenRaveThread.

virtual void fawkes::OpenRaveConnector::run_planner ( OpenRaveRobot robot = NULL,
float  sampling = 0.01f 
) [pure virtual]

Run planner on previously set target.

Parameters:
robotrobot to use planner on. If none is given, the currently used robot is taken
samplingsampling time between each trajectory point (in seconds)

Implemented in OpenRaveThread.

virtual void fawkes::OpenRaveConnector::set_active_robot ( OpenRaveRobot robot) [pure virtual]

Set robot to be used.

Parameters:
robotOpenRaveRobot that should be used implicitly in other methods

Implemented in OpenRaveThread.

virtual void fawkes::OpenRaveConnector::set_manipulator ( OpenRaveRobot robot,
OpenRaveManipulator manip,
float  trans_x = 0.f,
float  trans_y = 0.f,
float  trans_z = 0.f,
bool  calibrate = 0 
) [pure virtual]

Set OpenRaveManipulator object for robot, and calculate coordinate-system offsets or set them directly.

Make sure to update manip angles before calibrating!

Parameters:
robotpointer to OpenRaveRobot object, explicitly set
manippointer to OpenRAVManipulator that is set for robot
trans_xtransition offset on x-axis
trans_ytransition offset on y-axis
trans_ztransition offset on z-axis
calibratedecides whether to calculate offset (true )or set them directly (false; default)

Implemented in OpenRaveThread.

virtual void fawkes::OpenRaveConnector::set_manipulator ( OpenRaveManipulator manip,
float  trans_x = 0.f,
float  trans_y = 0.f,
float  trans_z = 0.f,
bool  calibrate = 0 
) [pure virtual]

Set OpenRaveManipulator object for robot, and calculate coordinate-system offsets or set them directly.

Make sure to update manip angles before calibrating! Uses default OpenRaveRobot object.

Parameters:
manippointer to OpenRAVManipulator that is set for robot
trans_xtransition offset on x-axis
trans_ytransition offset on y-axis
trans_ztransition offset on z-axis
calibratedecides whether to calculate offset (true )or set them directly (false; default)

Implemented in OpenRaveThread.

virtual bool fawkes::OpenRaveConnector::set_target_object ( const std::string name,
OpenRaveRobot robot,
float  rot_x = 0 
) [pure virtual]

Set an object as the target.

Currently the object should be cylindric, and stand upright. It may also be rotated on its x-axis, but that rotation needs to be given in an argument to calculate correct position for endeffecto. This is only temporary until proper graps planning for 5DOF in OpenRave is provided.

Parameters:
namename of the object
robotpointer to OpenRaveRobot that the target is set for
rot_xrotation of object on x-axis (radians)
Returns:
true if IK solvable

Implemented in OpenRaveThread.

virtual void fawkes::OpenRaveConnector::start_viewer ( ) const [pure virtual]

Start OpenRave viewer.

Implemented in OpenRaveThread.


The documentation for this class was generated from the following file: