I am working on the Rosject for ROS2 Basics (C++) Course. The very first step states to type this in the terminal window: source ~/simulation_ws/install/setup.bash
After typing this, the following error message is shown:
After launching the simulation with ros2 launch turtlebot3_gazebo main_turtlebot3_lab.launch.xml, a bunch of errors come up relating to missing robot models:
And when the simulation loaded, the robot seems to be missing a lot of textures:
I am unsure if the missing model config errors when launching the simulation and the robot missing textures are related to the first issue of sourcing the setup.bash, so I would like to figure out that first issue first. Any advice is appreciated. Thanks.
Thanks @roalgoal. I still think there is a problem with sourcing ~/simulation_ws/install/setup.bash. It looks like local_setup.bash is not found in the ros2_ws.
I’m having a different issue. The verbose it fixed but i get an error running the teleop.
user:~$ ros2 run teleop_twist_keyboard teleop_twist_keyboard
Traceback (most recent call last):
File "/opt/ros/foxy/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')()
File "/opt/ros/foxy/lib/python3.8/site-packages/teleop_twist_keyboard.py", line 138, in main
pub = node.create_publisher(geometry_msgs.msg.Twist, 'cmd_vel', 10)
File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/node.py", line 1140, in create_publisher
check_for_type_support(msg_type)
File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/type_support.py", line 20, in check_for_type_support
ts = msg_type.__class__._TYPE_SUPPORT
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.
The issue you are seeing is not related to a simulation, but rather the teleop_twist_keyboard
The error message suggests the terminal where you are running that program has sourced ROS 1 (noetic) rather than ROS 2 (foxy). These distributions are both installed in the project rosject.
What you need to do is simply run it in a new terminal. By default, Foxy is sourced.