ROS 1 and ROS 2 Rosbridge
A rosbridge connection connects Studio to your ROS master over WebSockets.
Because a rosbridge connection uses a standard protocol and only requires one port to be open on your ROS host, this is a better option if you have a network firewall between ROS and Studio. On the flip side, it does require running an extra ROS node – rosbridge_server.
Before you start, make sure you’ve installed
rosbridge-suite. On Ubuntu / Debian, the package name is
# For Noetic (ROS 1) sudo apt install ros-noetic-rosbridge-suite # For Galactic (ROS 2) sudo apt install ros-galactic-rosbridge-suite
Next, ensure you do not already have a ROS master running, and start the websocket server:
# For ROS 1 roslaunch rosbridge_server rosbridge_websocket.launch # For ROS 2 ros2 launch rosbridge_server rosbridge_websocket_launch.xml
In the following example, the server is listening on port
Now in Studio, use the sidebar to add ROS 1 Rosbridge or ROS 2 Rosbridge as a data source, and enter the URL to your websocket server:
You are now connected to ROS!
To test your connection, add a Raw Messages panel to your layout, and see a list of available topics populate the dropdown. Check out the
/connected_clients topic to see information
rosbridge is publishing about your connection.
Both ROS 1 and ROS 2 Rosbridge connections allow publishing back to your ROS stack.
However, both do not yet support reading or setting ROS parameters.