IRI ROS Specific Algorithm Class. More...
#include <moped_handler_alg_node.h>
Public Member Functions | |
MopedHandlerAlgNode (void) | |
Constructor. | |
~MopedHandlerAlgNode (void) | |
Destructor. | |
Protected Member Functions | |
void | addNodeDiagnostics (void) |
node add diagnostics | |
void | callback (const ImageConstPtr &image, const PointCloud2ConstPtr &pcl) |
void | mainNodeThread (void) |
main node thread | |
void | node_config_update (Config &config, uint32_t level) |
dynamic reconfigure server callback | |
Protected Attributes | |
sensor_msgs::Image | inputImage |
sensor_msgs::PointCloud2 | inputPointCloud |
pcl::PointCloud< pcl::PointXYZ > | pcl_ |
bool | working |
Private Types | |
typedef message_filters::sync_policies::ApproximateTime < sensor_msgs::Image, sensor_msgs::PointCloud2 > | MySyncPolicy |
Private Member Functions | |
bool | enableCallback (iri_moped_handler::enable::Request &req, iri_moped_handler::enable::Response &res) |
void | mopedActive () |
void | mopedDone (const actionlib::SimpleClientGoalState &state, const iri_moped_actionserver::mopedResultConstPtr &result) |
void | mopedFeedback (const iri_moped_actionserver::mopedFeedbackConstPtr &feedback) |
void | mopedMakeActionRequest () |
Private Attributes | |
CMutex | enable_mutex_ |
ros::ServiceServer | enable_server_ |
actionlib::SimpleActionClient < iri_moped_actionserver::mopedAction > | moped_client_ |
iri_moped_actionserver::mopedGoal | moped_goal_ |
pr_msgs::ObjectPoseList | ObjectPoseList_msg_ |
ros::Publisher | outputOPL_publisher_ |
message_filters::Subscriber < sensor_msgs::Image > | subImage_ |
message_filters::Subscriber < sensor_msgs::PointCloud2 > | subPointCloud_ |
message_filters::Synchronizer < MySyncPolicy > * | sync_ |
IRI ROS Specific Algorithm Class.
Definition at line 62 of file moped_handler_alg_node.h.
typedef message_filters::sync_policies::ApproximateTime<sensor_msgs::Image, sensor_msgs::PointCloud2> MopedHandlerAlgNode::MySyncPolicy [private] |
Definition at line 74 of file moped_handler_alg_node.h.
Constructor.
This constructor initializes specific class attributes and all ROS communications variables to enable message exchange.
Definition at line 3 of file moped_handler_alg_node.cpp.
Destructor.
This destructor frees all necessary dynamic memory allocated within this this class.
Definition at line 31 of file moped_handler_alg_node.cpp.
void MopedHandlerAlgNode::addNodeDiagnostics | ( | void | ) | [protected, virtual] |
node add diagnostics
In this abstract function additional ROS diagnostics applied to the specific algorithms may be added.
Implements algorithm_base::IriBaseAlgorithm< MopedHandlerAlgorithm >.
Definition at line 223 of file moped_handler_alg_node.cpp.
void MopedHandlerAlgNode::callback | ( | const ImageConstPtr & | image, |
const PointCloud2ConstPtr & | pcl | ||
) | [protected] |
Definition at line 206 of file moped_handler_alg_node.cpp.
bool MopedHandlerAlgNode::enableCallback | ( | iri_moped_handler::enable::Request & | req, |
iri_moped_handler::enable::Response & | res | ||
) | [private] |
Definition at line 53 of file moped_handler_alg_node.cpp.
void MopedHandlerAlgNode::mainNodeThread | ( | void | ) | [protected, virtual] |
main node thread
This is the main thread node function. Code written here will be executed in every node loop while the algorithm is on running state. Loop frequency can be tuned by 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.
Implements algorithm_base::IriBaseAlgorithm< MopedHandlerAlgorithm >.
Definition at line 36 of file moped_handler_alg_node.cpp.
void MopedHandlerAlgNode::mopedActive | ( | ) | [private] |
Definition at line 158 of file moped_handler_alg_node.cpp.
void MopedHandlerAlgNode::mopedDone | ( | const actionlib::SimpleClientGoalState & | state, |
const iri_moped_actionserver::mopedResultConstPtr & | result | ||
) | [private] |
Definition at line 95 of file moped_handler_alg_node.cpp.
void MopedHandlerAlgNode::mopedFeedback | ( | const iri_moped_actionserver::mopedFeedbackConstPtr & | feedback | ) | [private] |
Definition at line 163 of file moped_handler_alg_node.cpp.
void MopedHandlerAlgNode::mopedMakeActionRequest | ( | ) | [private] |
Definition at line 181 of file moped_handler_alg_node.cpp.
void MopedHandlerAlgNode::node_config_update | ( | Config & | config, |
uint32_t | level | ||
) | [protected, virtual] |
dynamic reconfigure server callback
This method is called whenever a new configuration is received through the dynamic reconfigure. The derivated generic algorithm class must implement it.
config | an object with new configuration from all algorithm parameters defined in the config file. |
level | integer referring the level in which the configuration has been changed. |
Implements algorithm_base::IriBaseAlgorithm< MopedHandlerAlgorithm >.
Definition at line 199 of file moped_handler_alg_node.cpp.
CMutex MopedHandlerAlgNode::enable_mutex_ [private] |
Definition at line 80 of file moped_handler_alg_node.h.
Definition at line 78 of file moped_handler_alg_node.h.
sensor_msgs::Image MopedHandlerAlgNode::inputImage [protected] |
Definition at line 157 of file moped_handler_alg_node.h.
sensor_msgs::PointCloud2 MopedHandlerAlgNode::inputPointCloud [protected] |
Definition at line 158 of file moped_handler_alg_node.h.
actionlib::SimpleActionClient<iri_moped_actionserver::mopedAction> MopedHandlerAlgNode::moped_client_ [private] |
Definition at line 87 of file moped_handler_alg_node.h.
iri_moped_actionserver::mopedGoal MopedHandlerAlgNode::moped_goal_ [private] |
Definition at line 88 of file moped_handler_alg_node.h.
pr_msgs::ObjectPoseList MopedHandlerAlgNode::ObjectPoseList_msg_ [private] |
Definition at line 67 of file moped_handler_alg_node.h.
Definition at line 66 of file moped_handler_alg_node.h.
pcl::PointCloud<pcl::PointXYZ> MopedHandlerAlgNode::pcl_ [protected] |
Definition at line 159 of file moped_handler_alg_node.h.
message_filters::Subscriber<sensor_msgs::Image> MopedHandlerAlgNode::subImage_ [private] |
Definition at line 70 of file moped_handler_alg_node.h.
message_filters::Subscriber<sensor_msgs::PointCloud2> MopedHandlerAlgNode::subPointCloud_ [private] |
Definition at line 71 of file moped_handler_alg_node.h.
Definition at line 75 of file moped_handler_alg_node.h.
bool MopedHandlerAlgNode::working [protected] |
Definition at line 162 of file moped_handler_alg_node.h.