Best/simplest way to implement TF for localization application.

asked 2018-08-27 04:19:50 -0600

evbernardes gravatar image

updated 2018-08-27 05:36:15 -0600

Hello everyone! I'm still a beginner user of ROS, so I apologize in advance if this is too much of a simple question.

I'm working with a simple mobile robot powered by ROS for a localization application. Basically, I have two sensors: one that gives the 2D position L' of a known landmark on the robot's reference frame, and another one that gives the robot's heading on the world frame.

The goal is to calculate the robot's real position X on the world frame using: L, the known landmark's position on the world frame, L', the landmark's position on the robot's frame as given by the first sensor, and phi, the robot's heading given by the second sensor.

I already do this by making use of rotation matrices, but since this code might be used by other students after me, I want to know if there's a simple way to implement this coordinate change calculations with TF, since I have never used TF before.

Thanks a lot in advance!

PS.: I'm using ROS Melodic Morenia and programming on Python.

edit retag flag offensive close merge delete

Comments

Probably, and it shouldn't even be very hard, so I encourage you to try it using the tutorials, but I am not sure what exactly you mean by "this".

fvd gravatar image fvd  ( 2018-08-27 05:25:57 -0600 )edit

Hey! Sorry, I edited my post. I want to know how to implement this coordinate change calculations. I mean, I have the robot's heading and the landmarks positions according to the robot's frame and the world frame. So I need to use this to find the coordinates of the robot on the world frame.

evbernardes gravatar image evbernardes  ( 2018-08-27 05:37:27 -0600 )edit