Skip to content

Commit 733bdfc

Browse files
committed
fix: keep only freshest measured wrench
1 parent aac6655 commit 733bdfc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/cartesian_controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ CartesianController::on_configure(const rclcpp_lifecycle::State & /*previous_sta
470470
};
471471

472472
measured_wrench_sub_ = get_node()->create_subscription<geometry_msgs::msg::WrenchStamped>(
473-
measured_wrench_topic, rclcpp::SensorDataQoS(), measured_wrench_callback);
473+
measured_wrench_topic, rclcpp::SensorDataQoS().keep_last(1), measured_wrench_callback);
474474

475475
auto target_stiffness_callback =
476476
[this](const std::shared_ptr<std_msgs::msg::Float64MultiArray> msg) -> void {

0 commit comments

Comments
 (0)