Skip to content

Commit

Permalink
[Gimablrotor] add an attribute of control loop duration to initialize…
Browse files Browse the repository at this point in the history
… basenavigator
  • Loading branch information
sugihara-16 committed Nov 26, 2023
1 parent 149cbca commit 64de36c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ namespace aerial_robot_navigation

void initialize(ros::NodeHandle nh, ros::NodeHandle nhp,
boost::shared_ptr<aerial_robot_model::RobotModel> robot_model,
boost::shared_ptr<aerial_robot_estimation::StateEstimator> estimator) override;
boost::shared_ptr<aerial_robot_estimation::StateEstimator> estimator,
double loop_du) override;

void update() override;

Expand Down
5 changes: 3 additions & 2 deletions robots/gimbalrotor/src/gimbalrotor_navigation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ GimbalrotorNavigator::GimbalrotorNavigator():

void GimbalrotorNavigator::initialize(ros::NodeHandle nh, ros::NodeHandle nhp,
boost::shared_ptr<aerial_robot_model::RobotModel> robot_model,
boost::shared_ptr<aerial_robot_estimation::StateEstimator> estimator)
boost::shared_ptr<aerial_robot_estimation::StateEstimator> estimator,
double loop_du)
{
/* initialize the flight control */
BaseNavigator::initialize(nh, nhp, robot_model, estimator);
BaseNavigator::initialize(nh, nhp, robot_model, estimator, loop_du);

curr_target_baselink_rot_pub_ = nh_.advertise<spinal::DesireCoord>("desire_coordinate", 1);
final_target_baselink_rot_sub_ = nh_.subscribe("final_target_baselink_rot", 1, &GimbalrotorNavigator::setFinalTargetBaselinkRotCallback, this);
Expand Down

0 comments on commit 64de36c

Please sign in to comment.