20 namespace std_ph = std::placeholders;
22 Node::Node(
const rclcpp::NodeOptions &options): carma_ros2_utils::CarmaLifecycleNode(options)
25 tfBuffer_ = std::make_shared<tf2_ros::Buffer>(this->get_clock());
42 rcl_interfaces::msg::SetParametersResult result;
44 result.successful = !error;
63 map_pose_pub = create_publisher<geometry_msgs::msg::PoseStamped>(
"gnss_pose", 10);
69 [
this](
const auto& target,
const auto& source) -> boost::optional<geometry_msgs::msg::TransformStamped> {
70 geometry_msgs::msg::TransformStamped tf;
73 tf =
tfBuffer_->lookupTransform(target, source, rclcpp::Time(1, 0));
75 catch (tf2::TransformException& ex)
77 RCLCPP_ERROR_STREAM(get_logger(),
"Could not lookup transform with exception " << ex.what());
87 fix_sub_ = create_subscription<gps_msgs::msg::GPSFix>(
"gnss_fix_fused", 2,
92 geo_sub = create_subscription<std_msgs::msg::String>(
"georeference", 1,
97 return CallbackReturn::SUCCESS;
102#include "rclcpp_components/register_node_macro.hpp"
void geoReferenceCallback(std_msgs::msg::String::UniquePtr geo_ref)
Map georeference callback The geodetic description of the map frame should be provided to this callba...
void gnssFixCb(gps_msgs::msg::GPSFix::UniquePtr fix_msg)
GNSS Fix callback which will publish a pose representing that fix in the map frame if the required tr...
Node(const rclcpp::NodeOptions &)
Node constructor.
carma_ros2_utils::CallbackReturn handle_on_configure(const rclcpp_lifecycle::State &)
carma_ros2_utils::SubPtr< gps_msgs::msg::GPSFix > fix_sub_
std::shared_ptr< tf2_ros::TransformListener > tfListener_
std::shared_ptr< GNSSToMapConvertor > convertor_worker_
carma_ros2_utils::SubPtr< std_msgs::msg::String > geo_sub
rcl_interfaces::msg::SetParametersResult parameter_update_callback(const std::vector< rclcpp::Parameter > ¶meters)
carma_ros2_utils::PubPtr< geometry_msgs::msg::PoseStamped > map_pose_pub
std::shared_ptr< tf2_ros::Buffer > tfBuffer_
Stuct containing the algorithm configuration values for gnss_to_map_convertor.
std::string heading_frame
std::string base_link_frame