Theme
Stage 1 · lesson 5 of 5 · 25 min

Symptoms that lie

You will: Map the misleading failures of a robotics environment to their real causes.

Builds on Docker, and nothing else.

Robotics stacks are deep, and the failures you see are usually several layers away from what caused them. This project has collected a set of them, and every one looks like something it is not:

You see It is
Gazebo dies with no useful message the Docker VM ran out of memory
RViz: "OpenGL 1.5 is not supported" you are rendering through XQuartz, not the container's own display
gz sim segfaults two incompatible Gazebo libraries, from mixing two apt repositories
a Gazebo error about a mock plugin a stale node from an earlier run published the wrong robot
one controller failed: "switch timed out" a busy machine, not a broken config
ros2 topic list shows nothing while the robot runs stale shared-memory files from a killed process

The habit is the same one you use on any distributed system: when the symptom is in one layer, check the layer below it first, and confirm with a command rather than a theory. Three commands cover most of the table — memory, disk and the port.

Confirming matters more than it sounds. Early in this project a native VNC viewer kept failing to connect, and the first diagnosis read an open TCP connection as a working one. Probing the actual protocol handshake showed the server offering only an authentication type the client refuses. The socket was fine; the conversation never started. A theory is a starting point, not an answer.

In the simulation

A joint that stops short looks like a fault. Here it is a limit, and the habit is the same as in the table: confirm with a number, not a theory. wrist_roll is not symmetric, and the inspector says so.

Kinematic: joints move at their real speed limit, but there is no gravity, no load and no physics. That is what the steps below are for.

The SO-101 loads as you reach it.

In this lesson

  1. Open Inspect, on its /joint_states view.
  2. Drag wrist_roll as far negative as it goes. It stops at −157°, not −180°; read −2.744 rad.
  3. Now as far positive. It stops at +163°, 2.841 rad. Different from the other end, and correct.

Do it

  1. Skim the symptoms this project has already paid for.

    grep "^## " docs/troubleshooting.md
    
  2. Check the three resources behind most of them.

    make doctor
    docker stats --no-stream
    docker system df
    
  3. See what, if anything, is holding the project's port.

    lsof -nP -iTCP:8106 -sTCP:LISTEN
    

    Expect: Docker's process, if the container is up; otherwise nothing.

  4. Confirm Gazebo comes from exactly one apt source, then leave the shell.

    make shell
    apt-cache policy ros-jazzy-gz-sim-vendor | grep -c osrfoundation
    exit
    

    Expect: 0. Anything else is the segfault waiting to happen. Then, as the shell closes, a line like make: *** [shell] Error 1, and Docker Desktop may add a hint about debugging a Compose error. Nothing failed. grep -c exits with status 1 when it counts no matches, exit hands the shell's last status to make, and make reports any status but zero as an error. That is a symptom that lies, in the lesson about them.

You will know it worked when: For each row of the table, you can name the real cause and the command that would confirm it.

When it goes wrong

You fixed the cause, and the failure is still reported.

Why: Something cached the old result — test result files, a stale node, a container that never restarted.

Fix: make stop before relaunching; make test and make lint clear old results themselves.

Terms

OOM kill
The kernel terminating a process because memory ran out. Inside a Docker VM it leaves the process no chance to log why.
ABI mismatch
Two binaries compiled against incompatible versions of a library. It tends to surface as a crash far from the cause, not as an install error.

Every term in the course: glossary.

Check yourself

Answer in your head first, then open it.

Gazebo exits with no useful message twenty minutes into a run. What is your first command?

make doctor or docker stats --no-stream — memory. An OOM kill leaves no message from the process itself.

On a Mac, RViz says "OpenGL 1.5 is not supported". What happened, and what is the fix?

DISPLAY points at XQuartz, whose indirect GLX tops out near OpenGL 1.4 while RViz needs 3.3. Use the container's own virtual display through make view and the browser at port 8106.

Stretch

Write a troubleshooting entry, in the format of docs/troubleshooting.md, for a misleading failure from your own work: the symptom as you first saw it, what it actually was, and the one command that would have told you sooner.

Going deeper