ROS2 Basics in 5 days C++ course project: errors when starting the Gazebo simulation and trying to launch teleop_keyboard

I just created a fresh copy of the course project for the “ROS2 Basics in 5 Days” course and started following the first steps of the course description. Unfortunately they do not work as described:

  1. When executing “source ~/simulation_ws/install/setup.bash” I get the first error “not found: “/home/user/ros2_ws/install/turtlebot3_node/share/turtlebot3_node/local_setup.bash””

  2. When executing “ros2 launch turtlebot3_gazebo main_turtlebot3_lab.launch.xml” the Gazebo simulation launches, however there are several error messages in the terminal

  3. When executing “source ros2_ws/install/setup.bash” I get the same error “not found: “/home/user/ros2_ws/install/turtlebot3_node/share/turtlebot3_node/local_setup.bash””

  4. When executing “ros2 run turtlebot3_teleop teleop_keyboard” this does not work and I get the following output in the terminal:
    user:~$ ros2 run turtlebot3_teleop teleop_keyboard
    Traceback (most recent call last):
    File “/home/user/ros2_ws/install/turtlebot3_teleop/lib/turtlebot3_teleop/teleop_keyboard”, line 33, in
    sys.exit(load_entry_point(‘turtlebot3-teleop==2.1.1’, ‘console_scripts’, ‘teleop_keyboard’)())
    File “/home/user/ros2_ws/install/turtlebot3_teleop/lib/turtlebot3_teleop/teleop_keyboard”, line 25, in importlib_load_entry_point
    return next(matches).load()
    File “/usr/lib/python3.8/importlib/”, line 77, in load
    module = import_module(‘module’))
    File “/usr/lib/python3.8/importlib/”, line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File “”, line 1014, in _gcd_import
    File “”, line 991, in _find_and_load
    File “”, line 975, in _find_and_load_unlocked
    File “”, line 671, in _load_unlocked
    File “”, line 848, in exec_module
    File “”, line 219, in _call_with_frames_removed
    File “/home/user/ros2_ws/install/turtlebot3_teleop/lib/python3.8/site-packages/turtlebot3_teleop/script/”, line 60, in
    File “/usr/lib/python3.8/”, line 675, in getitem
    raise KeyError(key) from None
    KeyError: ‘TURTLEBOT3_MODEL’

How do I get this running in order to test my own package?

Thank you

Hi Ralf,

I apologize for this glitch. It is not working indeed. Let us work on it and get back to you.

In the meantime, please proceed with the course. You can come back at any time to do the project.

The errors you are showing do not affect the simulation. They are gazebo messages asking for some models (which aren’t used here) and can’t find them.

As for the teleop, try the generic:

ros2 run teleop_twist_keyboard teleop_twist_keyboard

I will make these modifications in the notebook to avoid confusion. In order to get the changes, you’ll need to re-fork the rosject.

1 Like

Thank you! With this command I can operate the turtlebot in the Gazebo simulation.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.