How to pass the topic data to external application directly via not ROS2
Hi there I run the gazebo plugin like gazeboros jointstate_publisher demo.world on ROS2 as follows image. I would like to try to pass topic data to external python application directly via not ROS2.
Is there any good way?
Asked by alfaromeo on 2020-01-16 23:57:01 UTC
Answers
Not sure if I fully understand your case. My first question is: do you need ROS at all for your use case or you just want the Gazebo simulation and send the data to other application?
If you don't need ROS one option could be writing a standalone application that subscribe to /gazebo/default/joint
gztopic and in the callback transform the data from gazebo.msgs
to a given format useful to send you to your application in python (not sure about the best way here but there should be plenty of options). To implement the application you can look into the stand_alone example of listener and change the code in the callback.
Another option using ROS could be to integrate rospy code inside your python code to subscribe to the joint_state
ROS topic and use the information directly from there. This is probably the easiest approach.
Asked by Jose Luis Rivero on 2020-01-23 10:37:18 UTC
Comments