- #1
PainterGuy
- 940
- 70
Data:
The speed of right wheel is considered to be 25 RPM.
The speed of left wheel is considered to be 20 RPM.
The distance, L, between wheels is 30 cm.
Also the radius, r, of each wheel is 6 cm.
Question:
Using the data above for a differential robot, find the following:
i: angular velocity of robot
ii: linear velocity of robot
iii: find location of the ICC/ICR
iv: Suppose the robot's original configuration is given by the coordinates
(55 cm, 60 cm, 0°). Find the position and orientation after 6 s.
I need help with part iv.
I tried to use Euler's approximation for part iv.
$$x(k+1)=\left[ \frac{v_{L}+v_{R}}{2}\cos \left\{ \theta (k\right\} \right] \Delta T+x(k)$$
$$y(k+1)=\left[ \frac{v_{L}+v_{R}}{2}\sin \left\{ \theta (k\right\} \right] \Delta T+y(k)$$
$$\theta (k+1)=\left[ \frac{v_{L}+v_{R}}{L}\right] \Delta T+\theta (k)$$
I tried to solve it here. Please jump to the part iv at the bottom. I tried to implement it in Matlab but it looks like something is wrong. I understand that there would be far better ways to write the code but I wanted to know if my method is okay. Could you please help me with it? The way I did it x(k+1) and y(k+1) give total distance moved but aren't x(k+1) and y(k+1) supposed to give coordinates of the point the robot is at after 6 seconds?
The speed of right wheel is considered to be 25 RPM.
The speed of left wheel is considered to be 20 RPM.
The distance, L, between wheels is 30 cm.
Also the radius, r, of each wheel is 6 cm.
Question:
Using the data above for a differential robot, find the following:
i: angular velocity of robot
ii: linear velocity of robot
iii: find location of the ICC/ICR
iv: Suppose the robot's original configuration is given by the coordinates
(55 cm, 60 cm, 0°). Find the position and orientation after 6 s.
I need help with part iv.
I tried to use Euler's approximation for part iv.
$$x(k+1)=\left[ \frac{v_{L}+v_{R}}{2}\cos \left\{ \theta (k\right\} \right] \Delta T+x(k)$$
$$y(k+1)=\left[ \frac{v_{L}+v_{R}}{2}\sin \left\{ \theta (k\right\} \right] \Delta T+y(k)$$
$$\theta (k+1)=\left[ \frac{v_{L}+v_{R}}{L}\right] \Delta T+\theta (k)$$
I tried to solve it here. Please jump to the part iv at the bottom. I tried to implement it in Matlab but it looks like something is wrong. I understand that there would be far better ways to write the code but I wanted to know if my method is okay. Could you please help me with it? The way I did it x(k+1) and y(k+1) give total distance moved but aren't x(k+1) and y(k+1) supposed to give coordinates of the point the robot is at after 6 seconds?
Matlab:
clear all; close all; clc;
k=linspace(0,6,200);
theta(1)=0;
deltaT=(6-0)/200;
x(1)=55;
y(1)=60;
L=30;
vL=2;
vR=2.5;
for k=1:200
theta(k+1)=(((vL-vR)/L)).*deltaT+theta(k);
x(k+1)=(((vL+vR)./2).*cos(theta(k)))*deltaT+x(k);
y(k+1)=(((vL+vR)./2).*sin(theta(k)))*deltaT+y(k);
end
sum(x)
sum(y)
sum(theta)