Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
adapter.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5#include "eufs_msgs/msg/can_state.hpp"
6#include "eufs_msgs/msg/wheel_speeds_stamped.hpp"
7#include "eufs_msgs/srv/set_can_state.hpp"
8#include "fs_msgs/msg/finished_signal.hpp"
9#include "fs_msgs/msg/go_signal.hpp"
10#include "fs_msgs/msg/wheel_states.hpp"
11#include "rclcpp/rclcpp.hpp"
12#include "sensor_msgs/msg/imu.hpp"
13
14class SENode;
15
21class Adapter {
22public:
23 std::shared_ptr<SENode> node_;
24
25 rclcpp::Subscription<sensor_msgs::msg::Imu>::SharedPtr _imu_subscription_;
26
27 explicit Adapter(std::shared_ptr<SENode> se_node);
28 virtual void finish() = 0;
29
36 void imu_subscription_callback(const sensor_msgs::msg::Imu& msg);
37
38 virtual ~Adapter() = default;
39};
Class that handles the communication between the SpeedEstimation node and the other nodes in the syst...
Definition adapter.hpp:21
virtual void finish()=0
Function that sends the finish signal to the respective node.
void imu_subscription_callback(const sensor_msgs::msg::Imu &msg)
Function that parses the message sent from the ros IMU topic and calls the respective node's function...
Definition adapter.cpp:8
rclcpp::Subscription< sensor_msgs::msg::Imu >::SharedPtr _imu_subscription_
Definition adapter.hpp:25
virtual ~Adapter()=default
std::shared_ptr< SENode > node_
Definition adapter.hpp:23
Class representing the main speed_est node responsible for publishing the calculated vehicle state wi...
Definition se_node.hpp:33