0
$\begingroup$

Rosanswers logo

Hi,

I am almost going crazy ... I analyse a bag file and monitor a strange behaviour. When I use the code below I have to comment one of rospy.Subscriber(...) lines. Otherwise the Program gets no message and rxgraph shows no connection. But with only one subscriber (regardless of which) the code works well!

What is wrong in my idea?

Best wishes from Germany Enjoy the weekend

Poseidonius

import roslib; roslib.load_manifest('Localization')
import rospy
from std_msgs.msg import Float32

def callback(event, index):
     print index

rospy.init_node('OdoMapper')
rospy.Subscriber("/OdoLeft", Float32, callback, 0) # one of them have to be commented
rospy.Subscriber("/OdoRight", Float32, callback, 1)  
rospy.spin()

Originally posted by Poseidonius on ROS Answers with karma: 427 on 2011-08-05

Post score: 0


Original comments

Comment by dornhege on 2011-08-08:
Another test, just to verify: Does this only happen on the bag file? If you do 2x rostopic pub, does everything work OK?

Comment by dornhege on 2011-08-08:
Strange, indeed. Although I don't use Fedora, I would assume that it is not Fedora itself, but the system setup. Can you check the network setup tfoote posted below even on the local machine?

Comment by Poseidonius on 2011-08-08:
Strange - on a Ubuntu PC the code works fine, just my Fedora presents the mentioned behaviour

Comment by tfoote on 2011-08-06:
Can you add the output of roswtf to your question?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

no activity in a month, closing


Originally posted by kwc with karma: 12244 on 2011-09-02

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.