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

How to invert coordinate frames of a Transform

asked 2018-02-27 04:01:41 -0500

simff gravatar image

updated 2018-02-27 04:02:52 -0500

I have a fixed transform coming from the ar_track_alvar pkg, that gives me the markers pose into the camera_link. I want to get the inverse of it and save the exact data but reversed. The problem is that being the marker frame reversed, the inverse gives me wrong result.

How to have x and y markers coordinates to be consistent with the camera_link ones? What is the easiest way to achieve this? I want to have x pointing forward (red) and y on the left (green).

image description

Thanks for anyone helping me out!

Cheers, Simone.

edit retag flag offensive close merge delete


Since you already have a transform from your markers to camera_link, have you tried to apply a rotation with respect to camera_link in your marker's frame?

tuandl gravatar image tuandl  ( 2018-02-27 04:22:34 -0500 )edit

Hi @tuandl thanks for the comment! Not yet, I do not know the way to code it, I am new to ROS and tf, How would you to that? Can you append here a simple code snippet or code steps I have to take? I appreciate your help!

simff gravatar image simff  ( 2018-02-27 04:26:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-27 04:39:28 -0500

tuandl gravatar image

This is a basic tf tutorial You want to do something like

      listener.lookupTransform("camera_link", "ar_marker",ros::Time(0), transform);

Follow the tutorial to get the marker's positions.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-02-27 04:01:41 -0500

Seen: 1,184 times

Last updated: Feb 27 '18