#include <fixed_strategy.h>
Public Member Functions | |
FixedStrategy () | |
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 49 of file fixed_strategy.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 fixed_strategy.cpp.
bool FixedStrategy::execution_flow_controlCallback | ( | std_srvs::Empty::Request & | req, |
std_srvs::Empty::Response & | res | ||
) | [private] |
Definition at line 83 of file fixed_strategy.cpp.
void FixedStrategy::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 fixed_strategy.cpp.
bool FixedStrategy::execution_flag [private] |
Definition at line 53 of file fixed_strategy.h.
Definition at line 64 of file fixed_strategy.h.
CMutex FixedStrategy::execution_mutex [private] |
Definition at line 52 of file fixed_strategy.h.
Definition at line 58 of file fixed_strategy.h.
ros::NodeHandle FixedStrategy::node_handle_ [private] |
Definition at line 55 of file fixed_strategy.h.
std_msgs::Int32 FixedStrategy::ObjLabel_msg [private] |
Definition at line 59 of file fixed_strategy.h.
ros::ServiceClient FixedStrategy::obs_client [private] |
Definition at line 68 of file fixed_strategy.h.
iri_wam_common_msgs::obs_request FixedStrategy::obs_request_srv [private] |
Definition at line 69 of file fixed_strategy.h.
Definition at line 70 of file fixed_strategy.h.
iri_wam_common_msgs::wamaction FixedStrategy::wam_actions_client_srv [private] |
Definition at line 71 of file fixed_strategy.h.