-
Notifications
You must be signed in to change notification settings - Fork 1
Troubleshooting
Mo Chen edited this page Jan 6, 2025
·
1 revision
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
Make sure cyclonedds.xml
has the correct network interface. See setting up the host computer
This is likely due to misconfigured network parameters in ~/.bashrc
Open ~/.bashrc
on both the computer (on the host or inside a dev Container depending on installation) and the robot (on the host)
- Make sure
ROS_DOMAIN_ID
is the same on the computer and robot - 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
- Remove the line from
- If any changes to
~/.bashrc
were made:source ~/.bashrc
ros2 daemon stop
- Test the new configuration: Make sure the correct nodes or topics (on both the computer and robot) are detected by
ros2 node list
orros2 topic list
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.
First, Ctrl+C
in all terminals, and then ros2 node list
. Close any nodes that are still running.
- Run
ps -a
to find running processes, andpkill -9 <process>
to kill them - If needed, run
htop
and search through the list to find processes that need to be killed -
ros2 node list
should no longer show any output
- 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 ifcolcon build
was run with--symlink-install
)
-
- If an error saying some file in the
build/
orinstall/
directory is not found, tryrm -rf build/<package> install/<package>
- Whenever something like a parameter or launch file is removed, this may be needed.