ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You could do something like this:
void chatterCallback(const std_msgs::String::ConstPtr& msg)
{
my_function(msg);
}
void my_function(const std_msgs::String::ConstPtr& c)
{
ROS_INFO("I heard from my function: [%s]", c->data.c_str());
}