Spawning baxter.urdf not possible - Gazebo doesn't start: "Waiting for service.."
Hello,
I just followed this tutorial:
http://gazebosim.org/tutorials?tut=ros_roslaunch#URDFExamplewithBaxter
First I typed in the terminal:
git clone https://github.com/RethinkRobotics/baxter_common.git
After that I tried to use the following command in the tutorial:
rosrun gazebo_ros spawn_model -file `rospack find baxter_description`/urdf/baxter.urdf -urdf -z 1 -model baxter
So this happens:
[rospack] Error: package 'baxter_description' not found
SpawnModel script started
[INFO] [1546435163.252531]: Loading model XML from file
[ERROR] [1546435163.253191]: Error: file does not exist /urdf/baxter.urdf
I changed the command with the absolut directory to:
rosrun gazebo_ros spawn_model -file /home/MYUSERNAME/baxter_common/baxter_description/urdf/baxter.urdf -urdf -z 1 -model baxter
But then Gazebo doesnt start and hang at Waiting for service:
SpawnModel script started
[INFO] [1546435269.803023]: Loading model XML from file
[INFO] [1546435269.803909]: Waiting for service /gazebo/spawn_urdf_model
I am a very new beginner and thankful for every help.
Asked by 12melvin on 2019-01-02 08:24:38 UTC
Answers
I had the same problem, and finally got it. Make sure you source the setup.bash of your workspace where you saved baxter package. First you should open a terminal and source the setup.bash of your ros distro (in my case is kinetic) and open gazebo, then open a new terminal and do the same for your workspace where you have baxter package and finally run the spawn command. Like this:
-Terminal 1-
$ source /opt/ros/"YourRosDistro"/setup.bash
$ roslaunch gazebo_ros empty_world.launch (or maybe you prefer to run gazebo with another world)
-Terminal 2-
$ source ~/"PathToYourWorkspace"/devel/setup.bash
$ rosrun gazebo_ros spawn_model -file rospack find baxter_description
/urdf/baxter.urdf -urdf -z 1 -model baxter
This would work, check out this website where I found the solution for any doubt https://forum.humanbrainproject.eu/t/waiting-for-service-gazebo-spawn-urdf-model/468
Asked by magole on 2019-01-22 05:34:52 UTC
Comments