Ask Your Question
2

Meaning of world frame / coordinates in the context of costmaps

asked 2016-04-27 10:06:00 -0500

spmaniato gravatar image

updated 2016-04-27 10:07:38 -0500

I've read a couple of Q&As here regarding the meaning of world frame, as well as REP 105, "Coordinate Frames for Mobile Platforms". I'm still in need of a clarification, especially in the context of costmaps. Let's use an example:

The WorldModel and CostmapModel classes have a member function called footprintCost (see, e.g., the declaration in base_local_planner/costmap_model.h) The documentation says:

@param  position The position of the robot in world coordinates

What is the world frame in this case? Is it the costmap's global_frame, e.g., odom if it's a local costmap? If so, why is there a distinction between world and global?

It seems to me like the world frame is defined relative to some specific context (e.g. a costmap, or a pose estimation scheme). It's not an actually fixed frame in "the world". Is this a good way to think about it? Thanks!

edit retag flag offensive close merge delete

Comments

I have the same doubt. I was seeing the'getRobotPose() function. It's description says - Returns the pose of the robot in the global frame of the costmap.

skpro19 gravatar image skpro19  ( 2021-01-11 04:46:35 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-02-15 21:52:23 -0500

DangTran gravatar image

Instead of describing theoretical concepts, I will explain in my intuitive way:

There are 3 special frames that you usually meet whenever working with robots, especially with mobile robots: world, map ,odom. Whenever your robot is initialized (for instance, after power-on), will create an odom frame as "initial position". So that whenever you move the robot around, you can locate your robot w.r.t the initial pose. That is the main purpose of odom ->base_link transformation.

But you still may want to attach the robot in a specific environment. To do that, you have to "attach" the odom frame w.r.t some other frame. The most common frame is map frame (if you want to generate map from sensor) or world frame (if you work with Gazebo simulation). Basically, map -> odom and world->odom helps attaching your robot in the environment.

If you want to work with multiple maps, these maps (/map_1, /map_2, ...) must be attached to the world frame to maintain a single environment.

edit flag offensive delete link more

Comments

Let's say that we spawn a bot in the Gazebo world at (0,0,0).

  1. What would the world frame in this case? Would it be odom or would it be map?
  2. Would be needing an ekf_localization node to localize the bot in this particular case? I ask this because we already know where we spawned it initially, and odometry would help us know the drift of the bot in the world. So, do we really need an ekf_localization node to publish the odom -> base_link transform to localize the bot in the world_frame?
skpro19 gravatar image skpro19  ( 2021-02-17 15:41:13 -0500 )edit
  1. Neither. When running the Gazebo, there will be a world frame initialized, position of the robot is already identified by transformation between world -> base_link. There is no odom frame at all in simulation unless you add appropriate plugins. In non-simulation, odom will be created when you start the robot. And there will be no map frame unless you run map-generating algorithms (gmapping for instance) or localization algorithms
  2. Yes. Despite you can use odom -> base_link for localization, it is likely that the localization information you get is not accurate. Most localization algorithms will use this transformation (odom->base_link) along with sensors reading to make the localization information much more precise.
DangTran gravatar image DangTran  ( 2021-02-17 16:01:33 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2016-04-27 10:06:00 -0500

Seen: 232 times

Last updated: Feb 15