ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Gazebo dies when openning with PR2 controller

asked 2012-03-20 19:22:21 -0600

Albert K gravatar image

updated 2014-11-22 17:05:11 -0600

ngrennan gravatar image

Dear all:

I was learning arm_navigation, by reading the tutorials. In "Checking a state for validity", I should run :

  export ROBOT=sim
  roslaunch pr2_arm_navigation_tutorials pr2_floorobj_world.launch

but I couldn't open gazebo successfully. Instead, it terminated and showed some messages as follow:

  Traceback (most recent call last):
    File "/opt/ros/electric/stacks/pr2_mechanism/pr2_controller_manager/scripts/spawner", line 159, in <module>
      if __name__ == '__main__': main()
    File "/opt/ros/electric/stacks/pr2_mechanism/pr2_controller_manager/scripts/spawner", line 137, in main
resp = load_controller(name)
    File "/opt/ros/electric/stacks/ros_comm/clients/rospy/src/rospy/impl/tcpros_service.py", line 430, in __call__
return self.call(*args, **kwds)
    File "/opt/ros/electric/stacks/ros_comm/clients/rospy/src/rospy/impl/tcpros_service.py", line 519, in call
      raise ServiceException("transport error completing service call: %s"%(str(e)))
  rospy.service.ServiceException: transport error completing service call: unable to receive data from sender, check sender's logs for details
  [WARN] [WallTime: 1332306075.862983] [4.181000] Spawner couldn't reach       pr2_controller_manager to take down controllers.
  [gazebo-2] process has died [pid 32591, exit code -11].
  log files: /home/albert/.ros/log/dd42c886-7312-11e1-bef1-5404a6dc3a5e/gazebo-2*.log
  [default_controllers_spawner-23] process has died [pid 32680, exit code 1].
  log files: /home/albert/.ros/log/dd42c886-7312-11e1-bef1-5404a6dc3a5e/default_controllers_spawner-23*.log

I could see pr2 in gazebo for a second and then the process died, and the program was closed immediately

I can run it on my laptop, but get this problem on my PC. My OS is ubuntu 10.10, and I use ros-electric. I'm pretty sure that I've install all the required packages or dependencies.

really appreciate for any help, thanks

edit retag flag offensive close merge delete

Comments

does roslaunch pr2_gazebo pr2_empty_world.launch work for you?

hsu gravatar image hsu  ( 2012-03-21 14:20:08 -0600 )edit

No, it stil terminated with the same error. I think it's because this launch file include pr2_gazebo/pr2.launch , which include pr2_controller_configuration_gazebo/pr2_default_controllers.launch

Albert K gravatar image Albert K  ( 2012-03-21 14:56:17 -0600 )edit

Same problem as here, I'd say (and I also found no solution): http://answers.ros.org/question/28253/rosgazebo-crashes-when-spawing-pr2-robot-model Bug?

AHornung gravatar image AHornung  ( 2012-03-21 23:02:27 -0600 )edit

Actually, this error didn't happen on my computer before.......until one day, I dist-upgrade ros and my Ubuntu. The CPU of my PC is core i5 2450 and GPU is Nvidia GeForce GT 520. I've tried to re-install ros electric and even Ubuntu, but the damage seemed to be irreversible...so weird

Albert K gravatar image Albert K  ( 2012-03-22 01:52:00 -0600 )edit

Same to me. The problem seems come from when I'm using the discrete GPU (Nvidia GT540M), using bumblebee (optirun command). Without discrete GPU I don't get any problems.....

