Gazebo crashes when spawning robot model

asked 2018-07-03 09:03:34 -0500

AdityaGaddipati gravatar image

updated 2018-07-03 14:12:22 -0500

I have made a launch file that starts gazebo, spawns my robot and attaches the controllers. When I launch it for the first time it works fine. But it keeps crashing every other time with the following error:

Segmentation fault (core dumped)
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/controller_manager/spawner", line 207, in <module>
    if __name__ == '__main__': main()
  File "/opt/ros/kinetic/lib/controller_manager/spawner", line 185, in main
    resp = load_controller(name)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/", line 435, in __call__
    return*args, **kwds)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/", line 505, in call
    raise ServiceException("unable to connect to service: %s"%e)
rospy.service.ServiceException: unable to connect to service: [Errno 104] Connection reset by peer

[gazebo-4] process has died [pid 2701, exit code 139, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /home/aditya/catkin_ws/src/aurus/aurus_gazebo/worlds/ __name:=gazebo __log:=/home/aditya/.ros/log/531ef798-7ef4-11e8-a6ae-d4619d022e90/gazebo-4.log].
log file: /home/aditya/.ros/log/531ef798-7ef4-11e8-a6ae-d4619d022e90/gazebo-4*.log
[base_controller_spawner-9] process has died [pid 2736, exit code 1, cmd /opt/ros/kinetic/lib/controller_manager/spawner aurus_joint_publisher aurus_velocity_controller __name:=base_controller_spawner __log:=/home/aditya/.ros/log/531ef798-7ef4-11e8-a6ae-d4619d022e90/base_controller_spawner-9.log].
log file: /home/aditya/.ros/log/531ef798-7ef4-11e8-a6ae-d4619d022e90/base_controller_spawner-9*.log

I made my launch files similar to the husky_gazebo launch files. When I launch husky_playpen.launch it opens up flawlessly each time.

I tried commenting the spawn_model node, gazebo starts fine and loads the world also. But the moment I add the spawn_model node, it starts crashing. What could be the issue?

edit retag flag offensive close merge delete


Aside, usually, it's best to copy paste terminal logs directly into your question - formatted with the `101010` button - instead of attaching an image of said logs. Text is easier to read and also can be searched - thereby increasing the odds that someone finds (and hopefully answers) your question.

josephcoombe gravatar imagejosephcoombe ( 2018-07-03 11:02:42 -0500 )edit

Thanks for the suggestion. Made the edit.

AdityaGaddipati gravatar imageAdityaGaddipati ( 2018-07-03 14:14:32 -0500 )edit

What controllers are you using?

Raskkii gravatar imageRaskkii ( 2018-07-04 06:42:21 -0500 )edit