scenario_simulator_v2 C++ API
|
#include <gtest/gtest.h>
#include <cmath>
#include <geometry_msgs/msg/accel.hpp>
#include <geometry_msgs/msg/twist.hpp>
#include <geometry_msgs/msg/vector3.hpp>
#include <traffic_simulator/behavior/longitudinal_speed_planning.hpp>
#include "../expect_eq_macros.hpp"
Classes | |
class | LongitudinalSpeedPlannerTest |
Macros | |
#define | EXPECT_CONSTRAINTS_BOUNDED(DATA, lower, upper) |
Functions | |
int | main (int argc, char **argv) |
auto | makeTwistWithLinearX (double x) -> geometry_msgs::msg::Twist |
auto | makeAccelWithLinearX (double x) -> geometry_msgs::msg::Accel |
TEST_F (LongitudinalSpeedPlannerTest, isAccelerating_true) | |
TEST_F (LongitudinalSpeedPlannerTest, isAccelerating_false) | |
TEST_F (LongitudinalSpeedPlannerTest, isDecelerating_true) | |
TEST_F (LongitudinalSpeedPlannerTest, isDecelerating_false) | |
TEST_F (LongitudinalSpeedPlannerTest, getAccelerationDuration_acceleration) | |
TEST_F (LongitudinalSpeedPlannerTest, getAccelerationDuration_targetSpeed_difference) | |
TEST_F (LongitudinalSpeedPlannerTest, getDynamicStates_targetSpeedOverLimit) | |
TEST_F (LongitudinalSpeedPlannerTest, getDynamicStates_maxJerk) | |
TEST_F (LongitudinalSpeedPlannerTest, getDynamicStates_shortAccel) | |
TEST_F (LongitudinalSpeedPlannerTest, isTargetSpeedReached_different) | |
TEST_F (LongitudinalSpeedPlannerTest, isTargetSpeedReached_same) | |
TEST_F (LongitudinalSpeedPlannerTest, getRunningDistance_shortTime) | |
TEST_F (LongitudinalSpeedPlannerTest, getRunningDistance_longTime) | |
TEST_F (LongitudinalSpeedPlannerTest, getRunningDistance_zero) | |
#define EXPECT_CONSTRAINTS_BOUNDED | ( | DATA, | |
lower, | |||
upper | |||
) |
int main | ( | int | argc, |
char ** | argv | ||
) |
auto makeAccelWithLinearX | ( | double | x | ) | -> geometry_msgs::msg::Accel |
auto makeTwistWithLinearX | ( | double | x | ) | -> geometry_msgs::msg::Twist |
TEST_F | ( | LongitudinalSpeedPlannerTest | , |
getAccelerationDuration_acceleration | |||
) |
Actual duration calculated by hand based on input. Tolerance value chosen as very small, but acceptable numerical error.
TEST_F | ( | LongitudinalSpeedPlannerTest | , |
getAccelerationDuration_targetSpeed_difference | |||
) |
TEST_F | ( | LongitudinalSpeedPlannerTest | , |
getDynamicStates_maxJerk | |||
) |
TEST_F | ( | LongitudinalSpeedPlannerTest | , |
getDynamicStates_shortAccel | |||
) |
TEST_F | ( | LongitudinalSpeedPlannerTest | , |
getDynamicStates_targetSpeedOverLimit | |||
) |
TEST_F | ( | LongitudinalSpeedPlannerTest | , |
getRunningDistance_longTime | |||
) |
TEST_F | ( | LongitudinalSpeedPlannerTest | , |
getRunningDistance_shortTime | |||
) |
TEST_F | ( | LongitudinalSpeedPlannerTest | , |
getRunningDistance_zero | |||
) |
TEST_F | ( | LongitudinalSpeedPlannerTest | , |
isAccelerating_false | |||
) |
TEST_F | ( | LongitudinalSpeedPlannerTest | , |
isAccelerating_true | |||
) |
TEST_F | ( | LongitudinalSpeedPlannerTest | , |
isDecelerating_false | |||
) |
TEST_F | ( | LongitudinalSpeedPlannerTest | , |
isDecelerating_true | |||
) |
TEST_F | ( | LongitudinalSpeedPlannerTest | , |
isTargetSpeedReached_different | |||
) |
TEST_F | ( | LongitudinalSpeedPlannerTest | , |
isTargetSpeedReached_same | |||
) |