xArm-Developer / xarm_ros2

ROS2 developer packages for robotic products from UFACTORY
https://www.ufactory.cc/pages/xarm
BSD 3-Clause "New" or "Revised" License
102 stars 58 forks source link

Gazebo Model spawn service failed #26

Closed aleenalentin closed 1 year ago

aleenalentin commented 1 year ago

I am getting the following error when I launched this command

ros2 launch xarm_gazebo xarm6_beside_table_gazebo.launch.py
[spawn_entity.py-4] [INFO] [1675794290.587042536] [spawn_entity]: Waiting for entity xml on robot_description

[spawn_entity.py-4] [INFO] [1675794290.604075483] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30

[spawn_entity.py-4] [INFO] [1675794290.605187174] [spawn_entity]: Waiting for service /spawn_entity

[spawn_entity.py-4] [ERROR] [1675794321.358937337] [spawn_entity]: Service %s/spawn_entity unavailable. Was Gazebo started with GazeboRosFactory?

[spawn_entity.py-4] [ERROR] [1675794321.359650307] [spawn_entity]: Spawn service failed. Exiting.

[ERROR] [spawn_entity.py-4]: process has died [pid 60610, exit code 1, cmd '/opt/ros/humble/lib/gazebo_ros/spawn_entity.py -topic robot_description -entity xarm6 -x -0.2 -y -0.5 -z 1.021 -Y 1.571 --ros-args --params-file /tmp/launch_params_00youayy'].

Any fix will be appreciated

Using: Ubuntu 22.04 ROS 2 Humble

aleenalentin commented 1 year ago

Update: It is working now

Initially, when we launch the command, the robot model spawning is failed but after some time the table appears in Gazebo. I have relaunched the command and then robot spawning is working. It seems like if the table model is in the MODEL path, the spawning will be always successful