First time here? Check out the FAQ!


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

Static Transforms - Where is the problem in my setup?

asked Sep 3 '14

Rabe gravatar image

Hey guys,

I am trying to set up a test scenario for calibrating cameras with markes. Therefore, I have 2 cameras and 2 markers. Each camera can see both markers. But when I try to simulate this scenario with static-transform-publisher, I get the strange effect, that I either have 2 trees like this:

marker_1 <=> camera 1
marker_2 <=> camera 2

or 1 tree like this:

marker_2 <=> camera 1
marker_2 <=> camera 2

(Which marker is paired with which camera changes constantly, the numbers are only examples)

Here is my launch-file:

 0 <launch>                   
  1 
  2     # Create static transforms for our fake cameras and markers
  3     <node pkg="tf" type="static_transform_publisher" name="marker_1_camera_front_tf_publisher" args="1.0 0 0 0 0 0 /ar_marker_1 /camera_front 10" />
  4     <node pkg="tf" type="static_transform_publisher" name="marker_2_camera_front_tf_publisher" args="1.0 1.0 0 0 0 0 /ar_marker_2 /camera_front 10" />
  5     <node pkg="tf" type="static_transform_publisher" name="marker_1_camera_top_tf_publisher" args="0 0 1.0 0 0 0 /ar_marker_1 /camera_top 10" />
  6     <node pkg="tf" type="static_transform_publisher" name="marker_2_camera_top_tf_publisher" args="0 1.0 1.0 0 0 0 /ar_marker_2 /camera_top 10" />
  7 
  8     # Launch the calibrator
  9     <include file="$(find camera_calibrator)/launch/calibrate_2_kinects.launch" />
 10 
 11 </launch>

Am I doing anythign wrong, or is my basic understanding of transforms wrong?

I monitor the transforms either via rqt or in python with tf_listener.lookupTransform(marker, camera, rospy.time(0))

Thanks in advance,

Rabe

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered Sep 3 '14

ahendrix gravatar image

The TF tree is not allowed to have loops or multiple parents for a single frame.

The flickering you're seeing is the tf tree constantly switching parents for your tag frame, depending on which tf message arrived most recently.

I'm not quite sure how the AR tag tracking works, but you should probably look into writing a node which subscribes to the tracking results from both cameras, merges them somehow, and then publishes a single transform for the position of the tag.

Preview: (hide)

Question Tools

1 follower

Stats

Asked: Sep 3 '14

Seen: 523 times

Last updated: Sep 03 '14