Enea Scioni gravatar image Enea Scioni  ( 2012-03-22 05:13:32 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted
1

answered 2012-03-22 15:25:59 -0600

hsu gravatar image

updated 2012-03-22 20:33:54 -0600

This is probably not an error with the controllers, the error you see is what happens after gazebo segfaults and exits before controllers can be taken down properly. Can you include more of the console outputs?

Does it work with gdb as posted in this question?

On another note, I have seen similar errors when running with nvidia 295.* drivers, the segfault goes away after I downgraded to 285.* drivers. Be careful when downgrading, from experience, 295.* drivers left bits of kernel modules and libraries in miscellaneous places on my system that ultimately confused my system for a while, make sure to uninstall debs:

sudo apt-get remove --purge nvidia-current-updates* nvidia-current*

if you are installing the 285.* drivers manually.

more info on the bug: this is the backtrace I got when I tried 295.20 driver on my oneiric system:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f51f91c7700 (LWP 30795)]
0x00007f5239dc7c0f in _nv022tls () from /usr/lib/tls/libnvidia-tls.so.295.20
(gdb) bt
#0  0x00007f5239dc7c0f in _nv022tls () from /usr/lib/tls/libnvidia-tls.so.295.20
#1  0x00007f523ceb4a01 in ?? () from /usr/lib/libGL.so.1
#2  0x00007f52475ab5a5 in __libc_fork () at ../nptl/sysdeps/unix/sysv/linux/x86_64/../fork.c:95
#3  0x00007f52475687ab in _IO_new_proc_open (fp=0x7f522c307b20, command=0x7f522c4a0478 "ret=\"/opt/ros/electric/stacks/arm_navigation/joint_normalization_filters/default_plugins.xml\" && echo $ret", mode=<optimized out>)
    at iopopen.c:191
#4  0x00007f5247568b01 in _IO_new_popen (command=0x7f522c4a0478 "ret=\"/opt/ros/electric/stacks/arm_navigation/joint_normalization_filters/default_plugins.xml\" && echo $ret", mode=0x7f52463ccb51 "r") at iopopen.c:312
#5  0x00007f52463b85df in rospack::Package::direct_flags (this=0x7f522c07f9b0, lang=..., attrib=...) at /tmp/buildd/ros-electric-ros-1.6.8/debian/ros-electric-ros/opt/ros/electric/ros/tools/rospack/rospack.cpp:584
#6  0x00007f52463bf800 in rospack::Package::plugins (this=0x7f522c441d10) at /tmp/buildd/ros-electric-ros-1.6.8/debian/ros-electric-ros/opt/ros/electric/ros/tools/rospack/rospack.cpp:304
#7  0x00007f52463c0062 in rospack::ROSPack::cmd_plugins (this=0x7f51f91c57e0) at /tmp/buildd/ros-electric-ros-1.6.8/debian/ros-electric-ros/opt/ros/electric/ros/tools/rospack/rospack.cpp:1164
#8  0x00007f52463c2fd7 in rospack::ROSPack::run (this=0x7f51f91c57e0, argc=4, argv=0x7f522c513200) at /tmp/buildd/ros-electric-ros-1.6.8/debian/ros-electric-ros/opt/ros/electric/ros/tools/rospack/rospack.cpp:1438
#9  0x00007f52463c3826 in rospack::ROSPack::run (this=0x7f51f91c57e0, cmd=<optimized out>) at /tmp/buildd/ros-electric-ros-1.6.8/debian/ros-electric-ros/opt/ros/electric/ros/tools/rospack/rospack.cpp:1206
#10 0x00007f5248e43f03 in ros::package::command (_cmd=...) at /tmp/buildd/ros-electric-ros-1.6.8/debian/ros-electric-ros/opt/ros/electric/ros/core/roslib/src/package.cpp:55
#11 0x00007f5248e44245 in ros::package::command (cmd=<optimized out>, output=...) at /tmp/buildd/ros-electric-ros-1.6.8/debian/ros-electric-ros/opt/ros/electric/ros/core/roslib/src/package.cpp:73
#12 0x00007f5248e4478b in ros::package::getPlugins (package=..., attribute=<optimized out>, plugins=...) at /tmp/buildd/ros-electric-ros-1.6.8/debian/ros-electric-ros/opt/ros/electric/ros/core/roslib/src/package.cpp:125
#13 0x00007f5248e4537c in ros::package::getPlugins (package=<optimized out>, attribute=<optimized out>, plugins=...) at /tmp/buildd/ros-electric-ros-1.6.8/debian/ros-electric-ros/opt/ros/electric/ros/core/roslib/src/package.cpp:113
#14 0x00007f51f6733cae in pluginlib ...
(more)
edit flag offensive delete link more

