Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
vehicle.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "custom_interfaces/msg/control_command.hpp"
4#include "custom_interfaces/msg/operational_status.hpp"
7
16private:
22 rclcpp::Subscription<custom_interfaces::msg::OperationalStatus>::SharedPtr go_sub_;
23
24 rclcpp::Publisher<custom_interfaces::msg::ControlCommand>::SharedPtr control_pub_;
25
26public:
27 explicit VehicleAdapter(const ControlParameters &params);
29 void go_signal_callback(const custom_interfaces::msg::OperationalStatus msg);
30};
Class responsible for the ROS2 communication of the control module.
Definition ros_node.hpp:26
friend class VehicleAdapter
Definition planning.hpp:88
Adapter for interfacing with the real vehicle hardware.
Definition vehicle.hpp:15
rclcpp::Subscription< custom_interfaces::msg::OperationalStatus >::SharedPtr go_sub_
Subscription for the go signal from the operational status, which activates the controller when true.
Definition vehicle.hpp:22
rclcpp::Publisher< custom_interfaces::msg::ControlCommand >::SharedPtr control_pub_
Definition vehicle.hpp:24
void go_signal_callback(const custom_interfaces::msg::OperationalStatus msg)
Definition vehicle.cpp:25
void publish_command(common_lib::structures::ControlCommand cmd) override
Adapters override this function to publish control commands in their environment.
Definition vehicle.cpp:13