Ask Your Question
0

Incorrect camera pose with respect to marker

asked 2019-03-06 09:07:41 -0500

akcast gravatar image

updated 2019-03-06 09:08:19 -0500

Hi,

I am using a Realsense D435 camera and an Aruco marker.

The camera detects the marker and the TF of the camera and the marker are published by the Aruco_ROS package.

But, weirdly the tf shows the camera is below the marker while it is actually above. I am using the aruco_marker_frame as the fixed frame.

Isnt the TF supposed to show the camera's TF above the marker? Anybody would know any reasons why the TF is shown as such ? Here is a link that shows my RViz screen and the weird TF.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-06 09:12:45 -0500

bpinaya gravatar image

I assume you are using it from this repo https://github.com/pal-robotics/aruco... If so, are you making sure the TF tree is set up properly? From their github I can see:

the frame in which the pose is refered to can be chosen with the 'ref_frame' argument. The next example forces the marker pose to be published with respect to the robot base_link frame:

And being lunched with:

roslaunch aruco_ros single.launch markerId:=26 markerSize:=0.08 eye:="right" ref_frame:=/base_link

So I'd check that first. Also some code or lunch command would be helpful for us to help you! best of luck!

edit flag offensive delete link more

Comments

Hi @bpinaya, Thanks for your response !

Yes that is the repo I am referring to and changing the ref frame unfortunately doesnt change the resulting tf problem.

The launch file I used is in this link

Still not sure why the tf is showing wrong

akcast gravatar image akcast  ( 2019-03-07 16:51:30 -0500 )edit

If you don't provide code or more info it's really hard to figure out what's wrong. I've used that package with great success

bpinaya gravatar image bpinaya  ( 2019-03-08 02:40:23 -0500 )edit

@bpinaya I had put a link to the launch file in my previous comment. Are you not able to open it ?

If so, here's the launch file :

<launch>
<arg name="camera"          default="1"/>
<arg name="markerId"        default="350"/>
<arg name="markerSize"      default="0.15"/>    <!-- in m -->
<arg name="eye"             default="left"/>
<arg name="marker_frame"    default="aruco_marker_frame$(arg camera)"/>
<arg name="ref_frame"       default=""/>  <!-- leave empty and the pose will be published wrt param parent_name -->
<arg name="corner_refinement" default="LINES" /> <!-- NONE, HARRIS, LINES, SUBPIX -->...
akcast gravatar image akcast  ( 2019-03-08 09:31:16 -0500 )edit

...

<group ns="$(arg camera)">
    <node pkg="aruco_ros" type="single" name="aruco_single">
        <remap from="/camera_info" to="/cam_$(arg camera)/color/camera_info" />
        <remap from="/image" to="/cam_$(arg camera)/color/image_raw" />
        <param name="image_is_rectified" value="True"/>
        <param name="marker_size"        value="$(arg markerSize)"/>
        <param name="marker_id"          value="$(arg markerId)"/>
        <param name="reference_frame"    value="$(arg ref_frame)"/>   <!-- frame in which the marker pose will be refered -->
        <param name="camera_frame"       value="cam_$(arg camera)_color_optical_frame)"/>
        <param name="marker_frame"       value="$(arg marker_frame)" />
        <param name="corner_refinement"  value="$(arg corner_refinement)" />
    </node>
</group>

</launch>

P.S. Rest of the code in the package remains unchanged.

akcast gravatar image akcast  ( 2019-03-08 09:33:12 -0500 )edit

Chance the reference_frame to a one frame defined on xyz on the axis you want. Don't leave it empty (if you see the comments it says that will calculate it respect the parent frame)

bpinaya gravatar image bpinaya  ( 2019-03-10 12:21:59 -0500 )edit

I am getting also wrong pose using with realsense . have you found out what is the problem? I am using camera_frame = camera_color_optical_frame, but what reference_frame should I defined for realsense? also what is for eye = left?

nd gravatar image nd  ( 2019-05-06 09:29:38 -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

2 followers

Stats

Asked: 2019-03-06 09:07:41 -0500

Seen: 586 times

Last updated: Mar 06 '19