19#include <rclcpp/rclcpp.hpp>
20#include <boost/shared_ptr.hpp>
22#include <std_msgs/msg/string.hpp>
23#include <std_srvs/srv/empty.hpp>
25#include <carma_ros2_utils/carma_lifecycle_node.hpp>
29#include <message_filters_humble/subscriber.h>
30#include <message_filters_humble/time_synchronizer.h>
31#include <message_filters_humble/sync_policies/exact_time.h>
33#include <geometry_msgs/msg/transform_stamped.hpp>
34#include <geometry_msgs/msg/pose_stamped.hpp>
35#include <geometry_msgs/msg/pose_with_covariance_stamped.hpp>
36#include <boost/optional.hpp>
37#include <autoware_msgs/msg/ndt_stat.hpp>
45 class Node :
public carma_ros2_utils::CarmaLifecycleNode
49 message_filters::Subscriber<geometry_msgs::msg::PoseStamped, Node>
ndt_pose_sub_;
50 message_filters::Subscriber<autoware_msgs::msg::NDTStat, Node>
ndt_score_sub_;
52 carma_ros2_utils::SubPtr<geometry_msgs::msg::PoseWithCovarianceStamped>
initialpose_sub_;
56 carma_ros2_utils::PubPtr<geometry_msgs::msg::PoseStamped>
pose_pub_;
57 carma_ros2_utils::PubPtr<carma_localization_msgs::msg::LocalizationStatusReport>
state_pub_;
70 typedef message_filters::TimeSynchronizer<geometry_msgs::msg::PoseStamped, autoware_msgs::msg::NDTStat>
TimeSynchronizer;
77 explicit Node(
const rclcpp::NodeOptions &);
89 void publishStatus(
const carma_localization_msgs::msg::LocalizationStatusReport &msg)
const;
104 const autoware_msgs::msg::NDTStat::ConstPtr stats);
109 rcl_interfaces::msg::SetParametersResult
Core execution node for this package.
LocalizationManagerConfig config_
void publishStatus(const carma_localization_msgs::msg::LocalizationStatusReport &msg) const
Callback to publish the provided localization status report.
std::unique_ptr< LocalizationManager > manager_
carma_ros2_utils::SubPtr< geometry_msgs::msg::PoseStamped > gnss_pose_sub_
message_filters::TimeSynchronizer< geometry_msgs::msg::PoseStamped, autoware_msgs::msg::NDTStat > TimeSynchronizer
Node(const rclcpp::NodeOptions &)
Node constructor.
carma_ros2_utils::PubPtr< geometry_msgs::msg::PoseStamped > pose_pub_
rcl_interfaces::msg::SetParametersResult parameter_update_callback(const std::vector< rclcpp::Parameter > ¶meters)
Callback for dynamic parameter updates.
carma_ros2_utils::PubPtr< carma_localization_msgs::msg::LocalizationStatusReport > state_pub_
carma_ros2_utils::SubPtr< geometry_msgs::msg::PoseWithCovarianceStamped > initialpose_sub_
void publishPoseStamped(const geometry_msgs::msg::PoseStamped &msg) const
Callback to publish the selected pose.
message_filters::Subscriber< geometry_msgs::msg::PoseStamped, Node > ndt_pose_sub_
void publishManagedInitialPose(const geometry_msgs::msg::PoseWithCovarianceStamped &msg) const
Callback to publish the initial pose deemed suitable to intialize NDT.
carma_ros2_utils::SubPtr< carma_msgs::msg::SystemAlert > system_alert_sub_
rclcpp::TimerBase::SharedPtr pose_timer_
message_filters::Subscriber< autoware_msgs::msg::NDTStat, Node > ndt_score_sub_
void poseAndStatsCallback(const geometry_msgs::msg::PoseStamped::ConstPtr pose, const autoware_msgs::msg::NDTStat::ConstPtr stats)
Synchronized callback for pose and stats data for usage with message_filters. Provides exception hand...
carma_ros2_utils::PubPtr< geometry_msgs::msg::PoseWithCovarianceStamped > managed_initial_pose_pub_
std::shared_ptr< TimeSynchronizer > pose_stats_synchronizer_
carma_ros2_utils::CallbackReturn handle_on_configure(const rclcpp_lifecycle::State &)
Struct to store the configuration settings for the LocalizationManager class.