.. _brash_openmct: 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 Install Node 18 =============== .. code-block:: bash $ sudo apt install curl $ sudo curl -sL https://deb.nodesource.com/setup_18.x | bash Checkout and Configure the MCT plugin ===================================== .. code-block:: bash $ git clone git@bitbucket.org:traclabs/openmct-ros.git $ cd openmct-ros Build it ======== .. code-block:: bash $ npm install $ npm run build:example Start the rosbridge plugin ========================== .. code-block:: bash $ 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:= address:= 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). 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. .. code-block:: bash $ 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. BRASH/TRACArm Example ===================== The following video shows how the MCT plugin can show the telemetry data coming from our cFS-based robot from the :ref:`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: .. youtube:: Uq2fbdsby3c :width: 640 :height: 480