3#include <message_filters/subscriber.h>
4#include <message_filters/sync_policies/approximate_time.h>
5#include <message_filters/synchronizer.h>
6#include <message_filters/time_synchronizer.h>
9#include "custom_interfaces/msg/imu_data.hpp"
10#include "custom_interfaces/msg/operational_status.hpp"
11#include "custom_interfaces/msg/steering_angle.hpp"
12#include "custom_interfaces/msg/wheel_rpm.hpp"
13#include "geometry_msgs/msg/vector3_stamped.hpp"
14#include "std_srvs/srv/empty.hpp"
15#include "std_srvs/srv/trigger.hpp"
20 message_filters::Subscriber<custom_interfaces::msg::WheelRPM>
22 message_filters::Subscriber<custom_interfaces::msg::WheelRPM>
24 message_filters::Subscriber<custom_interfaces::msg::SteeringAngle>
26 rclcpp::Subscription<custom_interfaces::msg::OperationalStatus>::SharedPtr
35 using ImuPolicy = message_filters::sync_policies::ApproximateTime<
36 custom_interfaces::msg::ImuData,
37 custom_interfaces::msg::ImuData>;
39 geometry_msgs::msg::Vector3Stamped,
40 geometry_msgs::msg::Vector3Stamped>;
42 custom_interfaces::msg::WheelRPM, custom_interfaces::msg::WheelRPM,
43 custom_interfaces::msg::SteeringAngle>;
45 std::shared_ptr<message_filters::Synchronizer<WheelSteerPolicy>>
48 std::shared_ptr<message_filters::Synchronizer<ImuPolicy>>
_imu_sync_;
52 rclcpp::Client<std_srvs::srv::Trigger>::SharedPtr
60 const custom_interfaces::msg::WheelRPM& rl_wheel_rpm_msg,
61 const custom_interfaces::msg::WheelRPM& rr_wheel_rpm_msg,
62 const custom_interfaces::msg::SteeringAngle& steering_angle_msg);
72 const custom_interfaces::msg::ImuData& yaw_accy_data);
83 const geometry_msgs::msg::Vector3Stamped::SharedPtr& free_acceleration_msg,
84 const geometry_msgs::msg::Vector3Stamped::SharedPtr& angular_velocity_msg);
Class that handles the communication between the SpeedEstimation node and the other nodes in the syst...
friend class VehicleAdapter
Class representing the main speed_est node responsible for publishing the calculated vehicle state wi...
Adapter for interfacing with the real vehicle hardware.
rclcpp::Client< std_srvs::srv::Trigger >::SharedPtr _finished_client_
Client for finished signal.
message_filters::Subscriber< custom_interfaces::msg::ImuData > _yaw_accy_imu_subscription_
message_filters::Subscriber< custom_interfaces::msg::WheelRPM > _rr_wheel_rpm_subscription_
Subscriber for rr wheel rpm.
message_filters::sync_policies::ApproximateTime< custom_interfaces::msg::ImuData, custom_interfaces::msg::ImuData > ImuPolicy
Policy for synchronizing IMU data.
message_filters::Subscriber< custom_interfaces::msg::ImuData > _roll_accx_imu_subscription_
message_filters::Subscriber< custom_interfaces::msg::SteeringAngle > _steering_angle_subscription_
Subscriber for steering angle.
void xsens_imu_subscription_callback(const geometry_msgs::msg::Vector3Stamped::SharedPtr &free_acceleration_msg, const geometry_msgs::msg::Vector3Stamped::SharedPtr &angular_velocity_msg)
Xsens IMU subscription callback, which receives both free acceleration and angular velocity data sepa...
std::shared_ptr< message_filters::Synchronizer< WheelSteerPolicy > > _sync_
Synchronizer for wheel speeds and steering angle.
message_filters::sync_policies::ApproximateTime< geometry_msgs::msg::Vector3Stamped, geometry_msgs::msg::Vector3Stamped > XsensImuPolicy
Policy for synchronizing Xsens IMU data.
rclcpp::Subscription< custom_interfaces::msg::OperationalStatus >::SharedPtr _operational_status_subscription_
Subscriber for operational status.
message_filters::sync_policies::ApproximateTime< custom_interfaces::msg::WheelRPM, custom_interfaces::msg::WheelRPM, custom_interfaces::msg::SteeringAngle > WheelSteerPolicy
Policy for synchronizing wheel speeds and steering angle.
message_filters::Subscriber< geometry_msgs::msg::Vector3Stamped > _free_acceleration_subscription_
void imu_subscription_callback(const custom_interfaces::msg::ImuData &roll_accx_data, const custom_interfaces::msg::ImuData &yaw_accy_data)
IMU subscriptio callback, which receives both roll and yaw acceleration data separately and synchroni...
std::shared_ptr< message_filters::Synchronizer< ImuPolicy > > _imu_sync_
message_filters::Subscriber< custom_interfaces::msg::WheelRPM > _rl_wheel_rpm_subscription_
Subscriber for rl wheel rpm.
message_filters::Subscriber< geometry_msgs::msg::Vector3Stamped > _angular_velocity_subscription_
void finish() final
Function that sends the finish signal to the respective node.
std::shared_ptr< message_filters::Synchronizer< XsensImuPolicy > > _xsens_imu_sync_
void wheel_speeds_subscription_callback(const custom_interfaces::msg::WheelRPM &rl_wheel_rpm_msg, const custom_interfaces::msg::WheelRPM &rr_wheel_rpm_msg, const custom_interfaces::msg::SteeringAngle &steering_angle_msg)
Wheel speed subscription callback, which receives both wheel speeds and steering angle through a sync...