add srdf file to gazebo empty_world
I would like to simply load a srdf file to Gazebo instead of an URDF file. I followed a simple Gazebo tutorial that instructs me on how to launch an URDF file using the following commands:
Terminal 1:
roslaunch gazebo_ros empty_world.launch
Terminal 2:
rosrun gazebo_ros spawn_model -file `rospack find robot_pkg`/urdf/MYROBOT.urdf -urdf -model MYROBOT
This spawns the robot in Gazebo but not without fidgeting completely (possibly due to self-collisions) and jumping 1000 ft in the air. So I am trying to load a SRDF file instead with the following commands:
Terminal 1:
roslaunch gazebo_ros empty_world.launch
Terminal 2:
rosrun gazebo_ros spawn_model -file `rospack find robot_config`/config/MYROBOT.srdf -sdf -model MYROBOT
When I hit enter on Terminal 2, the following occurs:
SpawnModel script started
[INFO] [1503422995.443726, 0.000000]: Loading model XML from file
[INFO] [1503422995.444003, 0.000000]: Waiting for service /gazebo/spawn_sdf_model
[INFO] [1503422995.444960, 0.000000]: Calling service /gazebo/spawn_sdf_model
[INFO] [1503423005.472383, 16.663000]: Spawn status: SpawnModel: Entity pushed to spawn queue, but spawn service timed out waiting for entity to appear in simulation under the name kr500
Then Terminal 1 reads
Error: No link elements found in urdf file
at line 180 in /build/urdfdom-UJ3kd6/urdfdom-0.4.1/urdf_parser/src/model.cpp
Error [parser_urdf.cc:3408] Unable to call parseURDF on robot model
Error [parser.cc:340] parse as old deprecated model file failed.
What doesn't make sense is why the tutorial tells me I should be able to simply load up a SRDF file. I looked over the parameters to run on the terminal and they appear correct. Only terminal 1 should be calling parseSDF not parseURDF. Maybe this is my problem. But I'm not instructed on what commands to run so any further knowledge on the command to load a SDF file would be helpful.