Home | Tutorials | Wiki | Issues
Ask Your Question
0

Gazebo 1.9.1 problem with robot spawn

asked 2013-10-08 03:38:33 -0500

sotiris gravatar image

updated 2013-10-08 03:39:59 -0500

Hey everyone!

I recently installed ROS Hydro (alongside my older Groovy) and installed the Gazebo 1.9 (I wasn't using Gazebo before, so I didn't uninstall anything). I went through the tutorial (ROS Integration) and while the worlds seem to work fine, when I went the part about spawning a model (baxter in particular, as suggested by the tutorial) I get the following message:

sotiris@sotiris-Studio-XPS-435MT:~/catkin_gazebo_ws/src$ rosrun gazebo_ros spawn_model -file ~/baxter_common/baxter_description/urdf/baxter.urdf -urdf -z 1 -model baxter

Traceback (most recent call last):
  File "/home/sotiris/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/scripts/spawn_model", line 25, in <module>
    from gazebo_ros import gazebo_interface

  File "/opt/ros/hydro/lib/python2.7/dist-packages/gazebo_ros/gazebo_interface.py", line 8, in <module>
    from gazebo_msgs.msg import *

ImportError: No module named msg

Initially, the command

rosrun gazebo_ros spawn_model -file `rospack find baxter_description`/urdf/baxter.urdf -urdf -z 1 -model baxter

couldn't locate the baxter_description, so I inserted the path.

When I try the PR2 spawn (inserting the code in the launch file) I get the same, the world launches but the robot doesn't spawn:

    sotiris@sotiris-Studio-XPS-435MT:~$ roslaunch test_gazebo test.launch
... logging to /home/sotiris/.ros/log/c60c3df2-2fc5-11e3-b14c-00219b1b1128/roslaunch-sotiris-Studio-XPS-435MT-8914.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://sotiris-Studio-XPS-435MT:56876/

SUMMARY
========

PARAMETERS
 * /robot_description
 * /rosdistro
 * /rosversion
 * /use_sim_time

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    spawn_urdf (gazebo_ros/spawn_model)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[gazebo-1]: started with pid [8935]
process[gazebo_gui-2]: started with pid [8940]
process[spawn_urdf-3]: started with pid [8947]
Gazebo multi-robot simulator, version 1.9.1
Copyright (C) 2013 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

Gazebo multi-robot simulator, version 1.9.1
Copyright (C) 2013 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

    Traceback (most recent call last):
  File "/home/sotiris/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/scripts/spawn_model", line 25, in <module>
    from gazebo_ros import gazebo_interface
  File "/opt/ros/hydro/lib/python2.7/dist-packages/gazebo_ros/gazebo_interface.py", line 8, in <module>
    from gazebo_msgs.msg import *
ImportError: No module named msg
Msg Waiting for master.[spawn_urdf-3] process has died [pid 8947, exit code 1, cmd /home/sotiris/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/scripts/spawn_model -param robot_description -urdf -model pr2 __name:=spawn_urdf __log:=/home/sotiris/.ros/log/c60c3df2-2fc5-11e3-b14c-00219b1b1128/spawn_urdf-3.log].
log file: /home/sotiris/.ros/log/c60c3df2-2fc5-11e3-b14c-00219b1b1128/spawn_urdf-3*.log
[ INFO] [1381221130.886877208]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1381221130.887833830]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 166.111.74.103

Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 166.111.74.103
[ INFO] [1381221131.804813679, 0.024000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1381221131.856130891, 0.074000000]: Physics dynamic reconfigure ready.

Does someone know what the issue is?

Thank you!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-10-10 11:00:24 -0500

nkoenig gravatar image

Try running sudo apt-get install ros-hydro-gazebo-msgs

edit flag offensive delete link more
0

answered 2013-10-11 02:30:57 -0500

sotiris gravatar image

I tried to do it, but it wouldn't work. After trying to spawn, I got the same messages as above... Could it be because I had Groovy and then installed Hydro too?

edit flag offensive delete link more

Comments

I don't know, but I have kinetic and didn't install any other thing but have the same problem right now

Delnia gravatar imageDelnia ( 2017-05-21 23:59:41 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-10-08 03:38:33 -0500

Seen: 1,809 times

Last updated: Oct 11 '13