Closed hejia-zhang closed 6 years ago
Hmm, I can replicate your issue, however, I think we can simplify it even further by removing Sawyer from the equation:
#!/usr/bin/env python
### tester.py
import rospy
from gazebo_msgs.msg import ModelStates
rospy.init_node("bug_reproducer")
while not rospy.is_shutdown():
rospy.wait_for_message("/gazebo/model_states", ModelStates, timeout=5)
then two terminals:
1) $ roslaunch gazebo_ros empty_world.launch debug:=true
2) $ python tester.py
produce the same result:
Thread 37 "gzserver" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff3abfc700 (LWP 18932)]
0x00007ffff60a2328 in ?? () from /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.7
(gdb) bt full
#0 0x00007ffff60a2328 in ?? () from /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.7
No symbol table info available.
#1 0x00007ffff608b959 in gazebo::physics::World::Update() () from /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.7
No symbol table info available.
#2 0x00007ffff609b0df in gazebo::physics::World::Step() () from /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.7
No symbol table info available.
#3 0x00007ffff609b555 in gazebo::physics::World::RunLoop() () from /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.7
No symbol table info available.
#4 0x00007ffff3e335d5 in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
No symbol table info available.
#5 0x00007ffff63c06ba in start_thread (arg=0x7fff3abfc700) at pthread_create.c:333
__res = <optimized out>
pd = 0x7fff3abfc700
now = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140734179034880, -6835587323277935288, 0, 140737488339455, 140734179035584, 16226272, 6835735209336044872,
6835604363778522440}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = <optimized out>
pagesize_m1 = <optimized out>
sp = <optimized out>
freesize = <optimized out>
__PRETTY_FUNCTION__ = "start_thread"
#6 0x00007ffff69ca41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
As this doesn't seem to be specific to the sawyer_simulator
, I would recommend to report this on Gazebo's bitbucket issue tracker:
https://bitbucket.org/osrf/gazebo/issues?status=new&status=open
I am not super familiar with the rospy.wait_for_message
function that seems to be causing this issue, as I'm use to the subscriber-callback pattern for ROS nodes. As a workaround, I would recommend either adding a sleep in your loop to prevent pinging Gazebo too quickly, or just create a callback to wait for messages the traditional way:
http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers#Subscribing_to_a_topic
@hjzh4 I'm going to close this ticket with the expectation that this will be brought upstream to the folks working on Gazebo. Please let me know if there are additional Sawyer-specific details and we can reopen the ticket.
@IanTheEngineer Okay, thanks for your help!
Description
Environment Parameters