Ask Your Question
0

Question about tf | problem with ar_pose reverse

asked 2014-11-25 22:38:52 -0500

green96 gravatar image

updated 2014-11-26 19:38:53 -0500

Hi, I successfully run ar_pose with tracking a single marker option. I also tried to run option: tracking the camera position (reverse), everything looks good, but I don't get image...

My topics exists but rviz says something different.

Please check this screen: http://snag.gy/OhN45.jpg

rostopic seems to be ok:

przemek@przem:~/tum_simulator_ws/src/ar_tools/ar_pose/launch$ rostopic list 
/ar_pose_marker
/camera/camera_info
/camera/image_color
/camera/image_color/compressed
/camera/image_color/compressed/parameter_descriptions
/camera/image_color/compressed/parameter_updates
/camera/image_color/compressedDepth
/camera/image_color/compressedDepth/parameter_descriptions
/camera/image_color/compressedDepth/parameter_updates
/camera/image_color/theora
/camera/image_color/theora/parameter_descriptions
/camera/image_color/theora/parameter_updates
/camera/image_mono
/camera/image_mono/compressed
/camera/image_mono/compressed/parameter_descriptions
/camera/image_mono/compressed/parameter_updates
/camera/image_mono/compressedDepth
/camera/image_mono/compressedDepth/parameter_descriptions
/camera/image_mono/compressedDepth/parameter_updates
/camera/image_mono/theora
/camera/image_mono/theora/parameter_descriptions
/camera/image_mono/theora/parameter_updates
/camera/image_proc_debayer/parameter_descriptions
/camera/image_proc_debayer/parameter_updates
/camera/image_proc_rectify_color/parameter_descriptions
/camera/image_proc_rectify_color/parameter_updates
/camera/image_proc_rectify_mono/parameter_descriptions
/camera/image_proc_rectify_mono/parameter_updates
/camera/image_raw
/camera/image_raw/compressed
/camera/image_raw/compressed/parameter_descriptions
/camera/image_raw/compressed/parameter_updates
/camera/image_raw/compressedDepth
/camera/image_raw/compressedDepth/parameter_descriptions
/camera/image_raw/compressedDepth/parameter_updates
/camera/image_raw/theora
/camera/image_raw/theora/parameter_descriptions
/camera/image_raw/theora/parameter_updates
/camera/image_rect
/camera/image_rect/compressed
/camera/image_rect/compressed/parameter_descriptions
/camera/image_rect/compressed/parameter_updates
/camera/image_rect/compressedDepth
/camera/image_rect/compressedDepth/parameter_descriptions
/camera/image_rect/compressedDepth/parameter_updates
/camera/image_rect/theora
/camera/image_rect/theora/parameter_descriptions
/camera/image_rect/theora/parameter_updates
/camera/image_rect_color
/camera/image_rect_color/compressed
/camera/image_rect_color/compressed/parameter_descriptions
/camera/image_rect_color/compressed/parameter_updates
/camera/image_rect_color/compressedDepth
/camera/image_rect_color/compressedDepth/parameter_descriptions
/camera/image_rect_color/compressedDepth/parameter_updates
/camera/image_rect_color/theora
/camera/image_rect_color/theora/parameter_descriptions
/camera/image_rect_color/theora/parameter_updates
/clicked_point
/initialpose
/move_base_simple/goal
/rosout
/rosout_agg
/tf
/tf_static
/visualization_marker
/visualization_marker_array

I get launch file from this repository

my launch looks:

<launch>
  <node pkg="rviz" type="rviz" name="rviz" 
    args="-d $(find ar_pose)/launch/live_reverse.rviz"/>
  <node pkg="tf" type="static_transform_publisher" name="world_to_marker" 
    args="0 1 1 -1.57 3.14 -1.57 world ar_marker 10" />
  <node ns="camera" pkg="image_proc" type="image_proc" name="image_proc"/>
  <node ns="camera" pkg="uvc_camera" type="uvc_camera_node" name="uvc_camera_node"
    output="screen">
    <param name="width" type="int" value="320" />
    <param name="height" type="int" value="240" />
    <param name="fps" type="int" value="30" />
    <param name="frame" type="string" value="camera" />
    <param name="device" type="string" value="/dev/video0" />
    <param name="camera_info_url" type="string"
      value="file://$(find ar_pose)/camera_calibration_rev.yaml" />
  </node>
  <node name="ar_pose" pkg="ar_pose" type="ar_single" respawn="false" output="screen">
    <param name="marker_pattern" type="string" value="data/4x4/4x4_19.patt"/>
    <param name="marker_width" type="double" value="152.4"/>
    <param name="marker_center_x" type="double" value="0.0"/>
    <param name="marker_center_y" type="double" value="0.0"/>
    <param name="threshold" type="int" value="100"/>
    <param name="use_history" type="bool" value="true"/>
    <param name="reverse_transform" type="bool" value="true"/>
  </node>
</launch>

Where did I make a mistake? please help.

edit retag flag offensive close merge delete

Comments

The camera image does not depend on ar_pose. Try running only the camera related nodes and see if it's solved.

Miquel Massot gravatar image Miquel Massot  ( 2014-11-26 11:40:52 -0500 )edit

When I use tracking a single marker option camera works excellent. http://snag.gy/WiqGT.jpg When I use reverse option something is broken. http://snag.gy/aHn1s.jpg

launch files compared: http://www.diffnow.com/?report=0c3yj

green96 gravatar image green96  ( 2014-11-26 16:53:39 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-11-30 05:23:42 -0500

Miquel Massot gravatar image

The problem is that your launchfile is setting up a TF between world and camera, and the marker package is also trying to set up a TF between the marker and the camera, and camera cannot have two TF parents.

Remove that static tf publisher from the launchfile and the problem should be solved.

edit flag offensive delete link more
0

answered 2014-11-26 19:34:11 -0500

green96 gravatar image

updated 2014-11-26 19:40:24 -0500

Finally I have noticed that my problems are connected with strange behaviour of TF.

When I run for the first time launch ar_pose_single (camera frame) everything worked well. I was terminating this node and tried to run ar_reverse (tag framework) and it didn't work properly.

So, the rule is: reset roscore after runing the first note (it is impossible to run this nodes one after the other without reseting roscore )

Why it is happening? Is there any way to do this without this RESET (in one roscore section)?

edit flag offensive delete link more

Comments

Are you publishing any TF between world and camera?

Miquel Massot gravatar image Miquel Massot  ( 2014-11-27 02:17:19 -0500 )edit

Please check link

I think that TF is publishing to rviz, but I am not sure. Please precise your question.

I don't understand why there is option to use TF between world and cam. I would rather use it to get pose of cam in reference to marker and vice versa.

green96 gravatar image green96  ( 2014-11-27 06:24:42 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-11-25 22:38:52 -0500

Seen: 363 times

Last updated: Nov 30 '14