[ros-users] Crash in indigo

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
+ test.py (text/x-python)
+ (text/plain)
Slet denne besked
Besvar denne besked
Skribent: contradict
Dato:  
Til: ros-users
Emne: [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