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标准,所以要将第五行的注释去掉。
结果
灰线:实际路线
蓝线:位置传感器的数据
红线:速度传感器
绿线:Robot_Localization节点估计位置
以下内容为tf2包的一些内容
https://wiki.ros.org/tf2_geometry_msgs
https://wiki.ros.org/tf2_bullet
移动机器人的坐标系(Coordinate systems for mobile robots)
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.
two virtual sensors for our turtlebot:
- an odometer, ‘measuring’ the linear and angular velocity of the
- turtlebot a position sensor, ‘measuring’ the absolute position and orientation of the turtlebot.