Autoware.Auto
Trajectory spoofer

This is the design document for the trajectory_spoofer package.

Purpose / Use cases

This package provides a ROS2 node and class for generating trajectories that can be used for testing as a replacement for motion planning. This is done to be able test components that need a valid trajectory without being dependent on a motion planner or localization. Additionally, this module gives control over the type of trajectory generated and provides repeatability, unlike using a motion planner.

This package is intended to be used to test a controller in simulation only.

Design

This node listens to a vehicle state and uses the first position received as the starting point in the trajectory. Based on parameters, the node uses the trajectory_spoofer class to generate a trajectory. Trajectories are based on simple geometric patterns like a straight line or circle.

Assumptions / Known limits

Trajectory will use the same TF frame as the incoming state message.

Inputs / Outputs / API

Parameters:

  • speed_ramp_on (bool) : Currently not used
  • target_speed (float): Speed used in all trajectory points
  • num_of_points (int): Number of points to generate on the trajectory (max 100)
  • trajectory_type (string): Currently supports only 'straight' or 'circle'
  • length (float): Length of trajectory in meters, only used for trajectory_type='straight'
  • radius (float): Radius of trajectory in meters, only used for trajectory_type='circle'

Inputs:

  • autoware_auto_msgs/msg/VehicleKinematicState is the state that is set as the starting point and also triggers trajectory publishing

Outputs:

  • autoware_auto_msgs/msg/Trajectory is the trajectory that gets published

Launch:

Inner-workings / Algorithms

Error detection and handling

Not meant for production use.

Security considerations

Not meant for production use, only for limited testing and only in simulation.

References / External links

Future extensions / Unimplemented parts

  • Add other types of geometry patterns like curvature, figure-eight, lane change, right/left turn, U-turn, etc.
  • Add different velocity profiles like ramping up, ramping down, ramping up and down, oscillatory, sudden brake, etc.

Related issues

  • #233 Create dummy trajectory spoofer