Comments

I tried to follow the steps with gdb. But the second method there has a call to roslaunch with just one argument. That doesn't work since it expects a package name. How do I resolve that problem?

2ROS0 gravatar image 2ROS0  ( 2014-06-24 16:44:10 -0600 )edit
1

answered 2012-03-22 19:30:34 -0600

Albert K gravatar image

Thank you very much, hsu! Gazebo won't terminate when I install another version of the GPU driver. My graphic card is Nvidia GT520, and the driver was version:295.20. On 3/22 Nvidia launch version:295.33. After I re-install and upgrade to the latest version, I can run pr2 in gazebo successfully. I didn't try version:280.* ,but I hope it works for others who had the same problem. By the way, this is really a weird problem. I installed version:295.20 before and there's no problem...until I dist-upgrade my ubuntu and ros-electric some day. I hope that I shouldn't do the same procedure next time I upgrade my system. At last, again thank you very much!

edit flag offensive delete link more

Comments

You can find all versions of nvidia drivers here : http://www.geforce.com/drivers/beta-legacy

Albert K gravatar image Albert K  ( 2012-03-22 19:30:54 -0600 )edit
1

answered 2012-03-28 11:49:07 -0600

ainbro gravatar image

The Nvidia driver update to .33 also solved the issue I had with getting the pr2 simulator up and running.

edit flag offensive delete link more
0

answered 2012-03-21 05:52:13 -0600

Albert K gravatar image

updated 2012-03-21 06:51:28 -0600

I break up the launch files into pieces and find that the problem comes from:

  <node name="default_controllers_spawner"
        pkg="pr2_controller_manager" type="spawner" output="screen"
        args="--wait-for=/calibrated base_controller base_odometry head_traj_controller laser_tilt_controller torso_controller r_gripper_controller l_gripper_controller r_arm_controller l_arm_controller" />

which is a code segment form

  pr2_controller_configuration_gazebo/pr2_default_controllers.launch

I can execute the rest of lines(codes) in every launch file without killing gazebo, but once I run the spawner, gazebo dies immediately and generates the following messages:

  [ERROR] [1332343328.403648245, 1991.105000000]: Could not load controller 'base_controller' because the type was not specified. Did you load the controller configuration on the parameter server?
  [ WARN] [1332343329.568345883, 1994.167000000]: You've passed in true for auto_start for the C++ action server at       [/head_traj_controller/joint_trajectory_action]. You should always pass in false to avoid race conditions.
  [ WARN] [1332343329.577948808, 1994.189000000]: You've passed in true for auto_start for the C++ action server at [/head_traj_controller/follow_joint_trajectory]. You should always pass in false to avoid race conditions.
  [gazebo-2] process has died [pid 1956, exit code -11].
  log files: /home/albert/.ros/log/92e9f66e-7368-11e1-a8db-5404a6dc3a5e/gazebo-2*.log

I think that I've already loaded the 'base_controller' into the parameter server since in the same launch file, there is a line like this:

<rosparam file="$(find pr2_controller_configuration_gazebo)/pr2_base_controller.yaml" command="load"/>

edit flag offensive delete link more

Comments

Have you compiled the base_controller?

tfoote gravatar image tfoote  ( 2012-03-21 10:16:32 -0600 )edit

According to the comment from the launch file, the file related to base_controller is pr2_controller_configuration_gazebo/pr2_base_controller.yaml. Therefore, I rosmake the package pr2_controller_configuration_gazebo, which is a ROS_NOBUILD. The compilation is successful, but the problem still exits

Albert K gravatar image Albert K  ( 2012-03-21 15:09:54 -0600 )edit

Question Tools

Stats

Asked: 2012-03-20 19:22:21 -0600

Seen: 1,818 times

Last updated: Mar 28 '12