-
Notifications
You must be signed in to change notification settings - Fork 171
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
Prevent robot_state_publisher from publishing on a timer #175
Conversation
Signed-off-by: wep21 <[email protected]>
@clalancette Is the behavior change of this PR still too big to merge into |
@@ -95,7 +95,6 @@ class RobotStatePublisher : public rclcpp::Node | |||
rclcpp::Publisher<std_msgs::msg::String>::SharedPtr description_pub_; | |||
std::chrono::milliseconds publish_interval_ms_; | |||
rclcpp::Subscription<sensor_msgs::msg::JointState>::SharedPtr joint_state_sub_; | |||
rclcpp::TimerBase::SharedPtr timer_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing a class member breaks ABI, so this line can't be backported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -148,9 +148,7 @@ RobotStatePublisher::RobotStatePublisher(const rclcpp::NodeOptions & options) | |||
&RobotStatePublisher::callbackJointState, this, | |||
std::placeholders::_1)); | |||
|
|||
// trigger to publish fixed joints | |||
timer_ = this->create_wall_timer( | |||
publish_interval_ms_, std::bind(&RobotStatePublisher::publishFixedTransforms, this)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC if use_tf_static
is False then the fixed transforms must be published regularly or they will not be received by late joining subscribers.
I think creating the timer only when use_tf_static
is False would be a backportable change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: wep21 <[email protected]>
Signed-off-by: wep21 <[email protected]>
@sloretz @clalancette friendly ping |
Failures on Windows CI are unrelated to this change. But since Windows is the most likely to have problems, I'm going to wait until Windows is fixed and re-run it before merging. |
@clalancette Could you do bloom-release for |
Done in ros/rosdistro#31336 |
Backport a part of #158 to
galactic
Refer #158 (comment)