7 this->
_xsens_imu_sync_ = std::make_shared<message_filters::Synchronizer<XsensImuPolicy>>(
15 this->
_wss_sync_ = std::make_shared<message_filters::Synchronizer<WheelSSPolicy>>(
20 "/vehicle/bosch_steering_angle", 1,
22 this->
_resolver_sub_ = this->create_subscription<custom_interfaces::msg::WheelRPM>(
23 "/vehicle/motor_rpm", 1,
28 const custom_interfaces::msg::WheelRPM& fr_wheel_rpm_msg) {
32 wss_data.
fl_rpm = fl_wheel_rpm_msg.fl_rpm;
33 wss_data.
fr_rpm = fr_wheel_rpm_msg.fr_rpm;
34 if (fl_wheel_rpm_msg.fl_rpm > 800 || fr_wheel_rpm_msg.fr_rpm > 800) {
35 RCLCPP_WARN(this->get_logger(),
"Wheel RPM is too high");
48 const geometry_msgs::msg::Vector3Stamped::SharedPtr& free_acceleration_msg,
49 const geometry_msgs::msg::Vector3Stamped::SharedPtr& angular_velocity_msg) {
friend class VehicleAdapter
Node class for the velocity estimation node.
void publish_velocities() const
std::shared_ptr< VelocityEstimator > _velocity_estimator_
rclcpp::Subscription< custom_interfaces::msg::WheelRPM >::SharedPtr _resolver_sub_
void wss_callback(const custom_interfaces::msg::WheelRPM &rl_wheel_rpm_msg, const custom_interfaces::msg::WheelRPM &rr_wheel_rpm_msg)
Wheel speed subscription callback, which receives both wheel speeds through a synchronizer message fi...
std::shared_ptr< message_filters::Synchronizer< WheelSSPolicy > > _wss_sync_
Synchronizer for wheel speeds.
rclcpp::Subscription< custom_interfaces::msg::SteeringAngle >::SharedPtr _steering_angle_sub_
message_filters::sync_policies::ApproximateTime< geometry_msgs::msg::Vector3Stamped, geometry_msgs::msg::Vector3Stamped > XsensImuPolicy
Policy for synchronizing Xsens IMU data.
void imu_callback(const geometry_msgs::msg::Vector3Stamped::SharedPtr &free_acceleration_msg, const geometry_msgs::msg::Vector3Stamped::SharedPtr &angular_velocity_msg)
IMU subscription callback, which receives both free acceleration and angular velocity through a synch...
int number_of_imu_readings
message_filters::Subscriber< custom_interfaces::msg::WheelRPM > _fl_wheel_rpm_subscription_
Subscriber for fl wheel rpm.
void steering_angle_callback(const custom_interfaces::msg::SteeringAngle msg)
Callback for the subscription of the steering angle sensor.
void resolver_callback(custom_interfaces::msg::WheelRPM msg)
Callback for the subscription of the resolver which measures the motor RPM.
message_filters::Subscriber< geometry_msgs::msg::Vector3Stamped > _free_acceleration_subscription_
message_filters::sync_policies::ApproximateTime< custom_interfaces::msg::WheelRPM, custom_interfaces::msg::WheelRPM > WheelSSPolicy
Policy for synchronizing wheel speeds.
message_filters::Subscriber< custom_interfaces::msg::WheelRPM > _fr_wheel_rpm_subscription_
Subscriber for fr wheel rpm.
message_filters::Subscriber< geometry_msgs::msg::Vector3Stamped > _angular_velocity_subscription_
std::shared_ptr< message_filters::Synchronizer< XsensImuPolicy > > _xsens_imu_sync_
double rotational_velocity
Struct for wheel encoder data.