-
Notifications
You must be signed in to change notification settings - Fork 2
ROS2 Troubleshooting
Some errors happens frequently with ROS 2. Here are a few ways to solve some errors
I often got the following error when I built packages that contains custom messages definitions :
Traceback (most recent call last):
File "/opt/ros/humble/share/rosidl_generator_py/cmake/../../../lib/rosidl_generator_py/rosidl_generator_py", line 8, in <module>
from rosidl_generator_py import generate_py
ImportError: cannot import name 'generate_py'
In the package's CMakeLists.txt
, comment the following line:
find_package(rosidl_default_generators REQUIRED)
# find_package(rosidl_default_generators REQUIRED)
Here is a list of Python dependencies that are understood by rosdep
https://github.com/ros/rosdistro/blob/master/rosdep/python.yaml
There is an article about rosbags in ROS 2 here
To enable coloured ROS 2 logs in your terminal, set export RCUTILS_COLORIZED_OUTPUT=1
(or put it in your .bashrc to get it each time you boot!)
No topics are listed on a remote device despite the correct ROS_DOMAIN_ID
being set. This only happens for topics published by nodes started by a service.
Adding a 10-second delay to the startup script seems to solve the issue. However, a better solution is desired, understanding better what's happening under the hood with startup services.
After booting, the startup service launches correctly, and the topics can be listed locally (or through ssh).
If the service is restarted manually with sudo systemctl restart startup-script.service
, the topics stop being visible locally and occasionally start to appear remotely.
(node that the reason why this works is not yet fully understood)
- Place this .xml dds configuration into ~/.ros/fastdds.xml
- Add these two lines to the .bashrc file after sourcing ros setup files:
export FASTRTPS_DEFAULT_PROFILES_FILE=~/.ros/fastdds.xml export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- Reboot
- Warthog Teach and Repeat (ROS1)
- Warthog Teach and Repeat (ROS2)
- Time Synchronization (NTP)
- Time Synchronization (PTP)
- Deployment of Robotic Total Stations (RTS)
- Deployment of the backpack GPS
- Warthog Emlid GPS
- Atlans-C INS
- How to use a CB Radio when going in the forest
- IP forwarding
- Emlid Data Postprocessing (PPK)
- Setting up a reliable robot communication with Zenoh
- Lessons Learned
- Robots' 3D Models
- Order Management
- Fast track Master → PhD
- Intellectual Property
- Repository Guidelines
- TF Cheatsheet
- Montmorency Forest Wintertime Dataset
- RTS-GT Dataset 2023
- Deschenes2021 Dataset
- TIGS Dataset
- DRIVE Datasets
- BorealHDR
- TimberSeg 1.0
- DARPA Subterranean Challenge - Urban Dataset
- How to upload a dataset to VALERIA
- ROS1 Bridge
- Migrating a repository to ROS2 (Humble)
- ROS2 and rosbags
- MCAP rosbags
- DDS Configuration (work in progress)
- Using a USB Microphone with ROS2
- ROS2 in VSCode
- ROS2 Troubleshooting