Hello,
I’m trying to integrate a `GPS` sensor to my mobile robot with the `robot_localization_node`. I have an IMU sensor added to my `robot_localization_node` but now I have some theoretical questions about how to integrate the `GPS`.
I would like to use the output of the `robot_localization node` to feed the `move_base node` in order to set some waypoints in GPS coordinates (can be in UTM) and then the robot follow them.
I’m a bit lost about how to proceed. This is what I think:
I launch `ek_localization_node` with this inputs: `IMU` and `wheel_odom`. And I remap the output topic to `local_odometry`. It'll be the local odometry in odom frame. (I must use this topic to input to `move_base` if I want to navigate in `odom` frame).
Then I launch `navsat_transform_node` with `IMU`, `wheel_odom`, and `GPS NavSatFix` and the output topic in world frame is `/odometry/gps`. But this topic is publishing only when the GPS signal is received so...
I launch another `ekf_localization node` with `IMU`,`Wheel_odom` and `odom1` (`/odometry/gps` from `navsat_transform node`). The output of this node (`/odometry/filtered`) is in world frame and is what I have to put as input to `move_base`, right?
With this configuration I don’t need to use `gps_common`, right?
When I launch all, I have to call the service `set_pose` in order to give some estimation pose in UTM coordinates to /odom in base to /world, isn’t?
**UPDATE 1:**
Thanks Tom. I've taken into account all your comments and here's my `robot_localization` [launch file](https://www.dropbox.com/s/k7pzj248pjdxwma/robot_localiz.launch?dl=0) and my [tf tree](https://www.dropbox.com/s/1tcikqswf0db1pb/frames.pdf?dl=0).
1. I feed the `move_base` odometry with the `local_odometry` returned by my first instance of `ekf_localization_node`.
2. As I've my waypoints in UTM coordinates, their should be in `utm frame`. I can't see the tf of utm frame publishing, but in the source code I see it's `/utm`.
3. I think the `global planner` of `move_base_node` needs the global frame set to the same frame of the waypoints. So It should be `/utm`, but when I launch this configuration, `move_base_node` says this:
> [ WARN] [1422876635.213009322]:> Waiting on transform from> summit_a/base_footprint to utm to> become available before running> costmap, tf error:
I understand that `move_base` can't find the tf between `utm` and `base_footprint` frames. I don't know if it can be because the tf isn't visible by `move_base_node` or I'm doing something wrong.
- (Just to test.) If I set the global frame of the `global_panner` of `move_base_node` to `summit_a/world` it reports me this:
> [ERROR] [1422873579.326459610]: The> goal pose passed to this planner must> be in the summit_a/world frame. It is> instead in the summit_a/utm frame.
- (other test) Setting the global frame of `global_planner` to `summit_a/odom`:
> [ERROR] [1422876188.622192440]: The> goal pose passed to this planner must> be in the summit_a/odom frame. It is> instead in the utm frame.
So, the `global_planner` frame of `move_base_node` needs to be consistent or the same that the frame of the goals. `/utm` in this case.
- (Another idea) Considering how `move_base_node` works, at first I thought the best way to make the integration of `GPS`, was that the world frame represent real-world coordinates (UTM) and was the father of frame `/odom`. Thus the `move_base_node` receives waypoints respect to frame world in UTM. I understand that for easy viewing in rviz and avoid the problems of continuity, `robot_localization_node` publishes the transform `utm` as son of `/odom`, but I think this can be a little problem for navigation by `move_base_node`.
**UPDATE 2:**
Thanks Tom.
1. Now I get the tf between `/world` and `/utm`. The point was that `navsat_transform_node` doesn't publish the tf until the GPS signal is nonzero.
2. The topic `/odometry/gps` without `child_frame_id` defined is meaningless for my purpose,right? Because it isn’t publish constantly if the GPS signal is lost.
3. Now my waypoints are in base to the `utm` frame.
4. With which topic I must feed the `move_base` node? I think the best option is the `/odometry/filtered` topic from my second instance of `ekf_localization_node`, isn’t it? It takes into account the output of `navsat_transform_node` and therefore the GPS position.
5. I don't really understand the problem with the heading of `IMU`, I'm sorry. My `IMU` hasn’t got compass and it doesn’t provide any kind of orientation data, just the angular velocity and lineal acceleration. In the `imu0_config` param just the angular velocity in Z is set to `true` and the stimation of the heading is enough. Is that a problem if I want to integrate the `GPS`?
Any ideas, corrections or suggestions would be appreciated.
Best regards and thanks in advance.
↧