Skip to main content
Resolve ROS2-specific issues with topics, nodes, and package discovery.

ROS2 topics not visible

Symptoms:
  • ros2 topic list shows nothing
  • Nodes not communicating
The domain ID isolates ROS2 networks:
echo $ROS_DOMAIN_ID
# Should output: 30

export ROS_DOMAIN_ID=30
All nodes must use the same ROS_DOMAIN_ID to communicate.
Ensure ROS2 environment is properly sourced:
source /opt/ros/jazzy/setup.bash
source /workspace/turtlebot3_ws/install/setup.bash
# Or use: sb
You must source the workspace in every new terminal.
Topics only appear when nodes are publishing them:
ros2 node list
# Should see nodes if simulation is running
If no nodes are listed, start the simulation first with tb3_empty.

Package not found

Symptoms:
  • “Package ‘turtlebot3_XXX’ not found”
  • Cannot launch nodes
This usually means the workspace wasn’t built successfully or wasn’t sourced in the current terminal.
1

Rebuild workspace

cd /workspace/turtlebot3_ws
colcon build --symlink-install
source install/setup.bash
2

Verify package exists

ros2 pkg list | grep turtlebot3
ls /workspace/turtlebot3_ws/src
You should see all TurtleBot3 packages listed.
3

Re-clone repositories if missing

cd /workspace/turtlebot3_ws/src
rm -rf turtlebot3*
bash /workspace/turtlebot3_ws/.devcontainer/post-create.sh

Build and compilation issues

Symptoms:
  • colcon build fails with errors
  • Compilation errors
Remove build artifacts and rebuild from scratch:
cd /workspace/turtlebot3_ws
rm -rf build install log
colcon build --symlink-install
sudo apt update
rosdep update
rosdep install --from-paths src --ignore-src -r -y
This automatically installs all dependencies declared in package.xml files.
See detailed compilation messages:
colcon build --symlink-install --event-handlers console_direct+
Isolate which package is failing:
colcon build --packages-select turtlebot3_gazebo

Dependency errors

If you get errors about missing ROS2 packages:
# Update rosdep
rosdep update

# Install all dependencies
cd /workspace/turtlebot3_ws
rosdep install --from-paths src --ignore-src -y -r

# Install specific package if needed
sudo apt install ros-jazzy-<package-name>

Node communication issues

If nodes are running but not communicating:
  1. Check ROS_DOMAIN_ID matches across all terminals
  2. Verify DDS implementation:
    echo $RMW_IMPLEMENTATION
    # Should be: rmw_cyclonedds_cpp
    
  3. Check topic names - ensure publisher and subscriber use exact same name
  4. Verify message types match between publisher and subscriber

Service or action not available

If you get “service not available” or “action server not available”:
# List all available services
ros2 service list

# List all available actions
ros2 action list

# Check if the server node is running
ros2 node list
Make sure the node providing the service/action is actually running.

Nuclear option: Complete reset

When nothing else works:
1

Close VS Code

Exit VS Code completely.
2

Stop all containers

docker stop $(docker ps -aq)
3

Remove containers

docker rm $(docker ps -aq)
4

Remove volumes (optional)

This will delete container data. Your workspace files are safe but container configuration will reset.
docker volume prune
5

Restart Docker Desktop

Quit and restart Docker Desktop completely.
6

Rebuild container

  • Open project in VS Code
  • Press F1 → “Dev Containers: Rebuild Container Without Cache”

Build docs developers (and LLMs) love