Versions Compared

Key

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

...

As can be inferred from previous section, spot turn to a specific heading at a waypoint can be achieved by copying that waypoint, changing the duplicates speed to zero, heading field to the desired heading and indicating absolute heading.

Code Block
# output a plan from trajectory with fields x,y,speed,heading,is_absolute with speed=1 and both heading and is_absolute are set to 0
> csv-paste - 'value=1,0,0' < trajectory.csv
0.0,0.0,1,0,0
0.3,0.3,1,0,0
0.6,0.6,1,0,0
0.6,0.9,1,0,0
0.6,1.2,1,0,0
0.9,1.2,1,0,0
1.2,1.2,1,0,0
1.5,0.9,1,0,0
1.8,0.6,1,0,0

# Spot turn at (0.6,1.2), by copying it and setting 0 speed and 1.5 absolute heading. Make sure to decelerate to that point
> cat <<EOF > plan.csv
0.0,0.0,1,0,0
0.3,0.3,1,0,0
0.6,0.6,1,0,0
0.6,0.9,0.6,0,0
0.6,1.2,0.3,0,0
0.6,1.2,0,1.5,1
0.9,1.2,1,0,0
1.2,1.2,1,0,0
1.5,0.9,1,0,0
1.8,0.6,1,0,0
EOF

 

Control

Turning plan waypoints into control commands for a vehicle

...