Launch Gazebo and RViz at 2.2.2 End

after a long time I have started the course again.

The start of
ros2 launch my_box_bot_gazebo spawn_robot_ros2.launch.xml
at end of Chapter 2.2.2 ends in

invalid_launch_file_error.InvalidLaunchFileError: Caught exception when trying to load file of format [py]: launch file at '/home/user/ros2_ws/install/my_box_bot_description/share/my_box_bot_description/launch/' does not contain the required function 'generate_launch_description()'

the logfile is pretty empty. is there a way to debug/find what I may have missed after a long time ?

e.g. could you kindly post the link to the solution ?

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


Here you have the git with the solutions: GIT SOLUTIONS

It might be that you didn’t create correctly the

Have a look at the notebook showing how this is done please.

Hi duckfrost2,
the error is gone but the rviz and gazebo view is empty.
I get this warning in second terminal
[1.114s] WARNING:colcon.colcon_core.verb:Some selected packages are already built in one or more underlay workspaces:
‘my_box_bot_description’ is in: /home/user/ros2_ws/install/my_box_bot_description
‘my_box_bot_gazebo’ is in: /home/user/ros2_ws/install/my_box_bot_gazebo
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their includedirectories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:
–allow-overriding my_box_bot_description my_box_bot_gazebo

And many of these
No transform from [base_link] to [map]

What should actually publish the base link information ?


The base_link information I suppose you refer to the TF? Thats the robot_state_publisher the one in charge of that.

As for those warnings, it just state that you compiled them before of that you have something built previously
Don’t worry about that.

As for the mapfram reference, that’s probably because you have for some reason in RVIZ set the fixed frame as map.

If you continue having issues please post some images, videos or your code so we can help you better, because without more info an details its very difficult to help you

to reproduce the error I have started from the beginning again and it looks like even for box_bot_simple something is not published.
Thought you could see inside my rosjects…Attached as zip with a screenshot showing the error in rvizz and your bot in an URDF viewer.

Looks like there is something missing in the links of the urdf

not sure how to upload code


First of all :slight_smile:

  1. The fixed frame shouldn’t be map, unless you are using navigation. Use a frame that exists, like base_link or whatever.

  2. If you are in the course, is very important that the meshes are extracted form a certain package, because its strange that the main body doesn’t appear

  3. As for how to share the code, the Best would be to create a rosject in ROSDevelopementStudio ROSJectCreate or through a git.

Share at least the urdf or something, maybe we can have a look.


rviz2 doesn’t allow me to change the fixed frame setting how could I do that ?

probably there is something wrong about the Rosject of me doing the codurse. Is there a way to reset ?

I have created the rosject AskingForHelp where you could see the src files and even reproduce the issue.


You didnt add the link to the ROSject.

To change the fixed frame , you cantype it. It doesn’t allow to select because probably you are not publishing any TF.

oh okay here the link

publishing a TF is probably not metioned in the course so far !?


I have tested the ROsject an the followed the instructions to left in the notebook and it works as expected.

Th reason why it doesn’t appear is because you didn’t set in RVIZ2 the correct configuration for the robot_description topic in the robot model element. Here you have an image showing how to set it. You have to set the topic name to /robot_description and the durability_policy to transient_local

Hope it helps. Any other question please let us know

This topic was automatically closed after 3 days. New replies are no longer allowed.