Ask Your Question
0

ar_pose_marker from ar_pose packge not published

asked 2016-09-06 05:25:20 -0600

RSA_kustar gravatar image

updated 2016-09-18 02:29:49 -0600

I would like to run the ar_pose package and read the ar_pose_marker_ data. I did the following

I have the following two packages : 1- ar_pose 2- uvc_camera

I run the following two launch files:

<launch>
<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 pkg="tf" type="static_transform_publisher" name="marker_to_cam" args="0 0 0.5 0 0 0 ar_marker camera 10" />
<node ns="camera" pkg="image_proc" type="image_proc" name="image_proc"/>
<node name="ar_pose" pkg="ar_pose" type="ar_single" respawn="false" output="screen">
   <param name="marker_pattern" type="string" value="data/4x4/4x4_1.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>

Then I run the camera launch file

<launch>
  <node pkg="uvc_camera" type="uvc_camera_node" name="uvc_camera" output="screen" ns="/camera">

    <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="auto_focus" type="bool" value="False" />
   <param name="focus_absolute" type="int" value="0" />
   <!-- other supported params: auto_exposure, exposure_absolute, brightness, power_line_frequency -->

   <param name="device" type="string" value="/dev/video0" />
   <param name="camera_info_url" type="string" value="file://$(find uvc_camera)/example.yaml" />
 </node>
</launch>

Then I run RVIZ and I put the fixed frames world. I could not find the ar_pose_marker_ at all ?? is there a plug-in for it since it is type of ARMARKER msgs Also, I cant see anything on top of the images as provided in the package description In addition, I tried to subscribe for the ar_pose_marker but there is no data as if the node ar_pose_single is not publishing it

How can I fix this and get the ar_pose_marker_ data ???

I attached Image for the rqt_graph and the output from Rviz for tf, camera , and the command line that shows that there are no output for the ar_pose_marker topic

image description

image description

EDIT:

The launch file has been edited to add the marker in the ground to be as ( 0, 0, 0) position or we can say that is is equal to the world frame and we remove the transformation between the camera and the marker because we actually need to obtain the position of the camera.. therefore the launch file will become as the following:

<launch>
<node pkg="tf" type="static_transform_publisher" name="world_to_marker"  args="0  0 0 0 0 0 world ar_marker 10" />
<node ns="camera" pkg="image_proc" type="image_proc" name="image_proc"/>
<node name="ar_pose" pkg="ar_pose" type="ar_single" respawn="false" output="screen">
   <param name="marker_pattern" type="string" value="data/4x4/4x4_1.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 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2016-09-13 02:46:00 -0600

Procópio gravatar image

if all that you want is to know the pose of the marker (or of the camera, according to your setup), you can obtain that from their tf frames. the markers are drawn based on that information.

if you definitely need the visual markers, what is the output from a rostopic info ar_pose_marker ?

edit flag offensive delete link more

Comments

@Procópio There is no output from the ar_pose_marker. I actually Edited the question because I need to obtain the position of the camera. but I still don not know which topic will give me the position of the camera or I should only read the tf of the camera? how it will be generated in this pkg?

RSA_kustar gravatar imageRSA_kustar ( 2016-09-18 02:26:59 -0600 )edit

@Procópio Whan I do that, I dont receive anything from the ar_pose_marker topic also, the output in rviz is only the camera view. nothing like in the package description

RSA_kustar gravatar imageRSA_kustar ( 2016-09-18 02:33:25 -0600 )edit

how your tf tree looks like? do you get any feedback on the detection of the marker?

Procópio gravatar imageProcópio ( 2016-09-19 06:05:22 -0600 )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: 2016-09-06 05:25:20 -0600

Seen: 256 times

Last updated: Sep 18 '16