gazebo ros Segmentation error with publishing arrays
Hello my name is Bukmop and this is my first post here.
I am trying to work with a robot in gazebo and ROS and changing a existing gazebo_ros plugin (gazebo_ros_diff_drive). Now I am facing some problems which don`t really understand.
Preamble:
I am using the code frame from moorerobots and the gazebo_ros plugins (links bellow). My actual code is in GitHub for everyone to access. Furthermore I made a video of the problem I want to solve.
mybot frame: http://moorerobots.com/blog/post/1
original gazebo_ros packages: https://github.com/ros-simulation/gaz...
The GitHub code: https://github.com/Bukmop123/mybot/tr...
Youtube video: https://youtu.be/3iKQuljNhA8
Ubuntu 16.04
gazebo version 7.8.1
ros kinetic
Goal of this work
Basically I have a robot with two Joints and I want set force on these joints and read the actual force and velocity on these Joints. The raw coding is done and it seems to work the way I want it to.
Problem description
When I am starting the code there is different behavior of the launch process as you can see in the video. Here are the relevant parts:
- 0.20 min : ok
- 0.56 min : Aborted
- 1.14 min : Segmentation
- 2.03 min : ok
- 2.19 min : Segmentation
- 2.49 min : ok
- 3.08 min : Segmentation
- 3.08 min : Segmentation
- 3.24 min : Segmentation
- 4.01 min : Segmentation and no Gui
- 4.18 min : Segmentation
- 4.39 min : ok
- 5.08 min : Segmentation
- 5.25 min : ok
- 6.02 min : ok
- 6.34 min : ok
- 6.55 min : Segmentation
- 7.07 min : Aborted
- 7.28 min : ok
error notes
17. 6.55 min : Segmentation:
Segmentation fault (core dumped)
[gazebo-2] process has died [pid 26423, exit code 139, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /home/robot/mybot_ws/src/mybot_gazebo/worlds/mybot.world __name:=gazebo __log:=/home/robot/.ros/log/3c2d321c-6888-11e7-9455-c038966d7861/gazebo-2.log].
log file: /home/robot/.ros/log/3c2d321c-6888-11e7-9455-c038966d7861/gazebo-2*.log
18. 7.07 min : Aborted:
Aborted (core dumped)
[gazebo-2] process has died [pid 26910, exit code 134, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /home/robot/mybot_ws/src/mybot_gazebo/worlds/mybot.world __name:=gazebo __log:=/home/robot/.ros/log/46fbdc8e-6888-11e7-9455-c038966d7861/gazebo-2.log].
log file: /home/robot/.ros/log/46fbdc8e-6888-11e7-9455-c038966d7861/gazebo-2*.log
[gazebo_gui-3] process has died [pid 26921, exit code 255, cmd /opt/ros/kinetic/lib/gazebo_ros/gzclient __name:=gazebo_gui __log:=/home/robot/.ros/log/46fbdc8e-6888-11e7-9455-c038966d7861/gazebo_gui-3.log].
log file: /home/robot/.ros/log/46fbdc8e-6888-11e7-9455-c038966d7861/gazebo_gui-3*.log
Observations
The Segmentation errors seems to be less when I use the modified differential_drive_controller but they still appear (2 of 10 maybe ). There seems to be no errors when I use the original differential_drive_controller so the mistake should be somewhere in the code.
Note: You can switch the controller of the joints in mybot.xacro line 9 to 10.
mybot/mybot_ws/src/mybot_description/urdf/mybot.xacro
<xacro:include filename="$(find mybot_description)/urdf/ros_joint_interface_mybot.gazebo" />
<!--xacro:include filename="$(find mybot_description)/urdf/ros_diff_drive_mybot.gazebo" /-->
<!--xacro ...