From 161ec438ad54766141ebedcf737d6d469a93409f Mon Sep 17 00:00:00 2001 From: Ignacio Vizzo Date: Mon, 2 Oct 2023 04:57:50 -0400 Subject: [PATCH] Change stuff around --- ros/ros2/OdometryServer.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ros/ros2/OdometryServer.cpp b/ros/ros2/OdometryServer.cpp index 7818c278..9cde1ac9 100644 --- a/ros/ros2/OdometryServer.cpp +++ b/ros/ros2/OdometryServer.cpp @@ -86,6 +86,8 @@ OdometryServer::OdometryServer(const rclcpp::NodeOptions &options) frame_publisher_ = create_publisher("/kiss/frame", qos); kpoints_publisher_ = create_publisher("/kiss/keypoints", qos); map_publisher_ = create_publisher("/kiss/local_map", qos); + traj_publisher_ = create_publisher("/kiss/trajectory", qos); + path_msg_.header.frame_id = odom_frame_; // Initialize the transform broadcaster tf_broadcaster_ = std::make_unique(*this); @@ -93,10 +95,6 @@ OdometryServer::OdometryServer(const rclcpp::NodeOptions &options) tf2_buffer_->setUsingDedicatedThread(true); tf2_listener_ = std::make_unique(*tf2_buffer_); - // Initialize trajectory publisher - path_msg_.header.frame_id = odom_frame_; - traj_publisher_ = create_publisher("/kiss/trajectory", qos); - RCLCPP_INFO(this->get_logger(), "KISS-ICP ROS 2 odometry node initialized"); }