Gazebo crashes when spawning robot model

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

AdityaGaddipati gravatar image

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

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/tcpros_service.py", line 435, in __call__
    return self.call(*args, **kwds)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", 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/clearpath_playpen.world __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

Comments

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 -0600 )edit
1

Thanks for the suggestion. Made the edit.

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

What controllers are you using?

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

I'm facing something similar within docker. Did you happen to find a solution?

ParitoshKelkar gravatar imageParitoshKelkar ( 2018-10-02 17:40:56 -0600 )edit