move_base and tf transforms

asked 2018-04-09 01:59:58 -0500

Ironbars gravatar image

updated 2018-04-09 02:14:32 -0500

Hey, I'm fairly new with ROS and I'm having trouble understanding the TF reference frames. There's something wrong with our navigation code, but the person who originally wrote it is busy with other things and I'm not totally convinced he understood the TF transforms in the first place based on his explanations.

If some of my vocabulary is being used incorrectly, please correct me, as that might be indicative of my lack of understanding here.

The objective is to, upon boot-up, examine images from a camera to identify Aruco markers on a wall nearby, then travel to a point X meters perpendicular to that wall. The Aruco code is working and outputting the correct numbers, but not in the same coordinate system that move_base wants.

We change to the proper coordinate system and then enter a new coordinate frame into the TF tree for the wall, say base_wall. We'll also have a frame for the camera and a frame for the center of the robot.

If Aruco is telling me that the center of the wall is 2 meters away on the X axis and 1.5 meters away on the Y axis, and that the robot is rotated, say 0.8 radians, what should I be putting in the transform tree for the location of the wall? Where is (0, 0)? Is it the robot? Where is the goal? If the robot is (0, 0), then does the robot move until the location of the goal is also (0, 0)? What about the rotation? In the picture below, do we consider the robot to be rotated or the wall rotated?

Picture

edit: Theta is not the angle of a right triangle like it looks here; it's the angle of the robot relative to the wall.

edit retag flag offensive close merge delete

Comments

I just realized the picture I uploaded is confusing; I mean theta to be the rotation of the robot relative to the wall, not the angle in a right triangle like it looks.

Ironbars gravatar image Ironbars  ( 2018-04-09 02:03:51 -0500 )edit

Can you please attach your image directly to your post? I've given you enough karma for that.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-09 02:04:14 -0500 )edit

I've edited my post with the image embedded in.

Ironbars gravatar image Ironbars  ( 2018-04-09 02:15:21 -0500 )edit

Is it solved until now?

FERAS TERKAWI gravatar image FERAS TERKAWI  ( 2021-03-29 10:49:34 -0500 )edit