19#include <rclcpp/rclcpp.hpp>
55 std::vector<uint8_t>
getMsgId(
const rclcpp::Time now,
double secs);
The class containing the primary business logic for the BSM Generator Package.
rclcpp::Time last_id_generation_time_
std::default_random_engine generator_
float getSteerWheelAngleInRange(const double angle)
Function to apply minimum and maximum limits to a steering wheel angle value. Minimum limit is -189....
float getYawRateInRange(const double yaw_rate)
Function to apply minimum and maximum limits to a yaw rate value. Minimum limit is -327....
float getSpeedInRange(const double speed)
Function to apply minimum and maximum limits to a speed value. Minimum limit is 0....
BSMGeneratorWorker()
Default Constructor for BSMGeneratorWorker.
float getLongAccelInRange(const float accel)
Function to apply minimum and maximum limits to a longitudinal acceleration value....
std::vector< uint8_t > getMsgId(const rclcpp::Time now, double secs)
Function to obtain the current BSM message ID. The ID is updated to a new random BSM message ID every...
uint8_t getNextMsgCount()
Function to increment the BSM message counter and obtain the new counter value. Counter restarts at 0...
uint8_t getBrakeAppliedStatus(const double brake)
Function to convert the current applied brake status to a value used within the BSM message.
uint16_t getSecMark(const rclcpp::Time now)
Function to obtain the 'milliseconds' mark of the provided time within the last minute.
float getHeadingInRange(const float heading)
Function to apply minimum and maximum limits to a vehicle heading value. Minimum limit is 0....