23 #include "message_handler_thread.h" 25 #include <interfaces/OpenRaveInterface.h> 39 :
Thread(
"OpenRaveMessageHandlerThread",
Thread::OPMODE_WAITFORWAKEUP),
41 __or_thread( or_thread ),
83 __if_openrave->
write();
114 bool success =
false;
140 msg->
name(), msg->
x(), msg->
y(), msg->
z());
147 logger->
log_debug(
name(),
"RotateObjectQuatMessage received: name=%s, x=%f, y=%f, z=%f, w=%f",
148 msg->
name(), msg->
x(), msg->
y(), msg->
z(), msg->
w());
156 msg->
name(), msg->
x(), msg->
y(), msg->
z());
175 __if_openrave->
write();
RotateObjectQuatMessage Fawkes BlackBoard Interface Message.
float z() const
Get z value.
char * path() const
Get path value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
unsigned int id() const
Get message ID.
bool msgq_empty()
Check if queue is empty.
float z() const
Get z value.
void set_success(const bool new_success)
Set success value.
char * name() const
Get name value.
ReleaseAllObjectsMessage Fawkes BlackBoard Interface Message.
Fawkes library namespace.
void set_final(const bool new_final)
Set final value.
virtual bool attach_object(const char *name, fawkes::OpenRaveRobotPtr &robot, const char *manip_name=NULL)
Attach a kinbody to the robot.
char * name() const
Get name value.
virtual const char * what() const
Get primary string.
Thread class encapsulation of pthreads.
void write()
Write from local copy into BlackBoard memory.
float y() const
Get y value.
virtual bool delete_all_objects()
Remove all objects from environment.
virtual ~OpenRaveMessageHandlerThread()
Destructor.
Logger * logger
This is the Logger member used to access the logger.
float x() const
Get x value.
virtual bool release_object(const std::string &name, fawkes::OpenRaveRobotPtr &robot)
Release a kinbody from the robot.
RotateObjectMessage Fawkes BlackBoard Interface Message.
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.
float y() const
Get y value.
Thread aspect to use blocked timing.
virtual bool delete_object(const std::string &name)
Remove object from environment.
StartViewerMessage Fawkes BlackBoard Interface Message.
void msgq_pop()
Erase first message from queue.
void set_msgid(const uint32_t new_msgid)
Set msgid value.
Base class for exceptions in Fawkes.
AttachObjectMessage Fawkes BlackBoard Interface Message.
Message * msgq_first()
Get the first message from the message queue.
char * name() const
Get name value.
float x() const
Get x value.
char * name() const
Get name value.
virtual void loop()
Code to execute in the thread.
virtual void finalize()
Finalize the thread.
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.
DeleteAllObjectsMessage Fawkes BlackBoard Interface Message.
const char * name() const
Get name of thread.
bool msgq_first_is()
Check if first message has desired type.
virtual void log_warn(const char *component, const char *format,...)=0
Log warning message.
ReleaseObjectMessage Fawkes BlackBoard Interface Message.
char * name() const
Get name value.
float z() const
Get z value.
virtual bool release_all_objects(fawkes::OpenRaveRobotPtr &robot)
Release all grabbed kinbodys from the robot.
float w() const
Get w value.
RenameObjectMessage Fawkes BlackBoard Interface Message.
virtual void log_debug(const char *component, const char *format,...)=0
Log debug message.
float x() const
Get x value.
virtual void init()
Initialize the thread.
char * name() const
Get name value.
virtual void start_viewer() const
Start Viewer.
virtual bool rename_object(const std::string &name, const std::string &new_name)
Rename object.
char * manip_name() const
Get manip_name value.
char * newName() const
Get newName value.
DeleteObjectMessage Fawkes BlackBoard Interface Message.
char * name() const
Get name value.
float y() const
Get y value.
OpenRaveMessageHandlerThread(OpenRaveThread *or_thread)
Constructor.
virtual Interface * open_for_writing(const char *interface_type, const char *identifier, const char *owner=NULL)=0
Open interface for writing.
virtual bool add_object(const std::string &name, const std::string &filename)
Add an object to the environment.
MoveObjectMessage Fawkes BlackBoard Interface Message.
char * name() const
Get name value.
OpenRaveInterface Fawkes BlackBoard Interface.
BlackBoard * blackboard
This is the BlackBoard instance you can use to interact with the BlackBoard.
virtual void close(Interface *interface)=0
Close interface.
AddObjectMessage Fawkes BlackBoard Interface Message.