|Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.|
Running RosbridgeDescription: This tutorial shows you how to launch a rosbridge server and talk to it.
Keywords: rosbridge, roslibjs, teleoperation, Robot Web Tools
Tutorial Level: BEGINNER
Rosbridge depends on a basic installation of ROS. Check out the ROS Installation Guide for installing ROS on your machine.
After ROS is installed, you can install Rosbridge from a .deb package:
sudo apt-get install ros-<rosdistro>-rosbridge-suite
This will install the suite of rosbridge packages needed to get started.
After installing ROS and rosbridge, you need to make sure your system is aware of the packages. To set up your environment for ROS and rosbridge:
All that's left is to run rosbridge. To launch rosbridge and its packages like rosbridge_server and rosapi, a launch file is included in the install. To launch the file, run:
roslaunch rosbridge_server rosbridge_websocket.launch
This will run rosbridge and create a WebSocket on port 9090 by default.
You can configure the port by setting the ~/port param in ROS. An example launch file that will run rosbridge on port 8080 would look like:
<launch> <include file="$(find rosbridge_server)/launch/rosbridge_websocket.launch" > <arg name="port" value="8080"/> </include> </launch>
Talking to Rosbridge