Autoware.Auto
test_ne_raptor_interface.hpp File Reference

This file defines the NERaptorInterfaceTest class. More...

#include <gtest/gtest.h>
#include <ne_raptor_interface/ne_raptor_interface.hpp>
#include <ne_raptor_interface/test_ne_raptor_interface_listener.hpp>
#include <ne_raptor_interface/test_ne_raptor_interface_talker.hpp>
#include <chrono>
#include <cmath>
#include <cstdint>
#include <fstream>
#include <memory>
#include <thread>
Include dependency graph for test_ne_raptor_interface.hpp:

Go to the source code of this file.

Classes

class  NERaptorInterfaceTest
 Class for testing NERaptorInterface. More...
 
struct  NERaptorInterfaceTest::test_hmcr
 
struct  NERaptorInterfaceTest::test_vsc
 
struct  NERaptorInterfaceTest::test_hlcc
 
struct  NERaptorInterfaceTest::test_vcc
 
struct  NERaptorInterfaceTest::test_vsr
 
struct  NERaptorInterfaceTest::test_vo
 
struct  NERaptorInterfaceTest::test_vks
 

Functions

template<typename T >
void wait_for_subscriber (const T &pub_ptr, const uint32_t num_expected_subs=1U, std::chrono::milliseconds match_timeout=std::chrono::seconds{10U})
 
template<typename T >
void wait_for_publisher (const T &sub_ptr, const uint32_t num_expected_pubs=1U, std::chrono::milliseconds match_timeout=std::chrono::seconds{10U})
 

Variables

const uint16_t c_ecu_build_num = 0xABCD
 
const float32_t c_front_axle_to_cog = 1.5F
 
const float32_t c_rear_axle_to_cog = 0.5F
 
const float32_t c_steer_to_tire_ratio = 2.0F
 
const float32_t c_max_steer_angle = 500.0F
 
const float32_t c_accel_limit = 3.0F
 
const float32_t c_decel_limit = 3.0F
 
const float32_t c_pos_jerk_limit = 9.0F
 
const float32_t c_neg_jerk_limit = 9.0F
 
const uint32_t c_pub_period = 100
 
static constexpr uint8_t SERVICE_TIMEOUT = 5
 
static constexpr uint8_t kNumRollOver {0x10}
 
static constexpr uint8_t kNumTests_HMCR {7}
 
static constexpr uint8_t kTestValid_VSC {5}
 
static constexpr uint8_t kTestInvalid_VSC {14}
 
static constexpr uint8_t kNumTests_VSC {kTestValid_VSC + kTestInvalid_VSC}
 
static constexpr uint8_t kNumTests_HLCC {8}
 
static constexpr uint8_t kNumTests_VCC {12}
 
static constexpr uint8_t kTestValid_VSR {4}
 
static constexpr uint8_t kTestInvalid_VSR {1}
 
static constexpr uint8_t kNumTests_VSR {kTestValid_VSR + kTestInvalid_VSR}
 
static constexpr uint8_t kNumTests_VO {18}
 
static constexpr uint8_t kTestValid_VKS {18}
 
static constexpr uint8_t kTestInvalid_VKS {1}
 
static constexpr uint8_t kNumTests_VKS {kTestValid_VKS + kTestInvalid_VKS}
 
const std::chrono::nanoseconds C_TIMEOUT_NANO = 1000000000ns
 
const std::chrono::milliseconds C_TIMEOUT_MILLI = std::chrono::milliseconds(c_pub_period)
 
const uint8_t C_TIMEOUT_ITERATIONS = 25
 

Detailed Description

This file defines the NERaptorInterfaceTest class.

Function Documentation

◆ wait_for_publisher()

template<typename T >
void wait_for_publisher ( const T &  sub_ptr,
const uint32_t  num_expected_pubs = 1U,
std::chrono::milliseconds  match_timeout = std::chrono::seconds{10U} 
)

◆ wait_for_subscriber()

template<typename T >
void wait_for_subscriber ( const T &  pub_ptr,
const uint32_t  num_expected_subs = 1U,
std::chrono::milliseconds  match_timeout = std::chrono::seconds{10U} 
)

Variable Documentation

◆ c_accel_limit

const float32_t c_accel_limit = 3.0F

◆ c_decel_limit

const float32_t c_decel_limit = 3.0F

◆ c_ecu_build_num

const uint16_t c_ecu_build_num = 0xABCD

◆ c_front_axle_to_cog

const float32_t c_front_axle_to_cog = 1.5F

◆ c_max_steer_angle

const float32_t c_max_steer_angle = 500.0F

◆ c_neg_jerk_limit

const float32_t c_neg_jerk_limit = 9.0F

◆ c_pos_jerk_limit

const float32_t c_pos_jerk_limit = 9.0F

◆ c_pub_period

const uint32_t c_pub_period = 100

◆ c_rear_axle_to_cog

const float32_t c_rear_axle_to_cog = 0.5F

◆ c_steer_to_tire_ratio

const float32_t c_steer_to_tire_ratio = 2.0F

◆ C_TIMEOUT_ITERATIONS

const uint8_t C_TIMEOUT_ITERATIONS = 25

◆ C_TIMEOUT_MILLI

const std::chrono::milliseconds C_TIMEOUT_MILLI = std::chrono::milliseconds(c_pub_period)

◆ C_TIMEOUT_NANO

const std::chrono::nanoseconds C_TIMEOUT_NANO = 1000000000ns

◆ kNumRollOver

constexpr uint8_t kNumRollOver {0x10}
staticconstexpr

◆ kNumTests_HLCC

constexpr uint8_t kNumTests_HLCC {8}
staticconstexpr

◆ kNumTests_HMCR

constexpr uint8_t kNumTests_HMCR {7}
staticconstexpr

◆ kNumTests_VCC

constexpr uint8_t kNumTests_VCC {12}
staticconstexpr

◆ kNumTests_VKS

constexpr uint8_t kNumTests_VKS {kTestValid_VKS + kTestInvalid_VKS}
staticconstexpr

◆ kNumTests_VO

constexpr uint8_t kNumTests_VO {18}
staticconstexpr

◆ kNumTests_VSC

constexpr uint8_t kNumTests_VSC {kTestValid_VSC + kTestInvalid_VSC}
staticconstexpr

◆ kNumTests_VSR

constexpr uint8_t kNumTests_VSR {kTestValid_VSR + kTestInvalid_VSR}
staticconstexpr

◆ kTestInvalid_VKS

constexpr uint8_t kTestInvalid_VKS {1}
staticconstexpr

◆ kTestInvalid_VSC

constexpr uint8_t kTestInvalid_VSC {14}
staticconstexpr

◆ kTestInvalid_VSR

constexpr uint8_t kTestInvalid_VSR {1}
staticconstexpr

◆ kTestValid_VKS

constexpr uint8_t kTestValid_VKS {18}
staticconstexpr

◆ kTestValid_VSC

constexpr uint8_t kTestValid_VSC {5}
staticconstexpr

◆ kTestValid_VSR

constexpr uint8_t kTestValid_VSR {4}
staticconstexpr

◆ SERVICE_TIMEOUT

constexpr uint8_t SERVICE_TIMEOUT = 5
staticconstexpr