Robotics StackExchange | Archived questions

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

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

When I receive the arposemarker 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?

Asked by Thomas Martin Klinge on 2015-09-09 02:58:51 UTC

Comments

Answers

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.

Asked by gvdhoorn on 2015-09-09 05:33:44 UTC

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?

Asked by Thomas Martin Klinge on 2015-09-09 08:49:39 UTC

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.

Asked by gvdhoorn on 2015-09-17 07:14:15 UTC

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

Asked by gvdhoorn on 2015-09-17 07:15:23 UTC