ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
If my understanding is correct, what you want to do is subscribe to a message, process that message in the callback, then publish the processed message as another topic. You can just publish the message inside your callback. An example can be find from here.
2 | No.2 Revision |
If my understanding is correct, what you want to do is subscribe to a message, process that message in the callback, then publish the processed message as another topic. You can just publish the message inside your callback. An example can be find from here.
A class is defined in the example I mentioned. You can also use global function as that in your sample code.