Added support for setting max velocities on send_goal
This commit is contained in:
@@ -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_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user