ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
trans_flag = self.tf_listener.canTransform("/map", "/body", uwb_mask_pcd.header.stamp)
      while (trans_flag == False and timeout_counter < 30 ):
             trans_flag = self.tf_listener.canTransform("/map", "/body", uwb_mask_pcd.header.stamp)
             timeout_counter = timeout_counter + 1 
             time.sleep(0.1)

This is the code i used to simulate the tf.waitForTransform Function

Strangely i noticed when my bag file stops playing, the callbackfunction, which is subscribed to a topic publish from the bagfile keeps getting called back!! AND this is the source of the error, it looked like the code was stuck in the waitForTransform (which should be a blocking call anyway)

I guess I should post this in a separate question

trans_flag = self.tf_listener.canTransform("/map", "/body", uwb_mask_pcd.header.stamp)
      while (trans_flag == False and timeout_counter < 30 ):
             trans_flag = self.tf_listener.canTransform("/map", "/body", uwb_mask_pcd.header.stamp)
             timeout_counter = timeout_counter + 1 
             time.sleep(0.1)

This is the code i used to simulate the tf.waitForTransform Function

Strangely i noticed when my bag file stops playing, the callbackfunction, which is subscribed to a topic publish from the bagfile keeps getting called back!! AND this is the source of the error, it looked like the code was stuck in the waitForTransform (which should be a blocking call anyway)

But I guess I should post this think is may be msgs that are in a separate questionthe msg que...

trans_flag = self.tf_listener.canTransform("/map", "/body", uwb_mask_pcd.header.stamp)
      while (trans_flag == False and timeout_counter < 30 ):
             trans_flag = self.tf_listener.canTransform("/map", "/body", uwb_mask_pcd.header.stamp)
             timeout_counter = timeout_counter + 1 
             time.sleep(0.1)

This is the code i used to simulate the tf.waitForTransform Function

Strangely i noticed when my bag file stops playing, the callbackfunction, which is subscribed to a topic publish from the bagfile keeps getting called back!! AND this is the source of the error, it looked like the code was stuck in the waitForTransform (which should be a blocking call anyway) because the clock would not move when the bagfile stops playing.

But I think is may be msgs that are in the msg que...