ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The ConstPtrs in ROS behave like boost::shared_ptr, and you can use them similarly.
This should probably look something like:
// .. fill in your message fields
geometry_msgs::Twist msg;
msg.linear.x = 42;
geometry_msgs::Twist::ConstPtr msg_p(new geometry_msgs::Twist(msg));
// call your callback
driver.CmdVelCallback(msg_p);