While working on Unit 2 of Advanced Navigation, I encountered multiple issues related to environment setup and launching navigation components.
Sourcing setup.bash results in environment conflict:
ROS_DISTRO was set to 'galactic' before. Please make sure that the environment does not mix paths from different distributions.
ROS_DISTRO was set to 'noetic' before. Please make sure that the environment does not mix paths from different distributions.
This suggests a conflict between ROS1 (Noetic) and ROS2 (Galactic) environment variables.
Launching navigation.launch fails:
[ERROR] [map_server-1]: process has died [pid 1447, exit code 127, cmd '/opt/ros/galactic/lib/nav2_map_server/map_server --ros-args -r__node:=map_server --params-file /tmp/launch_params_gu9tv2xa --params-file /tmp/launch_params_kdiu83qx'].
Running teleop_twist_keyboard results in message type error:
Traceback (most recent call last):
File "/opt/ros/galactic/lib/teleop_twist_keyboard/teleop_twist_keyboard", line 11, in <module>
load_entry_point('teleop-twist-keyboard==2.3.2', 'console_scripts', 'teleop_twist_keyboard')()
...
AttributeError: type object 'type' has no attribute '_TYPE_SUPPORT' This might be a ROS 1 message type but it should be a ROS 2 message type. Make sure to source your ROS 2 workspace after your ROS 1 workspace.
This might be due to an improper sourcing order between ROS1 and ROS2 workspaces.