Skip to content

Troubleshooting

Mo Chen edited this page Jan 6, 2025 · 1 revision

RMW errors

For example, ros2 topic list hangs or shows the following error:

1733788387.583485 [22]       ros2: enp62s0: does not match an available interface.
[ERROR] [1733788387.583534772] [rmw_cyclonedds_cpp]: rmw_create_node: failed to create domain, error Error

>>> [rcutils|error_handling.c:108] rcutils_set_error_state()
This error state is being overwritten:

  'error not set, at ./src/rcl/node.c:263'

with this new error message:

  'rcl node's rmw handle is invalid, at ./src/rcl/node.c:415'

rcutils_reset_error() should be called after error handling to avoid this.
<<<
[ERROR] [1733788387.583570769] [rcl]: Failed to fini publisher for node: 1
error creating node: rcl node's rmw handle is invalid, at ./src/rcl/node.c:415

Solution

Make sure cyclonedds.xml has the correct network interface. See setting up the host computer

Robot and computer are not seeing each other's topics

This is likely due to misconfigured network parameters in ~/.bashrc

Solution

Open ~/.bashrc on both the computer (on the host or inside a dev Container depending on installation) and the robot (on the host)

  1. Make sure ROS_DOMAIN_ID is the same on the computer and robot
  2. If there is a line that says export ROS_LOCALHOST_ONLY=1...
    • Remove the line from ~/.bashrc
    • In the terminal, unset the environment variable: unset ROS_LOCALHOST_ONLY
  3. If any changes to ~/.bashrc were made:
    • source ~/.bashrc
    • ros2 daemon stop
  4. Test the new configuration: Make sure the correct nodes or topics (on both the computer and robot) are detected by ros2 node list or ros2 topic list

Random lidar points all over the map

Sometimes, random lidar points would show up all over the map. This is due to extra lidar nodes running in the background. To fix this, make sure there are no nodes running when no nodes have been started. In general, this is good to check.

Solution

First, Ctrl+C in all terminals, and then ros2 node list. Close any nodes that are still running.

  1. Run ps -a to find running processes, and pkill -9 <process> to kill them
  2. If needed, run htop and search through the list to find processes that need to be killed
  3. ros2 node list should no longer show any output

launch file, executable, etc. not found in some package

Solution

  • The following should be done in the workspace folder (e.g. ros2_ws)
  • Build the package again: colcon build --symlink-install --packages-select <package>
    • colcon build is needed whenever certain new files, like nodes or launch files are introduced to the package (but not needed when we just modify python files if colcon build was run with --symlink-install)
  • If an error saying some file in the build/ or install/ directory is not found, try rm -rf build/<package> install/<package>
    • Whenever something like a parameter or launch file is removed, this may be needed.