Engineering Asked by zed_eln on January 3, 2021
differential drive vehicle in world frame
what would change in the kinematic model of the differential drive vehicle if i wanted to simulate it
using pygame module in python ( pygame or opencv or any other one )
x_dot = (vl+vr)/2*cos(theta)
y_dot = (vl+vr)/2*sin(theta)
theta_dot = (vr-vl)/w
vr is the velocity of the right wheel
vl is the velocity of the left wheel
theta is the heading angle
it uses a screen coords system which start at the top left corner of the screen insted of the lower left
my initial guess is since only the y axis is inverted then i should invert the sign of the y_dot
i hope i explained my question clearly the picture is in the link above
The kinematics equation should remain the same. The only problem I see is with the third equation which should be
theta_dot = (vr-vl)/W
What you need to consider on top of those equations since you are working with screen pixels is:
x = 0.0
y = 0.0
x = x+ x_dot*dt
y = y+ y_dot*dt
theta = theta+ theta_dot*dt
where dt
is the timestep you want to use.
Correct answer by NMech on January 3, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP