3D (Legacy)
Display visualization markers and models in a 3D scene.
We recommend using the new 3D panel, as it includes performance and user experience improvements.
Introduction
By publishing specifically formatted marker messages to a topic, you can programmatically add primitive shapes (arrows, spheres, etc.) and more complex visualizations (occupancy grids, point clouds, etc.) to your 3D panel's scene.
Choose the topics you want to display via the topic picker, and configure each topic's visualization settings using the "Edit topic settings"
menu.
Transforms
To translate or rotate the placement of your markers, publish transform messages to define the spatial relationship between two coordinate frames. To successfully apply this transformation to your markers, your transform message must include its own frame_id
and a child_frame_id
(i.e. your markers' frame_id
).
In ROS, transform interpolation works by holding a buffer of every received transform in the last 10 seconds for each coordinate frame, and transforms are always done at a point in time. If the requested time falls between two transforms for any coordinate frame(s) between the child and parent, LERP and SLERP are used for interpolation (using the marker's frame_locked
attribute). To translate between two sibling frames, search for a common parent and conduct a transform from A to parent, followed by an inverse transform from parent to B. To accomplish this, all coordinate transformations must be parameterized by time, instead of always using the latest transform.
The 3D panel does handle future transform requests differently from the ROS implementation. It clamps any future time to the latest received transform timestamp. This removes a poorly documented tuning parameter and reduces user surprise when a transform can't be found because the window is slightly too old.
Supported messages
To use this panel, your data source must provide messages conforming to one of the following supported schemas.
ColorRGBA
A color in RGBA format.
framework | schema |
---|---|
ROS 1 | std_msgs/ColorRGBA |
ROS 2 | std_msgs/msg/ColorRGBA |
Custom | foxglove.Color |
LaserScan
A single scan from a planar laser range-finder.
framework | schema |
---|---|
ROS 1 | sensor_msgs/LaserScan |
ROS 2 | sensor_msgs/msg/LaserScan |
Custom | foxglove.LaserScan |
Marker
A visualization marker (i.e. arrows, cubes, spheres, etc.) to be displayed within your scene.
framework | schema |
---|---|
ROS 1 | visualization_msgs/Marker |
ROS 2 | visualization_msgs/msg/Marker |
For markers with a mesh_resource
field, load the mesh using the following URL types:
http(s)://
package://
(Desktop app only)file://
(Desktop app only)
The mesh resource must be in one of the following file formats:
- glTF (
.glb
) - STL (
.stl
) - COLLADA (
.dae
)
MarkerArray
An array of various visualization markers to be displayed within your scene.
framework | schema |
---|---|
ROS 1 | visualization_msgs/MarkerArray |
ROS 2 | visualization_msgs/msg/MarkerArray |
OccupancyGrid
2D grid map, with each cell representing the probability of occupancy.
framework | schema |
---|---|
ROS 1 | nav_msgs/OccupancyGrid |
ROS 2 | nav_msgs/msg/OccupancyGrid |
Custom | foxglove.Grid |
Path
An array of timestamped poses in a named coordinate frame, denoting an object's path through space.
framework | schema |
---|---|
ROS 1 | nav_msgs/Path |
ROS 2 | nav_msgs/msg/Path |
Custom | foxglove.PosesInFrame |
PointCloud
A collection of N-dimensional points, which may contain additional fields with information like normals, intensity, etc.
framework | schema |
---|---|
ROS 1 | sensor_msgs/PointCloud2 |
ROS 2 | sensor_msgs/msg/PointCloud2 |
Custom | foxglove.PointCloud |
PolygonStamped
A polygon with a reference coordinate frame and timestamp.
framework | schema |
---|---|
ROS 1 | geometry_msgs/PolygonStamped |
ROS 2 | geometry_msgs/msg/PolygonStamped |
PoseStamped
A timestamped pose in a named coordinate frame.
framework | schema |
---|---|
ROS 1 | geometry_msgs/PoseStamped |
ROS 2 | geometry_msgs/msg/PoseStamped |
Custom | foxglove.PoseInFrame |
PoseArray
An array of timestamped poses in a named coordinate frame.
framework | schema |
---|---|
ROS 1 | geometry_msgs/PoseArray |
ROS 2 | geometry_msgs/msg/PoseArray |
Custom | foxglove.PosesInFrame |
Transform message
A transform between two named coordinate frames in space.
framework | schema |
---|---|
ROS 1 | tf/tfMessage |
ROS 1 | tf2_msgs/TFMessage |
ROS 2 | tf2_msgs/msg/TFMessage |
Custom | foxglove.FrameTransform |
VelodyneScan
Velodyne LIDAR scan packets.
framework | schema |
---|---|
ROS 1 | velodyne_msgs/VelodyneScan |
ROS 2 | velodyne_msgs/msg/VelodyneScan |
URDF model
URDF robot models are loaded automatically if your data source supports parameters (i.e. a native ROS 1 or ROS 2 connection) and the /robot_description
parameter is set to valid URDF XML.
Override this parameter with a custom http(s)://
, package://
(desktop app only), or file://
(desktop app only) URL in the 3D panel's topic picker, under the "3D Model" entry's settings.
User interactions
Click any given marker in the scene to display its relevant details in a dialog box.
Clicking overlapping markers will display a context menu that lets you select a specific marker. Clicking a point in a point cloud enables you to export the point cloud message as a CSV.
You can also leverage linked variables to dynamically change the data visualized in your other panels. After clicking a marker, hover over the topic field you want to link in the corresponding dialog box (e.g. id
). Follow the prompts to link that field to a variable name of your choice (e.g. $my_marker_id
). Now, whenever you click another marker under that same topic, your variable will update to match the new marker's linked field value.
For example, if you click on a visualization marker published under the /tracked_objects
topic, and link its id
field to $my_object_id
, the $my_object_id
variable will automatically be set to that visualization marker’s id
field value (e.g. 1000). Now if you click another /tracked_objects
marker with an id
of 2000, that $my_object_id
variable will automatically be updated to 2000.
This is useful if you want to, for example, plot the selected marker’s velocity – you can open a Plot panel in your layout, and add a line for /tracked_objects{id==$my_custom_id}.velocity
.
The panel controls on the right can be used to do the following:
- Set a target frame for the camera to follow – Can also toggle orientation following altogether. By default the scene will follow the center of a frame. When panning, the camera will be offset from, but stay relative to, that original frame center. If you ever get lost in a scene after panning, click "Follow" to snap the camera back to the default position.
- Search for text in marker messages
- Toggle between 3D and 2D views of the scene
- Measure the distance between 2 points – Click to draw points in the scene; only possible in 2D view
- Draw pose estimates, poses, and points, and publish them to predetermined topics – Only visible when connected to a live data source like a native ROS 1 or ROS 2, Rosbridge, or Foxglove WebSocket connection
- View and edit the camera state – Can also toggle the ability to sync camera positions across multiple 3D panels or to show a crosshair across all 3D panels on hover
Settings
General | |
---|---|
Flatten markers | Ensures that markers reference the same baseline height when rendering on a plane |
Auto-text background | Makes text label markers easier to read within the 3D scene |
Auto background | Sets background color based on selected color scheme when toggled on, even if a custom background color is selected |
Mesh rendering | |
---|---|
Ignore COLLADA up_axis | Ignores orientation metadata in COLLADA files loaded as a mesh_resource |
Publish | |
---|---|
Pose estimate topic | Topic to which pose estimates drawn in the 3D scene should be published |
Pose topic | Topic to which poses drawn in the 3D scene should be published |
Point topic | Topic to which points drawn in the 3D scene should be published |
X deviation | X standard deviation for the covariance of pose estimates drawn by the user |
Y deviation | Y standard deviation for the covariance of pose estimates drawn by the user |
Theta deviation | Theta standard deviation for the covariance of pose estimates drawn by the user |
Shortcuts
To move the camera:
w
– Forwarda
– Lefts
– Backwardd
– Rightz
, orScroll
up – Zoom inx
, orScroll
down – Zoom out- Drag – Parallel to the ground. Will disengage “follow” mode, if enabled.
- Right-click + drag – Pan and rotate. Dragging horizontally rotates around the world's z-axis; dragging vertically pans around the x and y axes
Shift
+ other action – Adjusts all values to be 1/10 of baseline values; allows for more precise movements and adjustments
Other:
t
– Open topic pickerEsc
– Close topic pickerCmd
+f
– Search for marker text