How to calculate total distance covered, time taken and total angle turned by differential drive kinetic model of robot in navigatiom?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
AMINU ZIMIT
am 20 Feb. 2022
Bearbeitet: Cameron Stabile
am 22 Feb. 2022
After navigation the robot (differential drive kinetic) from one point to another, through waypoints, i would like to find the following output, total distance covered, time taken to complete the navigation, and total angle turned by robot to comple the movement.
0 Kommentare
Akzeptierte Antwort
Cameron Stabile
am 22 Feb. 2022
Bearbeitet: Cameron Stabile
am 22 Feb. 2022
Hi Aminu,
While navigating your robot, you will likely have access to the state derivative (or vehicle commands) applied during your path-following. Assuming that your commands/state-derivative are constant between each timestep, you can calculate your desired metrics via simple integration.
Assuming your system follows standard differentialDriveKinematics, the commands for your robot are , velocity and angular velocity, respectively:
% Define a random sequence of commands that were applied to your robot
v = rand(100,1);
w = (rand(100,1)-.5)
% Assume a fixed control step-size
dt = 0.1;
% Assuming that controls are held constant between each step, integrate
% the controls over the trajectory to calculate total change in distance/angle.
totalDist = sum(abs(v*dt));
totalChangeInAngle = sum(abs(w*dt));
totalTime = dt*numel(v);
If your commands are instead given in terms of wheelspeed (), you can use these formulas for converting them to generalized commands.
Hope this helps,
Cameron
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Robotics finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!