Completed implementation of initial rotate behavior

This commit is contained in:
2026-02-27 14:24:15 +01:00
parent 969ceae6f8
commit 29516efd0d
4 changed files with 27 additions and 8 deletions

View File

@@ -41,6 +41,7 @@ public:
current_vel_ = msg.twist.twist;
});
control_duration_ = 1.0 / this->cycle_frequency_;
configureCB();
}
void onCleanup() override

View File

@@ -12,6 +12,7 @@ class SimpleRotateBehavior : public SimpleMove<RotateAction>
{
public:
SimpleRotateBehavior();
~SimpleRotateBehavior();
void configureCB() override;
@@ -22,6 +23,10 @@ public:
ResultStatus updateVel(
const geometry_msgs::msg::Pose & pose, const geometry_msgs::msg::Twist & vel,
geometry_msgs::msg::Twist & out_vel) override;
virtual nav2_core::CostmapInfoType getResourceInfo() {
return nav2_core::CostmapInfoType::NONE;
}
protected:
@@ -33,11 +38,13 @@ protected:
//State
double angular_speed_;
double last_angle_;
double last_time_;
//Config
double max_angular_speed_;
double min_angular_speed_;
double max_angular_accel_;
double max_angular_decel_;
};
} // namespace toid