From 2454307fc45443ea072c5c0221c08293e33b8bcc Mon Sep 17 00:00:00 2001 From: weijiabin Date: Thu, 30 Apr 2026 16:33:51 +0800 Subject: [PATCH] chore(example): update h2_loco_client.cpp --- example/src/src/h2/high_level/h2_loco_client.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/example/src/src/h2/high_level/h2_loco_client.cpp b/example/src/src/h2/high_level/h2_loco_client.cpp index 49d91449..210dc772 100644 --- a/example/src/src/h2/high_level/h2_loco_client.cpp +++ b/example/src/src/h2/high_level/h2_loco_client.cpp @@ -151,30 +151,22 @@ class H2LocoClientNode : public rclcpp::Node } else if (test_option_.name == "set_fsm_id") { - // Same behavior style as b2 demo: fixed parameter. ret = client_.SetFsmId(4); } else if (test_option_.name == "set_velocity") { - // Fixed: vx vy omega duration - // Align with b2 demo `Move(req, 0.0, 0.0, 0.5)` style. - ret = client_.SetVelocity(0.0F, 0.0F, 0.5F, 1.0F); + ret = client_.SetVelocity(0.0F, 0.0F, 1.0F, 4.0F); } else if (test_option_.name == "move") { - // Fixed: vx vy omega - // Align with b2 demo `Move(req, 0.0, 0.0, 0.5)` style. - ret = client_.Move(0.0F, 0.0F, 0.5F); + ret = client_.Move(0.0F, 0.0F, 2.0F); } else if (test_option_.name == "switch_move_mode") { - // Fixed: enable continuous move mode. ret = client_.SwitchMoveMode(true); } else if (test_option_.name == "set_speed_mode") { - // Fixed: speed_mode - // Align with b2 demo `SpeedLevel(req, 1)` style. ret = client_.SetSpeedMode(1); } else @@ -204,7 +196,6 @@ int main(int argc, char **argv) { rclcpp::init(argc, argv); auto node = std::make_shared(); - // `common/b2_base_client.hpp` spins this node internally, so do not add it to another executor. while (rclcpp::ok()) { std::this_thread::sleep_for(200ms);