CMM-22 / a2

CMM Assignment 2 - Kinematic walking controller
1 stars 0 forks source link

Exercice 3 forward direction #8

Open samibouziri opened 2 years ago

samibouziri commented 2 years ago

Hello,

I was wondering in exercise 3 if changing the forward direction of the robot was supposed to be done atomatically once we update the headingAngle or was it also our resposibility to change it, because for the moment i have robot that is changing his heading angle but keeps the forward direction to (0,0,1). in other words when applying a vforward and a turing speed >0 the robot goes in the direction (0,0,1) while turing around himself.

Thanks

eastskykang commented 2 years ago

Do not change/update member variable forward of robot instance. Consider this member variable points forward direction of robot in its local coordinate system. Rather, you have to compute a vector pointing forward direction of the robot in global coordinate system for every time step.

Note. Our convention is u-up and z-forward axes.

samibouziri commented 2 years ago

So just to be sure, the expected behavior, when setting the forward and turning speed to a value >0, is the robot going around in circles or the robot going on a straight line while turning around himself ? because for some odd reason the variable forward of the robot instance doesn't change throught time eventhough the robot is clearly turning in the simulation.

eastskykang commented 2 years ago

You can consider the velocity command as a desired horizontal speed of the center of mass of the trunk and turning rate in its local coordinate system.

Thus, if you give zero forward, sideways command speed and turning speed > 0, the horizontal position of the robot's trunk should stay the same i.e. the robot must rotate in place.

Again, the member variable forward points forward direction of the robot in its local frame. It should remain as a constant all the time. Thus, you have to create a new variable in TODO part that holds a vector pointing forward direction in global coordinate system that is time-variant.

eastskykang commented 2 years ago

Remark. You don't have to change anything from the part if it's not marked as TODO for ex.1-4.