|
| 1 | +Visualizing ROS 2 data with Foxglove Studio |
| 2 | +=========================================== |
| 3 | + |
| 4 | +`Foxglove Studio <https://foxglove.dev/studio>`__ is an open source visualization and debugging tool for your robotics data. |
| 5 | + |
| 6 | +It is available in a variety of ways to make development as convenient as possible – it can be run as a standalone desktop app, accessed via your browser, or even self-hosted on your own domain. |
| 7 | + |
| 8 | +View the source code on `GitHub <https://www.github.com/foxglove/studio>`__. |
| 9 | + |
| 10 | +Installation |
| 11 | +------------ |
| 12 | + |
| 13 | +To use the web app, simply open Google Chrome and navigate to `studio.foxglove.dev <https://studio.foxglove.dev>`__. |
| 14 | + |
| 15 | +To use the desktop app for Linux, macOS, or Windows, download it directly from the `Foxglove Studio website <https://foxglove.dev/download>`__. |
| 16 | + |
| 17 | +Connect to a data source |
| 18 | +------------------------ |
| 19 | + |
| 20 | +On opening Foxglove Studio, you will see a dialog with a list of `all possible data sources <https://foxglove.dev/docs/studio/connection/data-sources>`__. |
| 21 | + |
| 22 | +To connect to your ROS 2 stack, click "Open connection", select the "Rosbridge (ROS 1 & 2)" tab, and configure your "WebSocket URL". |
| 23 | + |
| 24 | +You could also drag-and-drop any local ROS 2 ``.db3`` files directly into the application to load them for playback. |
| 25 | + |
| 26 | +.. note:: |
| 27 | + |
| 28 | + In order to `load custom message definitions in your ROS 2 files <https://github.com/ros2/rosbag2/issues/782>`__, try converting them to the `MCAP file format <https://mcap.dev>`__. |
| 29 | + |
| 30 | +Check out the `Foxglove Studio docs <https://foxglove.dev/docs/studio/connection/native>`__ for more detailed instructions. |
| 31 | + |
| 32 | +Building layouts with panels |
| 33 | +---------------------------- |
| 34 | + |
| 35 | +`Panels <https://foxglove.dev/docs/studio/panels/introduction>`__ are modular visualization interfaces that can be configured and arranged into Studio `layouts <https://foxglove.dev/docs/studio/layouts>`__. |
| 36 | +You can also save your layouts for future use, for your own personal reference or with your larger robotics team. |
| 37 | + |
| 38 | +Find the full list of available panels in the sidebar's "Add panel" tab. |
| 39 | + |
| 40 | +We've highlighted some particularly useful ones below: |
| 41 | + |
| 42 | +1 3D: Display visualization markers in a 3D scene |
| 43 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 44 | + |
| 45 | +Publish marker messages to add primitive shapes (arrows, spheres, etc.) and more complex visualizations (occupancy grids, point clouds, etc.) to your 3D panel's scene. |
| 46 | + |
| 47 | +Choose the topics you want to display via the topic picker on the left, and configure each topic's visualization settings in the "Edit topic settings" menu. |
| 48 | + |
| 49 | +.. image:: foxglove-studio/3d.png |
| 50 | + :width: 500 px |
| 51 | + :alt: Foxglove Studio's 3D panel |
| 52 | + |
| 53 | +Reference the `docs <https://foxglove.dev/docs/studio/panels/3d>`__ for a full list of `supported message types <https://foxglove.dev/docs/studio/panels/3d#supported-messages>`__ and some useful `user interactions <https://foxglove.dev/docs/studio/panels/3d#user-interactions>`__. |
| 54 | + |
| 55 | +2 Diagnostics: Filter and sort diagnostics messages |
| 56 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 57 | + |
| 58 | +Display the status of seen nodes (i.e. stale, error, warn, or OK) from topics with a ``diagnostic_msgs/msg/DiagnosticArray`` datatype in a running feed, and display the diagnostics data for a given ``diagnostic_name/hardware_id``. |
| 59 | + |
| 60 | +.. image:: foxglove-studio/diagnostics.png |
| 61 | + :width: 500 px |
| 62 | + :alt: Foxglove Studio's Diagnostics panel |
| 63 | + |
| 64 | +Reference the `docs <https://foxglove.dev/docs/studio/panels/diagnostics>`__ for more details. |
| 65 | + |
| 66 | +3 Image: View camera feed images |
| 67 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 68 | + |
| 69 | +Select a ``sensor_msgs/msg/Image`` or ``sensor_msgs/msg/CompressedImage`` topic to display. |
| 70 | + |
| 71 | +.. image:: foxglove-studio/image.png |
| 72 | + :width: 500 px |
| 73 | + :alt: Foxglove Studio's Image panel |
| 74 | + |
| 75 | +Reference the `docs <https://foxglove.dev/docs/studio/panels/image>`__ for more details. |
| 76 | + |
| 77 | +4 Log: View log messages |
| 78 | +^^^^^^^^^^^^^^^^^^^^^^^^ |
| 79 | + |
| 80 | +To view ``rcl_interfaces/msg/Log`` messages live, use the desktop app to `connect <https://foxglove.dev/docs/studio/connection/native>`__ to your running ROS stack. |
| 81 | +To view ``rcl_interfaces/msg/Log`` messages from a pre-recorded data file, you can drag-and-drop your file into either the `web <https://studio.foxglove.dev>`__ or desktop app. |
| 82 | + |
| 83 | +Next, add a `Log <https://foxglove.dev/docs/studio/panels/log>`__ panel to your layout. |
| 84 | +If you've connected to your ROS stack correctly, you should now see a list of your log messages, with the ability to filter them by node name or severity level. |
| 85 | + |
| 86 | +Reference the `docs <https://foxglove.dev/docs/studio/panels/log>`__ for more details. |
| 87 | + |
| 88 | +5 Plot: Plot arbitrary values over time |
| 89 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 90 | + |
| 91 | +Plot arbitrary values from your topics' message paths over playback time. |
| 92 | + |
| 93 | +Specify the topic values you want to plot along the y-axis. |
| 94 | +For the x-axis, choose between plotting the y-axis value's timestamp, element index, or another custom topic message path. |
| 95 | + |
| 96 | +.. image:: foxglove-studio/plot.png |
| 97 | + :width: 500 px |
| 98 | + :alt: Foxglove Studio's Plot panel |
| 99 | + |
| 100 | +Reference the `docs <https://foxglove.dev/docs/studio/panels/plot>`__ for more details. |
| 101 | + |
| 102 | +6 Raw Messages: View incoming topic messages |
| 103 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 104 | + |
| 105 | +Display incoming topic data in an easy-to-read collapsible JSON tree format. |
| 106 | + |
| 107 | +.. image:: foxglove-studio/raw-messages.png |
| 108 | + :width: 500 px |
| 109 | + :alt: Foxglove Studio's Raw Messages panel |
| 110 | + |
| 111 | +Reference the `docs <https://foxglove.dev/docs/studio/panels/raw-messages>`__ for more details. |
| 112 | + |
| 113 | +7 Teleop: Teleoperate your robot |
| 114 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 115 | + |
| 116 | +Teleoperate your physical robot by publishing ``geometry_msgs/msg/Twist`` messages on a given topic back to your live ROS stack. |
| 117 | + |
| 118 | +.. image:: foxglove-studio/teleop.png |
| 119 | + :width: 300 px |
| 120 | + :alt: Foxglove Studio's URDF Viewer panel |
| 121 | + |
| 122 | +Reference the `docs <https://foxglove.dev/docs/studio/panels/teleop>`__ for more details. |
| 123 | + |
| 124 | +8 URDF Viewer: View and manipulate your URDF model |
| 125 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 126 | + |
| 127 | +To visualize and control your robot model in Foxglove Studio, open the web or desktop application and add a `URDF Viewer <https://foxglove.dev/docs/studio/panels/urdf-viewer>`__ panel to your layout. |
| 128 | +Then, drag and drop your URDF file into that panel to visualize your robot model. |
| 129 | + |
| 130 | +.. image:: foxglove-studio/urdf.png |
| 131 | + :width: 300 px |
| 132 | + :alt: Foxglove Studio's URDF Viewer panel |
| 133 | + |
| 134 | +Select any topic publishing a ``JointState`` message to update the visualization based on the published joint states (defaults to ``/joint_states``). |
| 135 | + |
| 136 | +Toggle to "Manual joint control" to set joint positions using the provided controls. |
| 137 | + |
| 138 | +.. image:: foxglove-studio/urdf-joints.png |
| 139 | + :width: 500 px |
| 140 | + :alt: Foxglove Studio's URDF Viewer panel with editable joint positions |
| 141 | + |
| 142 | +Reference the `docs <https://foxglove.dev/docs/studio/panels/urdf-viewer>`__ for more details. |
| 143 | + |
| 144 | +Other basic actions |
| 145 | +------------------- |
| 146 | + |
| 147 | +1 View your ROS graph |
| 148 | +^^^^^^^^^^^^^^^^^^^^^ |
| 149 | + |
| 150 | +`Using the desktop app <https://foxglove.dev/download>`__, `connect <https://foxglove.dev/docs/studio/connection/native>`__ to your running ROS stack. |
| 151 | +Next, add a `Topic Graph <https://foxglove.dev/docs/studio/panels/topic-graph>`__ panel to your layout. |
| 152 | +If you've connected to your ROS stack correctly, you should now see a computational graph of your ROS nodes, topics, and services in that panel. |
| 153 | +Use the controls on the right side of the panel to select which topics to display or to toggle services. |
| 154 | + |
| 155 | +2 View and edit your ROS params |
| 156 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 157 | + |
| 158 | +`Using the desktop app <https://foxglove.dev/download>`__, `connect <https://foxglove.dev/docs/studio/connection/native>`__ to your running ROS stack. |
| 159 | +Next, add a `Parameters <https://foxglove.dev/docs/studio/panels/parameters>`__ panel to your layout. |
| 160 | +If you've connected to your ROS stack correctly, you should now see a live view of your current ``rosparams``. |
| 161 | +You can edit these parameter values to publish ``rosparam`` updates back to your ROS stack. |
| 162 | + |
| 163 | +3 Publish messages back to your live ROS stack |
| 164 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 165 | + |
| 166 | +`Using the desktop app <https://foxglove.dev/download>`__, `connect <https://foxglove.dev/docs/studio/connection/native>`__ to your running ROS stack. |
| 167 | +Next, add a `Publish <https://foxglove.dev/docs/studio/panels/publish>`__ panel to your layout. |
| 168 | + |
| 169 | +Specify the topic you want to publish on to infer its datatype and populate the text field with a JSON message template. |
| 170 | + |
| 171 | +Selecting a datatype in the dropdown of common ROS datatypes will also populate the text field with a JSON message template. |
| 172 | + |
| 173 | +Edit the template to customize your message before hitting "Publish". |
| 174 | + |
| 175 | +.. image:: foxglove-studio/publish.png |
| 176 | + :width: 300 px |
| 177 | + :alt: Foxglove Studio's Publish panel |
0 commit comments