Simulation not launching ROS2 Basics In 5 Days

I am using the command:

source /opt/ros/noetic/setup.bash
source ~/simulation_ws/devel/setup.bash
rosrun turtlebot3_teleop turtlebot3_teleop_key

to launch the gazebo simulation from the terminal in the ROS 2 basics in 5 days Rosject, but the simulation is not launching. Even when I click the gazebo icon, the window just appears greyed out. Could anyone advise where I am going wrong?

Hello @scj,
I would like to understand your issue, your Course Tag says that you are in ROS Basics in 5 Days, as well as the code you provided seems to be ROS1 but then you say “in the ROS 2 Basics …”.

I will assume that you are in the ROS version.

I think the issue here is that you are making a mistake writing the command.

You are using rosrun, so you should be adding as an argument the name of a python file with executable permission.
In this case, the easiest way to launch Gazebo, as you are using the turtlebot3 package, is to one of the launchs provided as examples inside this package.

In order to do that, instead of using rosrun (normally launches a node), you can use roslaunch adding a .launch file, which inside could call several nodes, services, etc.

Here is an example of ussage:

roslaunch <package_name> <name_of_the_launch_file>.launch

Feel free to discover the package of Turtlebot3, and if you can’t find any launch files that satisfy your issue, ask again and will kindly give you more tips, but it is better that you try to find it out by yourself first!

Hope I explained it clearly.
Have a great day,

I am doing the ROS2 course - I have now updated the tag to show this. I am copying and pasting the command from the Jupiter notebook provided with the Rosject, but it is not launching the simulation.

Then the issue is how you are writing the command.
In ROS it was rosrun, but in ROS2 it is written differently:

ros2 run <package_name> <executable_file>

Could you try using ros2 run instead of rosrun?

I’m copying and pasting the command directly from the Jupiter notebook accompanying the Rosject

Its is strange…
Are you sure you are at the correct Jupyter Notebook? I have just opened the notebook of "ROS2 Basics in 5 Days Humble (Python) and it is well written:

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