CMM-22 / a2

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

Guideline for Trajectory Planning #21

Open Sibsoon opened 2 years ago

Sibsoon commented 2 years ago

Hi I am very uncertain how exactly the trajectory planning should behave. Since there is no exact description but I expect to be graded by some sorts of test I would appreciate some clarification.

I read in another thread that if there are no velocities but only a turning speed the robodog should turn in place. I assume that when a forward velocity and a turning speed is defined the robodog should walk a circle, yet I am not entirely sure if this is right. This brings up the question why we have a sideways velocity? Is our robot able to move sideways then? If only a sideways velocity and a turning speed is defined, is the robodog supposed to walk a sideways circle or does he "slides"(or walks) sidewas while turning (doing a pirouette).

trajectory

The assignment slides and the recording unfortunately don't clarify this either. thx

eastskykang commented 2 years ago

Hi,

We want the robot base(body)'s center of mass follows the velocity command. Here the velocity command is a vector [vf, vs, w] where vf is forward speed of base (in m/s), vs is sideways speed of base (in m/s), and finally w (in rad/s) is turning rate of the base.

Note that vf, vs are horizontal velocity of the robot in its local frame. If the robot's heading toward certain direction, the forward speed is the speed of the base toward that direction

grafik

A trajectory according 0.7 m/s forward speed when the robot's heading angle is non-zero.

Of course, our dogbot can move sideways too (the system is holonomic!). In fact, it can move toward any horizontal direction unlike a car where of the motion is constrained to its heading.

ezgif-1-77ba3b1e95

Finally, the turning rate is yaw rate of the robot. It is a entity defined in global frame. Thus, for the velocity command [0, 0, w], the center of the mass of the base should stay in the same position while the heading angle of the base changes over time.

ezgif-1-003940293c

The motion according to 0.4 rad/s turning rate

Here are reference trajectory for [vf=0.2, vs=0, w=-0.3] and [vf=0, vs=0.2, w=-0.3] for your info.

grafik grafik

Here're some hints for trajectory planning.

Let's compute the global position and heading angle of the robot at timestep i+1 given the position and heading angle at i. This will be i+1th knot of a reference trajectory. i = 0 is the current timestep.

Let's start from the heading angle. The heading angle of the robot at timestep i+1 can be expressed as the following:

θi+1 = θi + wh

where h is a size of timestep. So from i=0, you can start numerical integration for computing θ for every timestep over the trajectory's time-horizon.

For global position of the base, don't forget to consider the heading of the robot. You have to convert vf, vs into global frame entities. Then, you can integrate it for global position as we did for the heading angle. I hope this helps.

Sibsoon commented 2 years ago

thank you very much.

kaikai23 commented 2 years ago

Hi Dongho, thank you for the test cases!

My robot bahaves correctly in your above settings, but when the forward speed gets higher (e.g., 2m/s), the dog's legs become unrealistic, as shown in the picture.

Should I fix this problem or is it fine to just have it like this?

image
eastskykang commented 2 years ago

@kaikai23 could you create a separated issue thread?