Skip to content

Commit

Permalink
Merge pull request #553 from HarukiKozukapenguin/PR/acc_nav/landing_h…
Browse files Browse the repository at this point in the history
…alt_cmd

[Aerial Robot Control] landing, halt command during vel acc-based mode
  • Loading branch information
tongtybj committed Aug 5, 2023
2 parents 5f1a6e0 + 2cebc7a commit edc06a5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -478,13 +478,18 @@ namespace aerial_robot_navigation

void setTargetXyFromCurrentState()
{
setXyControlMode(POS_CONTROL_MODE);
tf::Vector3 pos_cog = estimator_->getPos(Frame::COG, estimate_mode_);
target_pos_.setX(pos_cog.x());
target_pos_.setY(pos_cog.y());

// set the velocty to zero
target_vel_.setX(0);
target_vel_.setY(0);

// set the acceleration to zero
setTargetAccX(0);
setTargetAccY(0);
}

void setTargetZFromCurrentState()
Expand Down

0 comments on commit edc06a5

Please sign in to comment.