Class Sender
Defined in File sender.hpp
Inheritance Relationships
Base Type
public rclcpp::Node
Class Documentation
-
class Sender : public rclcpp::Node
Abstract sender class to encode CAN (FD) frames. Needs to be extended for specific CAN messages.
Public Types
-
using FrameId = uint32_t
-
using DiagTask = diagnostic_updater::GenericFunctionDiagnosticTask<diagnostic_updater::DiagnosticStatusWrapper>
-
using DiagCompositeTask = diagnostic_updater::CompositeDiagnosticTask
Public Functions
-
explicit Sender(const std::string &node_name = "sender", const rclcpp::NodeOptions &options = rclcpp::NodeOptions(), bool use_fd = false)
Construct a new Sender object.
- Parameters:
node_name – Name of the node
options – Node options
use_fd – Enable CAN FD frames
-
void send_can()
Encode messages into CAN frames and send them.
Protected Functions
-
template<typename Msg>
void send_can(FrameId id, Message &message) Encode message into CAN frame and send it.
- Parameters:
id – Frame ID
message – Message to send
- Template Parameters:
Msg – Type of ROS message to send
Add diagnostic task to composite task for including it in the diagnostic updater.
- Parameters:
task – Task to add
-
void force_diag_update()
Enforce diagnose update.
-
using FrameId = uint32_t