Fawkes API
Fawkes Development Version
|
23 #include "message_handler_thread.h"
25 #include <interfaces/OpenRaveInterface.h>
39 :
Thread(
"OpenRaveMessageHandlerThread",
Thread::OPMODE_WAITFORWAKEUP),
41 or_thread_(or_thread),
79 if_openrave_->
write();
90 "AddObject message received: name=%s, path=%s",
116 "AttachObjectMessage received: name=%s, manip_name=%s",
119 bool success =
false;
147 "MoveObjectMessage received: name=%s, x=%f, y=%f, z=%f",
160 "RotateObjectQuatMessage received: name=%s, x=%f, y=%f, z=%f, w=%f",
174 "RotateObjectMessage received: name=%s, x=%f, y=%f, z=%f",
187 "RenameObjectMessage received: name=%s, new_name=%s",
202 if_openrave_->
write();
bool msgq_first_is()
Check if first message has desired type.
float z() const
Get z value.
void msgq_pop()
Erase first message from queue.
bool msgq_empty()
Check if queue is empty.
char * name() const
Get name value.
char * name() const
Get name value.
char * name() const
Get name value.
char * path() const
Get path value.
char * name() const
Get name value.
virtual bool delete_all_objects()
Remove all objects from environment.
void set_msgid(const uint32_t new_msgid)
Set msgid value.
OpenRaveMessageHandlerThread(OpenRaveThread *or_thread)
Constructor.
char * name() const
Get name value.
virtual void loop()
Code to execute in the thread.
float y() const
Get y value.
char * name() const
Get name value.
virtual bool attach_object(const char *name, fawkes::OpenRaveRobotPtr &robot, const char *manip_name=NULL)
Attach a kinbody to the robot.
float x() const
Get x value.
const char * name() const
char * newName() const
Get newName value.
char * name() const
Get name value.
virtual void init()
Initialize the thread.
virtual bool move_object(const std::string &name, float trans_x, float trans_y, float trans_z, fawkes::OpenRaveRobotPtr &robot)
Move object in the environment, relatively to robot.
virtual void close(Interface *interface)=0
float x() const
Get x value.
virtual void log_warn(const char *component, const char *format,...)=0
float y() const
Get y value.
float z() const
Get z value.
char * manip_name() const
Get manip_name value.
virtual bool release_all_objects(fawkes::OpenRaveRobotPtr &robot)
Release all grabbed kinbodys from the robot.
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.
char * name() const
Get name value.
virtual bool rename_object(const std::string &name, const std::string &new_name)
Rename object.
virtual const char * what() const
Get primary string.
float w() const
Get w value.
float x() const
Get x value.
unsigned int id() const
Get message ID.
void set_success(const bool new_success)
Set success value.
virtual void finalize()
Finalize the thread.
Message * msgq_first()
Get the first message from the message queue.
virtual bool add_object(const std::string &name, const std::string &filename)
Add an object to the environment.
virtual void log_debug(const char *component, const char *format,...)=0
void write()
Write from local copy into BlackBoard memory.
virtual Interface * open_for_writing(const char *interface_type, const char *identifier, const char *owner=NULL)=0
virtual void start_viewer() const
Start Viewer.
virtual bool delete_object(const std::string &name)
Remove object from environment.
float z() const
Get z value.
virtual bool release_object(const std::string &name, fawkes::OpenRaveRobotPtr &robot)
Release a kinbody from the robot.
float y() const
Get y value.
void set_final(const bool new_final)
Set final value.
virtual ~OpenRaveMessageHandlerThread()
Destructor.