3#include <gtest/gtest_prod.h>
15#include "custom_interfaces/msg/cone_array.hpp"
16#include "custom_interfaces/msg/point2d.hpp"
17#include "custom_interfaces/msg/vehicle_state.hpp"
18#include "eufs_msgs/msg/wheel_speeds_stamped.hpp"
20#include "rclcpp/rclcpp.hpp"
21#include "std_msgs/msg/float64.hpp"
22#include "visualization_msgs/msg/marker_array.hpp"
43 std::shared_ptr<ExtendedKalmanFilter>
_ekf_;
46 std::shared_ptr<std::vector<common_lib::structures::Cone>>
_track_map_;
57 std::shared_ptr<common_lib::car_parameters::CarParameters>
_car_parameters_ = std::make_shared<common_lib::car_parameters::CarParameters>();
89 double fr_speed,
double steering_angle,
90 const rclcpp::Time& timestamp);
Class that handles the communication between the SpeedEstimation node and the other nodes in the syst...
Adapter class to interface with the EUFS simulator.
Adapter class to interface with the Pacsim simulator for SLAM.
Class representing the main speed_est node responsible for publishing the calculated vehicle state wi...
bool _use_simulated_perception_
rclcpp::Subscription< custom_interfaces::msg::ConeArray >::SharedPtr _perception_subscription_
void _publish_vehicle_state_wss()
publishes the localization ('vehicle_localization') to the topic vehicle_location
rclcpp::Publisher< visualization_msgs::msg::Marker >::SharedPtr _car_model_publisher_
std::shared_ptr< common_lib::car_parameters::CarParameters > _car_parameters_
Mutex used to lock EKF access.
std::shared_ptr< ExtendedKalmanFilter > _ekf_
SLAM EKF object.
std::shared_ptr< std::vector< common_lib::structures::Cone > > _perception_map_
rclcpp::Publisher< visualization_msgs::msg::MarkerArray >::SharedPtr _visualization_map_publisher_
common_lib::competition_logic::Mission _mission_
std::shared_ptr< std::vector< common_lib::structures::Cone > > _track_map_
void _ekf_step()
executes the prediction step of the EKF
std::string _adapter_name_
rclcpp::Publisher< custom_interfaces::msg::VehicleState >::SharedPtr _vehicle_state_publisher_wss_
void _wheel_speeds_subscription_callback(double rl_speed, double rr_speed, double fl_speed, double fr_speed, double steering_angle, const rclcpp::Time ×tamp)
Function to be called everytime information is received from the wheel encoders.
SENode()
Constructor of the main node, most things are received by launch parameter.
rclcpp::Publisher< std_msgs::msg::Float64 >::SharedPtr _prediction_execution_time_publisher_
rclcpp::Publisher< custom_interfaces::msg::ConeArray >::SharedPtr _map_publisher_
void _imu_subscription_callback(const sensor_msgs::msg::Imu &imu_msg)
Function to be called everytime information is received from the IMU.
void _publish_map()
publishes the map ('track_map') to the topic track_map
void _publish_vehicle_state_imu()
publishes the localization ('vehicle_localization') to the topic vehicle_location
std::shared_ptr< MotionUpdate > _motion_update_
void _update_and_publish()
Executes:
rclcpp::TimerBase::SharedPtr _timer_
timer
void _publish_vehicle_state()
publishes the localization ('vehicle_localization') to the topic vehicle_location
std::shared_ptr< Adapter > _adapter_
rclcpp::Publisher< custom_interfaces::msg::VehicleState >::SharedPtr _vehicle_state_publisher_
rclcpp::Publisher< visualization_msgs::msg::Marker >::SharedPtr _position_publisher_
std::shared_ptr< common_lib::structures::VehicleState > _vehicle_state_
rclcpp::Publisher< std_msgs::msg::Float64 >::SharedPtr _correction_execution_time_publisher_
void _perception_subscription_callback(const custom_interfaces::msg::ConeArray &msg)
Callback that updates everytime information is received from the perception module.
rclcpp::Publisher< custom_interfaces::msg::VehicleState >::SharedPtr _vehicle_state_publisher_imu_
bool _use_odometry_
flag to start the mission
Adapter for interfacing with the real vehicle hardware.