Robotics StackExchange | Archived questions

Was Gazebo started with GazeboRosFactory? error when launching urdf file

I'm trying to spawn my robot in Gazebo by using the following command:

ros2 run gazebo_ros spawn_entity.py -entity myentity -x 0 -y 0 -z 0 -file WorkSpace/src/urdf_screencast/urdf/urdf_screencast.urdf

In this command, I substituted WorkSpace with the path to the ROS workspace. When I execute this command, after waiting for the service /spawn_entity, it appears to have the error that gives the name to this post.

Asked by pablo.arandarod on 2021-03-18 15:57:21 UTC

Comments

Answers

Make sure you load the libgazebo_ros libraries in Gazebo, e.g., gazebo -s libgazebo_ros_init.so -s libgazebo_ros_factory.so myworld.world

Asked by clyde on 2021-03-24 12:07:43 UTC

Comments

This worked for me

Asked by _Chris on 2021-12-03 08:41:06 UTC

Also worked for me.

I worked with the docker image osrf/ros:galactic-desktop, have got this error. Then executed this command in the second terminal (after source ros_entrypoint.sh), and spawned the robot successfully.

Thanks!

Asked by Seffo on 2023-01-06 07:37:48 UTC