Replays LRAUV mission logs (.nc4) in RViz2 with a 3D underwater scene and telemetry. ROS 2 Humble.
957
Tethys Tales replays LRAUV (Long Range Autonomous Underwater Vehicle) mission logs (.nc4) in RViz2. It shows the vehicle in a 3D underwater scene, with telemetry panels. The image contains ROS 2 Humble on Ubuntu 22.04.
The image runs on Linux with an X11 display only.
docker pull mbari/tethystales:latest
xhost +local:docker
LOGS="$HOME/lrauv-logs"
/mbari/LRAUV, which is your log directory. Select a .nc4 file.xhost -local:docker
Use this command also on a laptop where an Intel GPU drives the display.
docker run -it --rm \
--gpus all \
-e NVIDIA_DRIVER_CAPABILITIES=graphics,utility,compute,display \
-e __NV_PRIME_RENDER_OFFLOAD=1 \
-e __GLX_VENDOR_LIBRARY_NAME=nvidia \
--network host \
-e DISPLAY -e QT_X11_NO_MITSHM=1 \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-v "${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority:ro" \
-e ROS_LOCALHOST_ONLY=1 \
-e TETHYSTALES_LOG_ROOT=/mbari/LRAUV \
-v "$LOGS:/mbari/LRAUV:ro" \
mbari/tethystales:latest
If RViz2 does not start on a desktop whose display runs on the NVIDIA GPU, remove the line -e __NV_PRIME_RENDER_OFFLOAD=1.
docker run -it --rm \
--device /dev/dri:/dev/dri \
--network host \
-e DISPLAY -e QT_X11_NO_MITSHM=1 \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-v "${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority:ro" \
-e ROS_LOCALHOST_ONLY=1 \
-e TETHYSTALES_LOG_ROOT=/mbari/LRAUV \
-v "$LOGS:/mbari/LRAUV:ro" \
mbari/tethystales:latest
The image contains the Mesa of Ubuntu 22.04 (23.2 when this image was built). This Mesa can be too old for the newest Intel GPUs, for example Meteor Lake Arc (GLX BadValue errors). Use software rendering on these computers.
Software rendering works on all computers, but it is slower.
docker run -it --rm \
-e LIBGL_ALWAYS_SOFTWARE=1 \
-e __GLX_VENDOR_LIBRARY_NAME=mesa \
--network host \
-e DISPLAY -e QT_X11_NO_MITSHM=1 \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-v "${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority:ro" \
-e ROS_LOCALHOST_ONLY=1 \
-e TETHYSTALES_LOG_ROOT=/mbari/LRAUV \
-v "$LOGS:/mbari/LRAUV:ro" \
mbari/tethystales:latest
ROS_LOCALHOST_ONLY=1 keeps the ROS 2 traffic on this computer. Without it, a Tethys Tales on another computer in the same ROS domain can send data into your RViz2 (the container uses the host network).
The source repository is github.com/mbari-org/tethystales. Access is limited to MBARI users. Its script docker/run.sh finds the GPU, tests OpenGL and falls back to software rendering automatically. The repository also has the full documentation and the files to build the image. Without access, use the commands on this page.
The image starts ros2 launch tethystales tethystales.launch.py. To give launch arguments (name:=value), write this full command after the image name. Keep all the flags of your Quick start command. Replace only its last line.
Load one file. Give the path as the container sees it:
mbari/tethystales:latest \
ros2 launch tethystales tethystales.launch.py \
log_file:=/mbari/LRAUV/path/to/log.nc4
Load by vehicle name and logset name:
mbari/tethystales:latest \
ros2 launch tethystales tethystales.launch.py \
vehicle:=tethys logset:=20250304T211257
The vehicle/logset search needs the MBARI layout in your log directory: <vehicle>/missionlogs/<year>/<date range>/<logset>/*.nc4 or <vehicle>/missionlogs/tmp/Logs/<logset>/*.nc4. If the logset does not exist, the search uses the nearest logset of the same year, if it is at most 24 hours away. The Playback Control panel also has Vehicle and Logset fields.
To list all launch arguments with their defaults, run this command. It opens no window.
docker run --rm mbari/tethystales:latest ros2 launch tethystales tethystales.launch.py --show-args
The table shows the arguments that people use most. The command above lists all of them.
| Argument | Default | What it does |
|---|---|---|
log_file | '' | .nc4 file to load at start. Overrides vehicle and logset. |
vehicle, logset | '' | Load a log by vehicle and logset from /mbari/LRAUV. |
playback_speed | 1.0 | Speed at start. 1.0 is real time. |
loop_playback | false | true: start again at the end of the log. |
downsample_factor | 1 | Use every Nth sample. A larger value loads faster. |
layout | tethystales | tethystales: the underwater scene. engineering: the track on a grid, without sky, water or seafloor. scicomm: clearer water, faint sea surface, window sized for a 5K monitor. |
vehicle_scale | 1.0 | 1 to 100. Makes only the vehicle model larger. |
world_scale | 1.0 | 0.05 to 1. Makes the scene smaller. The vehicle stays full size. |
vertical_scale | 1.0 | 1 to 5. Depths show this many times deeper. |
attitude_smoothing_s | 0.0 | 0 to 120 s. Smooths the roll, pitch and heading of the 3D vehicle. The panels show the logged values. 0 is off. |
trajectory_trail_mode | points | Unit of the trail length: points, distance (m) or time (s). |
trajectory_trail_length | 100.0 | Length of the trail. 0 removes the trail. |
terrain_enabled | true | false: no seafloor. |
With a scale other than 1.0, the scene is not to scale.
Add each variable with -e NAME=value before the image name.
| Variable | Default | What it does |
|---|---|---|
QT_SCALE_FACTOR | automatic | Scale of the RViz2 interface. Set 1 if the interface flickers or is too large on a high-DPI screen. |
TETHYSTALES_TEXT_SCALE | 1 | Text size of the panels: 0.75, 1, 1.25, 1.5 or 2. |
ROS_DOMAIN_ID | 0 | ROS 2 domain. |
TETHYSTALES_LOG_ROOT | /mbari/LRAUV | Root of the log tree when log_root:= is not set. The Load dialog and the vehicle/logset search use it. Keep it at the mount point. |
ROS_LOCALHOST_ONLY | 1 above | 0 shares the ROS 2 data with other computers. |
cannot open display or Authorization required: Run xhost +local:docker. Make sure that echo $DISPLAY shows a value, for example :0.
Failed to create an OpenGL context or BadValue:
-e __NV_PRIME_RENDER_OFFLOAD=1. On a desktop whose display runs on the NVIDIA GPU, remove that line.mbari/tethystales:latest glxinfo -B. Find OpenGL renderer string. llvmpipe is software rendering.The interface flickers, is too large, or the 3D view flashes black: Add -e QT_SCALE_FACTOR=1. Use a smaller window.
The Load dialog is empty, or the log is not found:
$LOGS is an absolute path to a directory that exists.log_file as a container path (/mbari/LRAUV/...).docker run --rm -v "$LOGS:/mbari/LRAUV:ro" --entrypoint ls mbari/tethystales:latest /mbari/LRAUV.The vehicle jumps between two tracks: Another computer sends Tethys Tales data into your RViz2. Keep -e ROS_LOCALHOST_ONLY=1, or set a different -e ROS_DOMAIN_ID=<number>.
Playback is slow: Use the command for your GPU. Set a larger downsample_factor.
| Tag | Contents |
|---|---|
latest | ROS 2 Humble, Ubuntu 22.04, linux/amd64. Built from commit e20b258. |
Content type
Image
Digest
sha256:45574a40f…
Size
416.3 MB
Last updated
4 days ago
docker pull mbari/tethystales