23 #ifndef __PLUGINS_OPENRAVE_OPENRAVE_THREAD_H_
24 #define __PLUGINS_OPENRAVE_OPENRAVE_THREAD_H_
26 #include <plugins/openrave/aspect/openrave_connector.h>
27 #include <plugins/openrave/aspect/openrave_inifin.h>
29 #include <core/threading/thread.h>
30 #include <aspect/blocked_timing.h>
31 #include <aspect/logging.h>
32 #include <aspect/configurable.h>
33 #include <aspect/aspect_provider.h>
36 class OpenRaveEnvironment;
38 class OpenRaveManipulator;
71 virtual bool add_object(
const std::string&
name,
const std::string& filename);
73 virtual bool rename_object(
const std::string& name,
const std::string& new_name);
75 virtual bool rotate_object(
const std::string& name,
float quat_x,
float quat_y,
float quat_z,
float quat_w);
76 virtual bool rotate_object(
const std::string& name,
float rot_x,
float rot_y,
float rot_z);
84 protected:
virtual void run() { Thread::run(); }
OpenRaveThread()
Constructor.
virtual void set_active_robot(fawkes::OpenRaveRobot *robot)
Set robot to be used.
virtual bool attach_object(const std::string &name, fawkes::OpenRaveRobot *robot=NULL)
Attach a kinbody to the robot.
virtual void init()
Initialize the thread.
virtual bool set_target_object(const std::string &name, fawkes::OpenRaveRobot *robot, float rot_x=0)
Set an object as the target.
virtual void run_graspplanning(const std::string &target_name, fawkes::OpenRaveRobot *robot=NULL)
Run graspplanning script for a given target.
Thread class encapsulation of pthreads.
virtual bool move_object(const std::string &name, float trans_x, float trans_y, float trans_z, fawkes::OpenRaveRobot *robot=NULL)
Move object in the environment.
virtual void finalize()
Finalize the thread.
virtual ~OpenRaveThread()
Destructor.
virtual fawkes::OpenRaveEnvironment * get_environment() const
Get pointer to OpenRaveEnvironment object.
Thread aspect to use blocked timing.
virtual bool delete_object(const std::string &name)
Remove object from environment.
virtual fawkes::OpenRaveRobot * add_robot(const std::string &filename_robot, bool autogenerate_IK)
Add a new robot to the environment, and set it as the currently active one.
OpenRaveAspect initializer/finalizer.
OpenRaveEnvironment class.
virtual fawkes::OpenRaveRobot * get_active_robot() const
Get pointer to currently used OpenRaveRobot object.
virtual void set_manipulator(fawkes::OpenRaveManipulator *manip, float trans_x=0.f, float trans_y=0.f, float trans_z=0.f, bool calibrate=0)
Set OpenRaveManipulator object for robot, and calculate coordinate-system offsets or set them directl...
virtual bool rotate_object(const std::string &name, float quat_x, float quat_y, float quat_z, float quat_w)
Rotate object by a quaternion.
virtual bool release_object(const std::string &name, fawkes::OpenRaveRobot *robot=NULL)
Release a kinbody from the robot.
Thread aspect to log output.
Class containing information about all manipulator motors.
const char * name() const
Get name of thread.
Thread aspect provide a new aspect.
Thread aspect to access configuration data.
virtual void run()
Stub to see name in backtrace for easier debugging.
Interface for a OpenRave connection creator.
virtual void start_viewer() const
Start Viewer.
virtual void loop()
Code to execute in the thread.
virtual bool rename_object(const std::string &name, const std::string &new_name)
Rename object.
virtual void run_planner(fawkes::OpenRaveRobot *=NULL, float sampling=0.01f)
Run planner on previously set target.
virtual bool add_object(const std::string &name, const std::string &filename)
Add an object to the environment.
virtual bool release_all_objects(fawkes::OpenRaveRobot *robot=NULL)
Release all grabbed kinbodys from the robot.