[ros-users] Crash in indigo

Top Page
Attachments:
Message as email
+ (text/plain)
+ test.py (text/x-python)
+ (text/plain)
Delete this message
Reply to this message
Author: contradict
Date:  
To: ros-users
Subject: [ros-users] Crash in indigo
The attached program crashes when run under ros indigo. The crash is
due to concurrent calls to rospy.get_param(), one in the test code and
one inside SubscriberStatisticsLogger (rospy/impl/statistics.py:64).
TransformListener subscribes to tf in a new thread
(tf/listener.py:238).

rospy.get_param is documented to be non-threadsafe, but I am not so
sure about rospy.Subscriber(). If Subscriber() should be thread safe,
then SubscriberStatisticsLogger needs to be modified to avoid
concurrent access to the same http connection object as the rest of
the node. Perhaps it could be given its own connection to the
parameter server? If Subscriber() is not intended to be threadsafe,
then TransformListenerThread needs to subscribe in __init__() instead
of run().

I am happy to submit a pull request wherever is appropriate.
#!/usr/bin/env python
import rospy
#import tf2_ros
import tf

rospy.init_node("test")
#tf2_ros.TransformListener(tf2_ros.BufferClient(""))
tf.TransformListener()
while not rospy.is_shutdown():
    p = rospy.get_param("~test", 0.5)


_______________________________________________
ros-users mailing list

http://lists.ros.org/mailman/listinfo/ros-users