ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Make a ROS2 program communicate with a Python program

asked 2022-12-21 11:13:31 -0500

thibd gravatar image

Hi,

We have Python program that has been developed by a team and is the core program.

This Python program calls a simulation made with ROS2, as a service, for some of the robot's moves.

We could put the Python program in a ROS2 node but this will make everything more complicated for the Python team. Including debugging.

We currently plan to have a web server to handle the communication between the two. One of the ROS2 nodes would be listening for requests from the Python program.

Or is there some "common way" to do that more efficiently?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-12-21 11:47:35 -0500

Mike Scheutzow gravatar image

There is existing work along these lines. You should look into the rosbridge_suite, which provides a websocket for external apps to communicate with the ros system. I don't know the status of this package for ros2, but a google search does return some hits. Here is the ros1 wiki page as a starting point:

http://wiki.ros.org/rosbridge_suite

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-12-21 11:13:31 -0500

Seen: 190 times

Last updated: Dec 21 '22