Can I subcribe to multiple messages from a topic?
Maybe I am doing this wrong. Should I have one topic per message? I have multiple joints in one node. The node is publishing the joints as joint1 and joint2 to the "joint" topic. I can only find how to create a callback for a topic. I don't see anything about getting the different joint messages from the joint topic.
Asked by buckit_hed on 2023-03-22 20:59:04 UTC
Answers
You can publish a JointState Message to the topic (http://docs.ros.org/en/melodic/api/sensor_msgs/html/msg/JointState.html) containing the joint states of both joints. Subscriptions are always related to a topic not to a message. Maybe it is worth going through the tutorials, espiacally:Understanding topics.
Asked by nils_iseke on 2023-03-24 05:57:47 UTC
Comments