duckietown / gym-duckietown

Self-driving car simulator for the Duckietown universe
http://duckietown.org
Other
51 stars 19 forks source link

Asymmetric kinematic model #63

Closed abdelq closed 6 years ago

abdelq commented 6 years ago

Related to #34. Not sure if I'm doing this right, @maximecb @bhairavmehta95.

maximecb commented 6 years ago

It looks right with respect to the wheel distances, but you are missing the asymmetric wheel radii.

Nitpick: I would have just one constant definition for WHEEL_DIST since there is only one value, but change that value to half of what it currently is. Otherwise I think you are on the right track. I would just make sure to test everything, and maybe try directly playing with the wheel radii and wheel distances (by assigning them manually) to see if the model behaves as you would expect. You can use the '--draw-bbox' option in the manual_control.py script to see the Duckiebot moving from above.

abdelq commented 6 years ago

Pushed new changes following the feedback, tested and tweaked the perturbation scale. The results are reasonable now.

I would have just one constant definition for WHEEL_DIST since there is only one value, but change that value to half of what it currently is.

Good point!

maximecb commented 6 years ago

The code to convert between (velocity, steering) and differential drive should ideally be left unchanged, because it's an exact port of the code that runs on the real robot. It's the differential drive code in _update_pos that should be altered to take the two wheel radii into account.

maximecb commented 6 years ago

I'm going to close this for now because it doesn't seem like a priority for the competition, and I would like to fix the velocity+steering issue first.