### Source ROS environment Source: https://wiki.ros.org/rosbridge_suite/Tutorials/DevelopingRosbridge Source the ROS setup script to initialize the environment. ```bash source /opt/ros/groovy/setup.bash ``` -------------------------------- ### Install rosbridge_suite package Source: https://wiki.ros.org/rosbridge_suite/Tutorials/RunningRosbridge Install the rosbridge suite from a .deb package after a basic ROS installation. Replace with your ROS distribution name. ```bash sudo apt-get install ros--rosbridge-suite ``` -------------------------------- ### Source the ROS setup file Source: https://wiki.ros.org/rosbridge_suite/Tutorials/RunningRosbridge Set up your environment for ROS and rosbridge by sourcing the setup.bash script. Replace with your ROS distribution name. ```bash source /opt/ros//setup.bash ``` -------------------------------- ### Install rosbridge-server via apt Source: https://wiki.ros.org/rosbridge_suite Install the rosbridge server Debian package. Replace with your ROS distribution name (e.g., noetic). ```bash sudo apt-get install ros--rosbridge-server ``` -------------------------------- ### Install rosauth dependency Source: https://wiki.ros.org/rosbridge_suite/Tutorials/DevelopingRosbridge Install the required rosauth package using apt-get. ```bash sudo apt-get install ros-groovy-rosauth ``` -------------------------------- ### Add rosbridge to ROS path Source: https://wiki.ros.org/rosbridge_suite/Tutorials/DevelopingRosbridge Source the development setup script to add the built packages to the ROS path. ```bash cd ~/ws source devel/setup.bash ``` -------------------------------- ### Custom port launch file for rosbridge Source: https://wiki.ros.org/rosbridge_suite/Tutorials/RunningRosbridge An example launch file that runs rosbridge on port 8080 by including the default launch file and setting the port argument. Use the ~/port param to configure the port. ```xml ``` -------------------------------- ### Rosbridge protocol subscribe example Source: https://wiki.ros.org/rosbridge_suite Example rosbridge protocol message for subscribing to a topic. The 'op' field is 'subscribe', the topic is '/cmd_vel', and the type is 'geometry_msgs/Twist'. ```json { "op": "subscribe", "topic": "/cmd_vel", "type": "geometry_msgs/Twist" } ``` -------------------------------- ### Build rosbridge Source: https://wiki.ros.org/rosbridge_suite/Tutorials/DevelopingRosbridge Navigate to the workspace root and build the packages using catkin_make. ```bash cd ~/ws catkin_make ``` -------------------------------- ### Create a workspace Source: https://wiki.ros.org/rosbridge_suite/Tutorials/DevelopingRosbridge Create a new directory for the workspace. ```bash mkdir ~/ws ``` -------------------------------- ### Clone rosbridge_suite Source: https://wiki.ros.org/rosbridge_suite/Tutorials/DevelopingRosbridge Create the source directory and clone the rosbridge_suite repository. ```bash mkdir ~/ws/src cd ~/ws/src git clone https://github.com/RobotWebTools/rosbridge_suite.git ``` -------------------------------- ### Launch rosbridge websocket server Source: https://wiki.ros.org/rosbridge_suite/Tutorials/RunningRosbridge Launch the rosbridge server and its packages (rosbridge_server, rosapi) using the included launch file. This creates a WebSocket on port 9090 by default. ```bash roslaunch rosbridge_server rosbridge_websocket.launch ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.