Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The You find the source code example forfor our examples in the software-folder:

C++
cd ~\dev\software\basic_circle_example\src

...

In the next step you define the points and the speed of your vehicle at each point for your entire trajectory. When you use v_x and v_y keep in mind that this is not the actual speed but the speed vector at your current location (remember that vges = sqrt(vx^2 +vy^2) as it is a vector). You use this vector to define the direction for your vehicle, so where it has to steer next:


Image Modified


Image Modified


When you define the speed vector also be aware that the tangent will fit with the vector/tangent from the previous point and that the shape of the curve is not only affected by the vector of the starting point but also of the vector at the end point/next starting point. It turns out that it is the easiest way to define your speed vector by drawing our shape first and define the signs of your vectors to ensure the right orientations. It is recommanded to always define a speed for both v_x and v_y, even if it is a small value, to ensure the right orientation of your vehicle. Last but not least remember that your are giving a trajectory to a physical system so sharp edges won't be possible.

...