Autoware.Auto
|
|
Typedefs | |
using | Generator = std::mt19937 |
using | State = autoware_auto_vehicle_msgs::msg::VehicleKinematicState |
using | Point = autoware_auto_planning_msgs::msg::TrajectoryPoint |
using | Trajectory = autoware_auto_planning_msgs::msg::Trajectory |
using | Index = decltype(Trajectory::points)::size_type |
using | Real = decltype(Point::longitudinal_velocity_mps) |
Functions | |
MOTION_TESTING_PUBLIC State | make_state (Real x0, Real y0, Real heading, Real v0, Real a0, Real turn_rate, std::chrono::system_clock::time_point t) |
Makes a state, intended to make message generation more terse. More... | |
MOTION_TESTING_PUBLIC State | generate_state (Generator &gen) |
Generates a state from a normal distribution with the following bounds: TODO(c.ho) More... | |
MOTION_TESTING_PUBLIC Trajectory | generate_trajectory (const State &start_state, Generator &gen) |
Generates a trajectory assuming the starting state, a bicycle model, and additive noise applied to XXX Note: not implemented. More... | |
MOTION_TESTING_PUBLIC Trajectory | constant_trajectory (const State &start_state, std::chrono::nanoseconds dt) |
Generate a trajectory given the start state, assuming the highest derivatives are held constant. Note: heading_rate behavior will be kind of off TODO(c.ho) Note: lateral_velocity_mps will not be respected TODO(cho) More... | |
MOTION_TESTING_PUBLIC Trajectory | bad_heading_trajectory (const State &start_state, std::chrono::nanoseconds dt) |
Generates a constant velocity trajectory. More... | |
MOTION_TESTING_PUBLIC Trajectory | constant_velocity_trajectory (float x0, float y0, float heading, float v0, std::chrono::nanoseconds dt) |
Generates a constant velocity trajectory with invalid heading values. More... | |
MOTION_TESTING_PUBLIC Trajectory | constant_acceleration_trajectory (float x0, float y0, float heading, float v0, float a0, std::chrono::nanoseconds dt) |
Generates a constant acceleration trajectory. More... | |
MOTION_TESTING_PUBLIC Trajectory | constant_velocity_turn_rate_trajectory (float x0, float y0, float heading, float v0, float turn_rate, std::chrono::nanoseconds dt) |
Generates a constant velocity and constant turn rate trajectory. More... | |
MOTION_TESTING_PUBLIC Trajectory | constant_acceleration_turn_rate_trajectory (float x0, float y0, float heading, float v0, float a0, float turn_rate, std::chrono::nanoseconds dt) |
Generates a constant acceleration and constant turn rate trajectory. More... | |
MOTION_TESTING_PUBLIC void | next_state (const Trajectory &trajectory, State &state, uint32_t hint, Generator *gen=nullptr) |
MOTION_TESTING_PUBLIC Index | progresses_towards_target (const Trajectory &trajectory, const Point &target, Real heading_tolerance=Real{0.006F}) |
MOTION_TESTING_PUBLIC Index | dynamically_feasible (const Trajectory &trajectory, Real tolerance=0.05F) |
Trajectory | constant_velocity_trajectory (const Real x0, const Real y0, const Real heading, const Real v0, const std::chrono::nanoseconds dt) |
Trajectory | constant_acceleration_trajectory (const Real x0, const Real y0, const Real heading, const Real v0, const Real a0, const std::chrono::nanoseconds dt) |
Trajectory | constant_velocity_turn_rate_trajectory (const Real x0, const Real y0, const Real heading, const Real v0, const Real turn_rate, const std::chrono::nanoseconds dt) |
Trajectory | constant_acceleration_turn_rate_trajectory (const Real x0, const Real y0, const Real heading, const Real v0, const Real a0, const Real turn_rate, const std::chrono::nanoseconds dt) |
using motion::motion_testing::Generator = typedef std::mt19937 |
using motion::motion_testing::Index = typedef decltype(Trajectory::points)::size_type |
using motion::motion_testing::Point = typedef autoware_auto_planning_msgs::msg::TrajectoryPoint |
using motion::motion_testing::Real = typedef decltype(Point::longitudinal_velocity_mps) |
using motion::motion_testing::State = typedef autoware_auto_vehicle_msgs::msg::VehicleKinematicState |
using motion::motion_testing::Trajectory = typedef autoware_auto_planning_msgs::msg::Trajectory |
Trajectory motion::motion_testing::bad_heading_trajectory | ( | const State & | start_state, |
std::chrono::nanoseconds | dt | ||
) |
Generates a constant velocity trajectory.
Trajectory motion::motion_testing::constant_acceleration_trajectory | ( | const Real | x0, |
const Real | y0, | ||
const Real | heading, | ||
const Real | v0, | ||
const Real | a0, | ||
const std::chrono::nanoseconds | dt | ||
) |
MOTION_TESTING_PUBLIC Trajectory motion::motion_testing::constant_acceleration_trajectory | ( | float | x0, |
float | y0, | ||
float | heading, | ||
float | v0, | ||
float | a0, | ||
std::chrono::nanoseconds | dt | ||
) |
Generates a constant acceleration trajectory.
Trajectory motion::motion_testing::constant_acceleration_turn_rate_trajectory | ( | const Real | x0, |
const Real | y0, | ||
const Real | heading, | ||
const Real | v0, | ||
const Real | a0, | ||
const Real | turn_rate, | ||
const std::chrono::nanoseconds | dt | ||
) |
MOTION_TESTING_PUBLIC Trajectory motion::motion_testing::constant_acceleration_turn_rate_trajectory | ( | float | x0, |
float | y0, | ||
float | heading, | ||
float | v0, | ||
float | a0, | ||
float | turn_rate, | ||
std::chrono::nanoseconds | dt | ||
) |
Generates a constant acceleration and constant turn rate trajectory.
Trajectory motion::motion_testing::constant_trajectory | ( | const State & | start_state, |
std::chrono::nanoseconds | dt | ||
) |
Generate a trajectory given the start state, assuming the highest derivatives are held constant. Note: heading_rate behavior will be kind of off TODO(c.ho) Note: lateral_velocity_mps will not be respected TODO(cho)
Trajectory motion::motion_testing::constant_velocity_trajectory | ( | const Real | x0, |
const Real | y0, | ||
const Real | heading, | ||
const Real | v0, | ||
const std::chrono::nanoseconds | dt | ||
) |
MOTION_TESTING_PUBLIC Trajectory motion::motion_testing::constant_velocity_trajectory | ( | float | x0, |
float | y0, | ||
float | heading, | ||
float | v0, | ||
std::chrono::nanoseconds | dt | ||
) |
Generates a constant velocity trajectory with invalid heading values.
Trajectory motion::motion_testing::constant_velocity_turn_rate_trajectory | ( | const Real | x0, |
const Real | y0, | ||
const Real | heading, | ||
const Real | v0, | ||
const Real | turn_rate, | ||
const std::chrono::nanoseconds | dt | ||
) |
MOTION_TESTING_PUBLIC Trajectory motion::motion_testing::constant_velocity_turn_rate_trajectory | ( | float | x0, |
float | y0, | ||
float | heading, | ||
float | v0, | ||
float | turn_rate, | ||
std::chrono::nanoseconds | dt | ||
) |
Generates a constant velocity and constant turn rate trajectory.
Index motion::motion_testing::dynamically_feasible | ( | const Trajectory & | trajectory, |
Real | tolerance = 0.05F |
||
) |
Checks that a trajectory is more or less dynamically feasible given the derivatives; tolerance is relative tolerance of trajectory, index is first point that is not dynamically feasible, trajectory.size() if completely feasible
Generates a state from a normal distribution with the following bounds: TODO(c.ho)
Trajectory motion::motion_testing::generate_trajectory | ( | const State & | start_state, |
Generator & | gen | ||
) |
Generates a trajectory assuming the starting state, a bicycle model, and additive noise applied to XXX Note: not implemented.
State motion::motion_testing::make_state | ( | Real | x0, |
Real | y0, | ||
Real | heading, | ||
Real | v0, | ||
Real | a0, | ||
Real | turn_rate, | ||
std::chrono::system_clock::time_point | t | ||
) |
Makes a state, intended to make message generation more terse.
void motion::motion_testing::next_state | ( | const Trajectory & | trajectory, |
State & | state, | ||
uint32_t | hint, | ||
Generator * | gen = nullptr |
||
) |
Given a trajectory, advance state to next trajectory point, with normally distributed noise Note: This version takes "hint" as gospel, and doesn't try to do any time/space matching Note: not implemented
Index motion::motion_testing::progresses_towards_target | ( | const Trajectory & | trajectory, |
const Point & | target, | ||
Real | heading_tolerance = Real{0.006F} |
||
) |
Checks that a trajectory makes constant progress towards a target; returns first index of point that doesn't advance towards target, otherwise size of trajectory heading tolerance is in dot product space of 2d quaternion