Page History
...
Define the ID of the vehicle you want to drive. Read the ID in from the LCC using the function "cmd_parameter_ints()" from our cpm library.
Initialize a DDS Writer for the RTI DDS Service to ensure that position and speed will be sent to the simulation and the vehicle. Write on the topic "vehicleCommandTrajectory
" with datatype "VehicleCommandTrajectory
". The topic's name is the name of the datatype with a lowercase letter.
...
Define the speed vector of the vehicle for each point for the entire trajectory. When you define v_x and v_y 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. Always assign at least a small value to both vectors to ensure the correct direction. Remember that your are defining a physical system, so avoid sharp edges.
...
Now implement your points and speed values using the predefined vetors trajectory_px
and trajectory_py
for your points of the trajectory and trajectory_vx
and trajectory_vy
for the speed at each point. The speed is given in m/s. Set the center of the circle to the center of the map at x =2,25m and y= 2m.
...