Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pose2twist): order to create callback #220

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions localization/pose2twist/src/pose2twist_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ Pose2Twist::Pose2Twist() : Node("pose2twist_core")
rclcpp::QoS durable_qos(queue_size);
durable_qos.transient_local();

pose_sub_ = create_subscription<geometry_msgs::msg::PoseStamped>(
"pose", queue_size, std::bind(&Pose2Twist::callbackPose, this, _1));

twist_pub_ = create_publisher<geometry_msgs::msg::TwistStamped>("twist", durable_qos);
linear_x_pub_ = create_publisher<tier4_debug_msgs::msg::Float32Stamped>("linear_x", durable_qos);
angular_z_pub_ =
create_publisher<tier4_debug_msgs::msg::Float32Stamped>("angular_z", durable_qos);
// Note: this callback publishes topics above
pose_sub_ = create_subscription<geometry_msgs::msg::PoseStamped>(
"pose", queue_size, std::bind(&Pose2Twist::callbackPose, this, _1));
}

double calcDiffForRadian(const double lhs_rad, const double rhs_rad)
Expand Down