Legacy Websocket Compatibility (rosbridge)
The recommended way to drive MoveIt Pro programmatically is the Native ROS 2 Client Library API (rclpy, rclcpp). The web UI no longer uses rosbridge_server; it now uses the MoveIt Pro web bridge on port 3201 with a binary CDR wire format. This page is for customers with existing investment in rosbridge-protocol clients (roslibpy, roslibjs, rossharp, roslibrust, jrosbridge) who need a migration ramp.
The MoveIt Pro web bridge on port 3201 and the opt-in --enable-rosbridge sidecar described here were introduced in MoveIt Pro 9.4. In earlier versions the web UI runs rosbridge_server on port 3201 directly and no --enable-rosbridge flag exists.
When to use this
Use the legacy compatibility bridge when:
- You have host scripts that already speak the rosbridge JSON protocol and a port-only change is preferable to rewriting them.
- The host does not have ROS 2 installed and cannot be on the same DDS network as the robot.
- You need to drive Objectives over a WebSocket from a browser or non-ROS language.
For Custom View Panes embedded in MoveIt Pro, prefer IframeROSClient instead of this sidecar. IframeROSClient routes ROS traffic through the parent-frame web bridge, so pane code avoids the rosbridge JSON protocol break on port 3201.
If none of those apply, prefer the native client libraries; they are faster on the wire and require no extra process on the robot.
Enable the sidecar
The legacy bridge is off by default. Enable it at robot launch:
moveit_pro run -c <your_config> --enable-rosbridge
By default the sidecar binds to port 3204. Override if the default conflicts with something else on the host:
moveit_pro run -c <your_config> --enable-rosbridge --rosbridge-port=9090
Why not the historical 9090? 9090 is the upstream rosbridge_server default and frequently clashes with developer rosbridge installs. 3204 keeps the legacy bridge cleanly separated from both the MoveIt Pro web bridge (3201) and any external rosbridge already running.
rosbridge serializes every message as JSON, which is roughly an order of magnitude slower per message than the web bridge's binary CDR wire format. Streaming cameras, point clouds, or planning-scene bursts over the legacy bridge can saturate the network and starve other UI traffic. Keep those topics on the web bridge and only route control-plane traffic (action goals, services, low-rate state) over the legacy bridge.
Connect a client
The rosbridge protocol surface is unchanged from previous releases; only the port differs. Point the client at the configured port:
- Python (roslibpy)
- JavaScript (roslibjs)
import roslibpy
from roslibpy import ActionClient
# Default sidecar port is 3204; replace if you passed --rosbridge-port.
client = roslibpy.Ros(host="localhost", port=3204)
client.run()
action = ActionClient(
client,
"/do_objective",
"moveit_studio_sdk_msgs/action/DoObjectiveSequence",
)
action.send_goal({"objective_name": "Close Gripper"}, on_result, on_feedback, on_error)
roslibpy's ROS 2 action support is on the GitHub main branch as of this writing:
pip install git+https://github.com/RobotWebTools/roslibpy.git@main
import ROSLIB from "roslib";
// Default sidecar port is 3204; replace if you passed --rosbridge-port.
const ros = new ROSLIB.Ros({ url: "ws://localhost:3204" });
For action / service / topic semantics (including cancellation and parameter_overrides), the API matches the native Run an Existing Objective, Run an Objective from a Custom Behavior Tree XML, and Passing Parameters to Objectives at Runtime guides; the payload shapes are identical, only the transport differs.