20 namespace std_ph = std::placeholders;
22 Node::Node(
const rclcpp::NodeOptions &options): carma_ros2_utils::CarmaLifecycleNode(options), tfBuffer_(get_clock()), tfListener_(tfBuffer_)
37 rcl_interfaces::msg::SetParametersResult result;
39 result.successful = !error;
58 map_pose_pub = create_publisher<geometry_msgs::msg::PoseStamped>(
"gnss_pose", 10);
64 [
this](
const auto& target,
const auto& source) -> boost::optional<geometry_msgs::msg::TransformStamped> {
65 geometry_msgs::msg::TransformStamped tf;
68 tf =
tfBuffer_.lookupTransform(target, source, rclcpp::Time(1, 0));
70 catch (tf2::TransformException& ex)
72 RCLCPP_ERROR_STREAM(get_logger(),
"Could not lookup transform with exception " << ex.what());
82 fix_sub_ = create_subscription<gps_msgs::msg::GPSFix>(
"gnss_fix_fused", 2,
87 geo_sub = create_subscription<std_msgs::msg::String>(
"georeference", 1,
92 return CallbackReturn::SUCCESS;
97#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.
tf2_ros::Buffer tfBuffer_
carma_ros2_utils::CallbackReturn handle_on_configure(const rclcpp_lifecycle::State &)
carma_ros2_utils::SubPtr< gps_msgs::msg::GPSFix > fix_sub_
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
Stuct containing the algorithm configuration values for gnss_to_map_convertor.
std::string heading_frame
std::string base_link_frame