#include <dummy_pomdp.h>
Public Member Functions | |
DummyPomdp () | |
constructor | |
void | mainLoop (void) |
main node thread | |
Private Member Functions | |
bool | execution_flow_controlCallback (std_srvs::Empty::Request &req, std_srvs::Empty::Response &res) |
Private Attributes | |
bool | execution_flag |
ros::ServiceServer | execution_flow_control_server |
CMutex | execution_mutex |
ros::Publisher | focused_obj_label_publisher |
ros::NodeHandle | node_handle_ |
std_msgs::Int32 | ObjLabel_msg |
ros::ServiceClient | obs_client |
iri_wam_common_msgs::obs_request | obs_request_srv |
ros::ServiceClient | wam_action_client |
iri_wam_common_msgs::wamaction | wam_actions_client_srv |
Definition at line 22 of file dummy_pomdp.h.
constructor
This constructor mainly creates and initializes the WamActions topics through the given NodeHandle object. CIriNode attributes may be also modified to suit node specifications.
All kind of ROS topics (publishers, subscribers, servers or clients) can be easyly generated with the scripts in the iri_ros_scripts package. Refer to ROS and IRI Wiki pages for more details:
http://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber(c++) http://www.ros.org/wiki/ROS/Tutorials/WritingServiceClient(c++) http://wikiri.upc.es/index.php/Robotics_Lab
nh | a reference to the node handle object to manage all ROS topics. |
Definition at line 3 of file dummy_pomdp.cpp.
bool DummyPomdp::execution_flow_controlCallback | ( | std_srvs::Empty::Request & | req, |
std_srvs::Empty::Response & | res | ||
) | [private] |
Definition at line 68 of file dummy_pomdp.cpp.
void DummyPomdp::mainLoop | ( | void | ) |
main node thread
This is the main thread node function. Code written here will be executed in every node loop while the driver is on running state. Loop frequency can be tuned my modifying loop_rate attribute.
Here data related to the process loop or to ROS topics (mainly data structs related to the MSG and SRV files) must be updated. ROS publisher objects must publish their data in this process. ROS client servers may also request data to the corresponding server topics.
Definition at line 27 of file dummy_pomdp.cpp.
bool DummyPomdp::execution_flag [private] |
Definition at line 26 of file dummy_pomdp.h.
Definition at line 37 of file dummy_pomdp.h.
CMutex DummyPomdp::execution_mutex [private] |
Definition at line 25 of file dummy_pomdp.h.
Definition at line 31 of file dummy_pomdp.h.
ros::NodeHandle DummyPomdp::node_handle_ [private] |
Definition at line 28 of file dummy_pomdp.h.
std_msgs::Int32 DummyPomdp::ObjLabel_msg [private] |
Definition at line 32 of file dummy_pomdp.h.
ros::ServiceClient DummyPomdp::obs_client [private] |
Definition at line 41 of file dummy_pomdp.h.
iri_wam_common_msgs::obs_request DummyPomdp::obs_request_srv [private] |
Definition at line 42 of file dummy_pomdp.h.
Definition at line 43 of file dummy_pomdp.h.
iri_wam_common_msgs::wamaction DummyPomdp::wam_actions_client_srv [private] |
Definition at line 44 of file dummy_pomdp.h.