Two-wheel differential model, the robot chassis chassis mileage meter calculation.

Source: Internet
Author: User
Tags relative

The two-wheel differential model of the robot chassis, is the most common robot chassis, such as sweeping robots, tracking cars and so on. As a moving part of a robot, it needs to realize two functions of input and output.

Input: Receive control instruction speed V and angular velocity w (v,w)-unit m/s RAD/S

Output: Robot relative posture X, y axis coordinates, angle th (x,y,th)--unit M M RAD

Feedback current robot speed CV and angular velocity CW if necessary

The above definition abstracts the robot into a moving particle, centered around the center of rotation of the robot in situ (non-mechanical or physical center), and the coordinate system is the right-hand system.


Having defined the coordinate system, we use a set of data to represent the position (x, y, TH) Coordinate system origin (0, 0, 0) of the robot's posture during the moving process (the location of the positions of the robots during the movement).

Usually we call the coordinate system of the robot's center of rotation called the robot coordinate system, the position of the robot relative to the power-up moment (0, 0, 0) is called the odometer coordinate system.

The robot accepts the control instruction (V, W) v refers to the speed in front of the robot, W refers to the angular velocity of the robot in situ rotation (counterclockwise is positive).

Our main problem is how to obtain the robot's odometer data, that is, the trajectory of the robot relative motion (x, y, Th).

First we look at the angle th, this is better understood.   is the current and all angles increment of the robot, angle increment = angular velocity * Time ∆th = CW *∆t; Th =∑∆th;

Then we look at the coordinates (x, y), which is the abstract point, in three steps:

The first step: Calculate the increment ∆x = V *∆t of the extended x-axis in the robot coordinate system, which is relative to the center of the robot;

Step Two: Convert this increment into a odometer coordinate system (∆X, ∆y), where the angle value of the upper cycle robot is used th;∆x ' = cos (th) ∆y ' = sin (th)

The third step is to ∆x The ∆y accumulates to the odometer x = x +∆x ' y = y +∆y ';

Talk about trouble, we give an example to illustrate, in fact, very good understanding.

We assume that several robots have such three moments t0 T1 T2, respectively, corresponding to: (for the convenience of calculating angle units for degrees deg deg/s)

T0: At the moment the robot is power-up, the robot coordinate system origin overlaps with the odometer coordinate system origin, which is located at the odometer coordinate system (0, 0, 0), at which point the robot moves forward 1 seconds at 0.2m/s speed.

T1: When the robot stops moving, it moves forward for 1 seconds at a speed of 0.2, so the posture is (0.2, 0, 0) under the mileage meter.

At this time the robot rotates at the angular velocity of deg/s 1 seconds, then stops turning at this time the posture of the odometer is (0.2, 0, 30).

T2: The moment the robot runs at 0.2m/s speed for 1 seconds. At the moment the robot stops moving, at which point the odometer coordinates are (0.373, 0.1, 30)

The figure above illustrates


Write so much first, the sample code is collated and then posted.

Finally make an advertisement tgv1.taobao.com kingspeed robot, this is I do heavy-duty robot chassis, please advise, thank you.

This blogger writes the more beautiful standard, everybody can look. http://blog.csdn.net/heyijia0327/article/details/47021861


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.