ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

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

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

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 -0500

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 image Thomas Martin Klinge  ( 2015-09-09 08:49:39 -0500 )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 image gvdhoorn  ( 2015-09-17 07:14:15 -0500 )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 image gvdhoorn  ( 2015-09-17 07:15:23 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-09-09 02:58:51 -0500

Seen: 370 times

Last updated: Sep 09 '15