From 3cdaa5ba5e4acfc57b32b9438faeff0744b907a4 Mon Sep 17 00:00:00 2001 From: Iker Lluvia Date: Thu, 9 Mar 2023 16:48:52 +0100 Subject: [PATCH] Parametrise update_rate Parametrise update_rate so it can be configured without compiling as increasing this value may avoid latency in the motion. --- src/keyboard_ctl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/keyboard_ctl.cpp b/src/keyboard_ctl.cpp index ef8f643..5d38d5b 100644 --- a/src/keyboard_ctl.cpp +++ b/src/keyboard_ctl.cpp @@ -141,9 +141,11 @@ int main(int argc, char **argv) nh.getParam("velocity_horizon", h_speed); nh.getParam("velocity_vertical", v_speed); nh.getParam("angular_velocity_turn", turn_speed); + nh.getParam("update_rate", update_rate); cout << "horizon speed: " << h_speed << endl; cout << "vertical speed: " << v_speed << endl; cout << "turning speed: " << turn_speed << endl; + cout << "update rate: " << update_rate << endl; ros::Subscriber state_sub = nh.subscribe ("/mavros/state", 10, state_cb);