diff --git a/localization/pose2twist/src/pose2twist_core.cpp b/localization/pose2twist/src/pose2twist_core.cpp index 00109ac37b9d9..9eeb5f359695d 100644 --- a/localization/pose2twist/src/pose2twist_core.cpp +++ b/localization/pose2twist/src/pose2twist_core.cpp @@ -28,13 +28,13 @@ Pose2Twist::Pose2Twist() : Node("pose2twist_core") rclcpp::QoS durable_qos(queue_size); durable_qos.transient_local(); - pose_sub_ = create_subscription( - "pose", queue_size, std::bind(&Pose2Twist::callbackPose, this, _1)); - twist_pub_ = create_publisher("twist", durable_qos); linear_x_pub_ = create_publisher("linear_x", durable_qos); angular_z_pub_ = create_publisher("angular_z", durable_qos); + // Note: this callback publishes topics above + pose_sub_ = create_subscription( + "pose", queue_size, std::bind(&Pose2Twist::callbackPose, this, _1)); } double calcDiffForRadian(const double lhs_rad, const double rhs_rad)