Ask Your Question
0

Translation of pose to a point 500 mm in front of the AR tag

asked 2015-09-09 02:58:51 -0600

Thomas Martin Klinge gravatar image

I'm using AR-tags to automatically detect locations to visit using AMCL navigation.

When I receive the ar_pose_marker event I transform it to the odom frame and save this for navigation later on.

The challenge is that I cannot navigation to this exact point because the marker is placed on the wall and my robot will then hit the wall. So what I need is to navigate to a point 500mm in front of the AR-tag.

But how can I make the translation of the pose?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
3

answered 2015-09-09 05:33:44 -0600

gvdhoorn gravatar image

You can use tf for this. After you've received the marker pose, just apply a transform that translates it over the desired distance in the desired direction (API docs here, tutorials here).

It might be worthwhile to immediately start using tf2 though, the successor to tf.

edit flag offensive delete link more

Comments

Thank you for your answer. I have tried to read the documentation you have linked to, but unfortunately I don't understand how to make local transformation directly inside my node without published transformations.

Can you help with a python snippet showing have to make the transformation?

Thomas Martin Klinge gravatar imageThomas Martin Klinge ( 2015-09-09 08:49:39 -0600 )edit

Took me some time: for a local transform without frames, you can probably just use any of the linalg libraries available (kdl, eigen, etc). Just take the marker pose, use any of the *_conversion pkgs in geometry, then translate, convert back to pose.

gvdhoorn gravatar imagegvdhoorn ( 2015-09-17 07:14:15 -0600 )edit

For Python you could use tf/transformations.py, which is part of TF (but doesn't use any part of the TF infrastructure).

gvdhoorn gravatar imagegvdhoorn ( 2015-09-17 07:15:23 -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: 2015-09-09 02:58:51 -0600

Seen: 130 times

Last updated: Sep 09 '15