ROS基础知识学习笔记(9)—Robot_Localization

时间:2024-04-08 11:06:45

Robot_Localization

链接:https://kapernikov.com/the-ros-robot_localization-package/
github源代码链接:https://github.com/Kapernikov/ros_robot_localization_tutorial

虚拟传感器

This tutorial uses the turtlesim package as a virtual robot. We will add a virtual odometer and a virtual (LiDAR) positioning system (both with a configurable systematic and random error) to the turtlesim robot and estimate its location by using the robot_localization package.

如果你是ros kinetic版本,CMakeLists.txt文件要修改一下,要使用C++11标准,所以要将第五行的注释去掉。
ROS基础知识学习笔记(9)—Robot_LocalizationROS基础知识学习笔记(9)—Robot_Localization

结果

ROS基础知识学习笔记(9)—Robot_Localization
灰线:实际路线
蓝线:位置传感器的数据
红线:速度传感器
绿线:Robot_Localization节点估计位置

以下内容为tf2包的一些内容

https://wiki.ros.org/tf2_geometry_msgs

ROS基础知识学习笔记(9)—Robot_Localization

ROS基础知识学习笔记(9)—Robot_Localization

https://wiki.ros.org/tf2_bullet

ROS基础知识学习笔记(9)—Robot_Localization

移动机器人的坐标系(Coordinate systems for mobile robots)

ROS基础知识学习笔记(9)—Robot_Localization
The odom frame is useful as an accurate, short-term local reference, but drift makes it a poor frame for long-term reference.

The map frame is useful as a long-term global reference, but discrete jumps in position estimators make it a poor reference frame for local sensing and acting.

The tree, especially the construction with the map and odom frames, may look counterintuitive at first. It should make sense if you think about the odom → base_link transform as the (best) estimate of the mobile robot’s pose based on continuous sensors (IMUs, odometry sources, open-loop control…) only. The map → odom transform includes the non-continuous sensors (GPS, LiDAR based positioning system…) and models the jumps in the estimated position of the mobile robot, keeping the odom → base_linktransform continuous. This approach provides a drift-free but non-continuous (map → base_link) as well as a continuous but drifting (odom → base_link) pose estimation of the mobile robot.

ROS基础知识学习笔记(9)—Robot_Localization

two virtual sensors for our turtlebot:

  1. an odometer, ‘measuring’ the linear and angular velocity of the
  2. turtlebot a position sensor, ‘measuring’ the absolute position and orientation of the turtlebot.