Class Sender

Inheritance Relationships

Base Type

  • public off_highway_can::Sender

Class Documentation

class Sender : public off_highway_can::Sender

Radar sender class to encode CAN frames. Encodes twist (forward velocity and yaw rate) input as CAN frame.

Public Types

using Message = off_highway_can::Message
using RadarInput = geometry_msgs::msg::TwistStamped

Public Functions

explicit Sender(const rclcpp::NodeOptions &options = rclcpp::NodeOptions())

Construct a new Sender object.

~Sender() = default

Destroy the Sender object.

Protected Functions

void callback_input(const RadarInput::ConstSharedPtr &msg)

Map received data to message signals, encode the messages and send them as CAN frame.

Parameters:

msg – Received message data

void fillMessageDefinitions()

Fill message definitions to encode frames of CAN node. Only stored definitions are sent.

Protected Attributes

rclcpp::Subscription<RadarInput>::SharedPtr input_sub_
uint32_t ego_velocity_id_
uint32_t yaw_rate_id_
double allowed_age_

Allowed age of input message to process.

Protected Static Attributes

static constexpr double kRadToDegree = 180.0 / M_PI