Added support for setting max velocities on send_goal

This commit is contained in:
2026-03-07 12:32:34 +01:00
parent 5777a0e804
commit 77cb2c5573
6 changed files with 24 additions and 1 deletions

View File

@@ -46,6 +46,12 @@ ResultStatus SimpleTranslateXBehavior::onStart(
target_distance_ = command->distance;
target_angle_ = tf2::getYaw(pose.orientation);
target_sign_ = (target_distance_ < 0) ? -1.0 : 1.0;
max_vel_speed_ = command->max_speed;
if(command->max_speed == 0) {
auto node = node_.lock();
node->get_parameter(behavior_name_ + ".max_vel_speed", max_vel_speed_);
}
target_distance_ *= target_sign_;