ROS odometry learning (odometry)

What is an odometer? Why do I need an odometer?

Odometer is a standard to measure our position from the initial pose to the end pose. In layman's terms, we need to know how far the robot has traveled and in which direction to realize the positioning and navigation of the robot.

 

Here I give an example. The map creation in the gmapping navigation map package requires odometer information, and the navigation also needs it.

There is a shortcoming in the hector map. If the radar is not accurate enough, the map created will cause the positioning to be inaccurate. This is undesirable. Therefore, to achieve accurate positioning and navigation, you need to add odometer information.

 

 

ROS gmapping navigation package requires 2 inputs, one is laser data, and the other is odometer information.

So how do we get the odometer?

The odometer also contains two aspects of information:

1. The pose (position and rotation angle), namely (x, y, θ)

The second is speed (forward speed and turning speed).

 

So the question is, how do we obtain this data? ? ? ?

 

reference:

http://blog.csdn.net/feixin620/article/details/78573893

http://www.ncnynl.com/archives/201703/1416.html

The way to obtain data of odometer information, the results I have summarized from several articles are:

1. Use encoder motor to obtain

2. Use the package in ROS: laser_scan_matcher  

First, let’s talk about the laser_scan_matcher package. This package can publish 2D pose data based on the /scan data. Can we convert the 2D pose data into the lower x, y, z representing the position and the quaternion representing the pose. It is theoretically possible.

Speed ​​acquisition: The forward speed and steering speed are still calculated according to the 2D pose and time variables. The 2D pose data includes: float64 x, float64 y, float64 theta. According to dx, dy, dtheta in the dt time, the forward speed and steering speed can be calculated. If the 2D pose data is accurate enough, gyroscope calibration is basically unnecessary.

 

We refer to the encoder and quote this blogger’s article: https://www.cnblogs.com/21207-iHome/p/8066135.html

In the article, we have pointed out our underlying framework:

 

The control structure of the entire mobile robot is shown in the figure below, where the base_controller node sends the subscribed cmd_vel information to the lower computer (embedded control board) through the serial port or other communication interface. The lower computer calculates according to the robot kinematics formula, converts the robot speed into the speed of each wheel, and then sends the speed of each wheel to the motor drive board to control the motor rotation through the CAN bus (or other bus interface). The motor drive board performs closed-loop control (PID control) on the motor speed, and counts the number of encoder pulses received per unit time to calculate the wheel speed.

For details, please jump to the page:

STM32 bottom encoder of ROS odometer (1)

http://blog.csdn.net/zhu751191958/article/details/79322140

     

STM32 bottom encoder of ROS odometer (2)

http://blog.csdn.net/zhu751191958/article/details/79322233

Guess you like

Origin blog.csdn.net/qq_41050642/article/details/110151052