Gazebo doesn't spawn my xacro model. What's the problem? [closed]

asked 2021-04-12 02:47:12 -0500

AndreaRossss gravatar image

Hi everybody,

I am trying to spawn a urdf.xacro model on gazebo for two weeks, but something is going wrong and I do not know what.

The model is perfectly working in Rviz as well as the "revolute" joints. Moreover, when I launch the model the output (below) doesn't show any error.

In the beginning, I thought it was a problem related to the syntax of my xacro model, but if I simplify the model to a few pieces it doesn't work anyway. Then, I tried to launch the xacro model in the tutorials (r2d2 tutorial) and it worked. Doing some experiments I noticed that if I remove one of the two legs of the robot the model spawn anyway, while if I remove both of the r2d2 legs (line 120, 121) the model doesn't spawn anymore, what's the meaning of this?

If you want to give a look at the code:

launch file

xacro model I'm trying to spawn

package.xml

If you want to give it a try just run this script (you need the environment installed): script.sh

I am using ROS melodic and Gazebo 9.0 and Ubuntu 18.04 bionic

output:

   when processing file: /home/[user]/catkin_ws/src/cricket_robot/cricket_description/urdf/fake_cricket_robot.urdf.xacro
xacro.py is deprecated; please use xacro instead
started roslaunch server http://[user]:36843/

SUMMARY
========

PARAMETERS
 * /gazebo/enable_ros_network: True
 * /robot_description: <?xml version="1....
 * /robot_state_publisher/publish_frequency: 30.0
 * /rosdistro: melodic
 * /rosversion: 1.14.10
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    urdf_spawner (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [14571]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 627e6c46-9b57-11eb-854c-fcf8aece3038
process[rosout-1]: started with pid [14715]
started core service [/rosout]
process[gazebo-2]: started with pid [14718]
process[gazebo_gui-3]: started with pid [14729]
process[urdf_spawner-4]: started with pid [14734]
process[robot_state_publisher-5]: started with pid [14735]
[ INFO] [1618208520.194157846]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1618208520.196876588]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[ INFO] [1618208520.247758337]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1618208520.249484144]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1618208520.861148814]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1618208520.904280111, 0.030000000]: Physics dynamic reconfigure ready.
[INFO] [1618208521.021574, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1618208521.036579, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1618208521.039967, 0.000000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1618208521.311782, 0.317000]: Spawn status: SpawnModel: Successfully spawned entity
[INFO] [1618208521.313328, 0.317000]: Unpausing physics
[ INFO] [1618208521.406433616, 0.317000000]: Loading gazebo_ros_control plugin
[ INFO] [1618208521.406681629, 0.317000000]: Starting gazebo_ros_control plugin in namespace: /
[ INFO] [1618208521.408502441, 0.317000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [robot_description] on the ROS param server.
[ INFO] [1618208521.554816939, 0.317000000]: Loaded gazebo_ros_control.
[urdf_spawner-4] process has finished cleanly
log file: /home/[user]/.ros/log/627e6c46-9b57-11eb-854c-fcf8aece3038/urdf_spawner-4*.log

the log file at the end shows no differences when gazebo spawns the model and when ... (more)

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by AndreaRossss
close date 2021-04-12 10:50:02.157179

Comments

I can't add tags

AndreaRossss gravatar image AndreaRossss  ( 2021-04-12 02:50:05 -0500 )edit