17. Viewing ROS Data in Open MCT

These instructions describe how to install and run our Open MCT ROS plugin.

This tutorial assumes you have checked out and build the BRASH ROS2 workspace

17.1. Install Node 18

$ sudo apt install curl
$ sudo curl -sL https://deb.nodesource.com/setup_18.x | bash

17.2. Checkout and Configure the MCT plugin

$ git clone git@bitbucket.org:traclabs/openmct-ros.git
$ cd openmct-ros

17.3. Build it

$ npm install
$ npm run build:example

17.4. Start the rosbridge plugin

$ source /opt/ros/humble/setup.bash
$ cd ~/code/brash  # or wherever you have installed your brash workspace
$ source install/local_setup.bash
$ ros2 launch rosbridge_server rosbridge_websocket_launch.xml port:=<port> address:=<hostname>

But of course set port and hostname to what you would like (default is localhost:9090, but you can’t use 9090 cause thats what Open MCT wants).

17.5. Start Open MCT (and the ROS plugin)

First, you should change the addrss of rosBridgeEndpoint in openmct-ros/example/index.js to match the port and hostname arguments you used above (default is rosmachine:9090).

Next, run the Open MCT development server.

$ npm start

After the server has started, launch a web browser pointing to http://localhost:9090/ to see the OpenMCT UI. You should see all of your ROS topics in the Open MCT browser.

17.6. BRASH/TRACArm Example

The following video shows how the MCT plugin can show the telemetry data coming from our cFS-based robot from the RobotSim Tutorial. If you start up cFS and that robot, then also start the rosbridge server and Open MCT with the appropriate port, you can get something like this: