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

The relationship of earth frame and map frame [closed]

asked 2021-07-08 10:59:59 -0500

jacklu333333 gravatar image

updated 2021-07-08 11:04:21 -0500

I follow the instruction of REP:105. As it mentioned to have the map frame corrected by the earth frame. So I use imu_filter_madgwick with 9-axis sensor to produce the absolute orientation of the earth and map. Then, use the function provided by the same package to produce the earth and map correction in /tf tree.

However, what I got is the following. the mapping will constant rotation of the map. Hence the rotational mapping result. Mapping in RVIZ

This is my /tf tree. TF Tree

There must be some misunderstanding for me. Please help clarify it. Thanks in advance.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by jacklu333333
close date 2021-09-24 05:32:23.282126

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-07-08 16:00:44 -0500

Mike Scheutzow gravatar image

I would expect the transform from earth->map to be a constant. Any movement of the robot has no effect on the relationship of those 2 frames.

edit flag offensive delete link more

Comments

Hi, thank you for your reply. You point out my blind spot about the relationship of earth->map frame. It should be constant since the map->odom, the rotation measurement would be here.

In that case, I am wondering how can I publish the earth->map relationship at the initial state dynamically since we cannot always assume the North is match to y-asix (for xyz to enu configuration).

Once again thank you for the clarification.

jacklu333333 gravatar image jacklu333333  ( 2021-07-09 04:03:09 -0500 )edit
1

If you build a map with `rtabmap' and save it, you can then calculate the static rotation needed based on where the map x-axis ended up. Doing this dynamically is more difficult: you will need to read the initial magnetic orientation of the robot once before you begin the rtabmap mapping procedure.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-07-09 06:24:55 -0500 )edit

Thank you for the clarification.

In that case, wouldn't the earth frame a little bit ineffective in most cases since it is always static?

The only case we can apply the earth frame will be when there are multiple robots to do multi-session mapping, in addition, we need to calibrate the orientation of each robot in advance or read once at the beginning.

Is my understanding correct?

jacklu333333 gravatar image jacklu333333  ( 2021-07-12 03:15:19 -0500 )edit

It's not clear on what you are trying to accomplish. Are you trying to 1) create a single, combined map or 2) keep a unique map for each robot and be able to convert between the different map's coordinate systems or 3) something else.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-07-12 06:54:42 -0500 )edit

I think it's more close to 2. Since I want to map the environment as a global map. With the information given by you, I think I can make it work. Thanks a lot.

I am just curious about the necessity of earth frame. Since I can just rotate the map at the mapping session so that XYZ will match to the ENU, in that case, the REP:105 seems unnecessary to define the earth frames, right?

jacklu333333 gravatar image jacklu333333  ( 2021-07-12 07:22:39 -0500 )edit

Since I can just rotate the map at the mapping session so that XYZ will match to the ENU

REP:105 is showing a general architecture. If you choose to transform a rotated map, or somehow pre-initialize the mapN frame so the axes are what you want, then each earth->mapN transform is the Identity transform. Which approach is easiest depends on what you know, and when you know it.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-07-12 10:28:27 -0500 )edit

I got it. Thank you for your time and the detailed explanation.

jacklu333333 gravatar image jacklu333333  ( 2021-07-13 01:58:38 -0500 )edit

@Mike Scheutzow

Can you explain to me how to calculate the static rotation from RTABMap map_frame to my own custom coordinate system? How do I find out, where the axes of the ROS coordinate system point to after running rtabmap and/or dynamically and how much I need to rotate it to fit my custom coordinate system?
The translation part is already working inside rtabmap with the help of Marker/Priors parameter by setting global coordinates for the known accurate positions of the markers and detecting exactly these markers in local coordinates in the map_frame. This translates the coordinate origin to the right origin of my global coordinate system. Unfortunately, the rotation does not work. Can I do this with the help of your suggestion and export/apply the rotation somehow on to the map/earth_frame?

xdzye gravatar image xdzye  ( 2023-01-18 08:38:45 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-07-08 10:59:59 -0500

Seen: 390 times

Last updated: Jul 08 '21