From fab68120134515eb4506eddc63e7265c888fc612 Mon Sep 17 00:00:00 2001 From: bkueng Date: Thu, 28 Nov 2024 06:06:43 +0000 Subject: [PATCH] deploy: 90bc47642fc0e1c68876fa52181f7382e3049e11 --- classpx4__ros2_1_1ModeBase-members.html | 37 ++--- classpx4__ros2_1_1ModeBase.html | 26 ++++ classpx4__ros2_1_1ModeBase.js | 1 + group__components.js | 1 + mode_8hpp_source.html | 196 ++++++++++++------------ navtreedata.js | 2 +- navtreeindex0.js | 12 +- navtreeindex1.js | 1 + 8 files changed, 154 insertions(+), 122 deletions(-) diff --git a/classpx4__ros2_1_1ModeBase-members.html b/classpx4__ros2_1_1ModeBase-members.html index 29bbd8c..50c03be 100644 --- a/classpx4__ros2_1_1ModeBase-members.html +++ b/classpx4__ros2_1_1ModeBase-members.html @@ -101,24 +101,25 @@ kModeIDDescend (defined in px4_ros2::ModeBase)px4_ros2::ModeBasestatic kModeIDInvalid (defined in px4_ros2::ModeBase)px4_ros2::ModeBasestatic kModeIDLand (defined in px4_ros2::ModeBase)px4_ros2::ModeBasestatic - kModeIDPosctl (defined in px4_ros2::ModeBase)px4_ros2::ModeBasestatic - kModeIDPrecisionLand (defined in px4_ros2::ModeBase)px4_ros2::ModeBasestatic - kModeIDRtl (defined in px4_ros2::ModeBase)px4_ros2::ModeBasestatic - kModeIDTakeoff (defined in px4_ros2::ModeBase)px4_ros2::ModeBasestatic - ModeBase(rclcpp::Node &node, Settings settings, const std::string &topic_namespace_prefix="") (defined in px4_ros2::ModeBase)px4_ros2::ModeBase - ModeBase(const ModeBase &)=delete (defined in px4_ros2::ModeBase)px4_ros2::ModeBase - ModeExecutorBase (defined in px4_ros2::ModeBase)px4_ros2::ModeBasefriend - ModeID typedefpx4_ros2::ModeBase - modeRequirements()px4_ros2::ModeBaseinline - node() (defined in px4_ros2::Context)px4_ros2::Contextinline - onActivate()=0px4_ros2::ModeBasepure virtual - onDeactivate()=0px4_ros2::ModeBasepure virtual - overrideRegistration(const std::shared_ptr< Registration > &registration) (defined in px4_ros2::ModeBase)px4_ros2::ModeBaseprotected - setSetpointUpdateRate(float rate_hz)px4_ros2::ModeBase - setSkipMessageCompatibilityCheck() (defined in px4_ros2::ModeBase)px4_ros2::ModeBaseinlineprotected - topicNamespacePrefix() const (defined in px4_ros2::Context)px4_ros2::Contextinline - updateSetpoint(float dt_s) (defined in px4_ros2::ModeBase)px4_ros2::ModeBaseinlinevirtual - ~ModeBase()=default (defined in px4_ros2::ModeBase)px4_ros2::ModeBasevirtual + kModeIDLoiter (defined in px4_ros2::ModeBase)px4_ros2::ModeBasestatic + kModeIDPosctl (defined in px4_ros2::ModeBase)px4_ros2::ModeBasestatic + kModeIDPrecisionLand (defined in px4_ros2::ModeBase)px4_ros2::ModeBasestatic + kModeIDRtl (defined in px4_ros2::ModeBase)px4_ros2::ModeBasestatic + kModeIDTakeoff (defined in px4_ros2::ModeBase)px4_ros2::ModeBasestatic + ModeBase(rclcpp::Node &node, Settings settings, const std::string &topic_namespace_prefix="") (defined in px4_ros2::ModeBase)px4_ros2::ModeBase + ModeBase(const ModeBase &)=delete (defined in px4_ros2::ModeBase)px4_ros2::ModeBase + ModeExecutorBase (defined in px4_ros2::ModeBase)px4_ros2::ModeBasefriend + ModeID typedefpx4_ros2::ModeBase + modeRequirements()px4_ros2::ModeBaseinline + node() (defined in px4_ros2::Context)px4_ros2::Contextinline + onActivate()=0px4_ros2::ModeBasepure virtual + onDeactivate()=0px4_ros2::ModeBasepure virtual + overrideRegistration(const std::shared_ptr< Registration > &registration) (defined in px4_ros2::ModeBase)px4_ros2::ModeBaseprotected + setSetpointUpdateRate(float rate_hz)px4_ros2::ModeBase + setSkipMessageCompatibilityCheck() (defined in px4_ros2::ModeBase)px4_ros2::ModeBaseinlineprotected + topicNamespacePrefix() const (defined in px4_ros2::Context)px4_ros2::Contextinline + updateSetpoint(float dt_s) (defined in px4_ros2::ModeBase)px4_ros2::ModeBaseinlinevirtual + ~ModeBase()=default (defined in px4_ros2::ModeBase)px4_ros2::ModeBasevirtual diff --git a/classpx4__ros2_1_1ModeBase.html b/classpx4__ros2_1_1ModeBase.html index ea9c80f..c0c1a0a 100644 --- a/classpx4__ros2_1_1ModeBase.html +++ b/classpx4__ros2_1_1ModeBase.html @@ -187,6 +187,8 @@   static constexpr ModeID kModeIDPrecisionLand   +static constexpr ModeID kModeIDLoiter +  @@ -426,6 +428,30 @@

+

◆ kModeIDLoiter

+ +
+
+

Protected Member Functions

+ + + + +
+ + + + +
constexpr ModeID px4_ros2::ModeBase::kModeIDLoiter
+
+staticconstexpr
+
+Initial value:
=
+
px4_msgs::msg::VehicleStatus::NAVIGATION_STATE_AUTO_LOITER
+
+
+

◆ kModeIDPosctl

diff --git a/classpx4__ros2_1_1ModeBase.js b/classpx4__ros2_1_1ModeBase.js index 61408c2..9717d7e 100644 --- a/classpx4__ros2_1_1ModeBase.js +++ b/classpx4__ros2_1_1ModeBase.js @@ -23,6 +23,7 @@ var classpx4__ros2_1_1ModeBase = [ "kModeIDDescend", "classpx4__ros2_1_1ModeBase.html#a1692146bb14350143a739c3613209c7d", null ], [ "kModeIDInvalid", "classpx4__ros2_1_1ModeBase.html#a3741e155424f7685a33a412ced626dbd", null ], [ "kModeIDLand", "classpx4__ros2_1_1ModeBase.html#a132d1a695e4a80e440ebabee615437d3", null ], + [ "kModeIDLoiter", "classpx4__ros2_1_1ModeBase.html#a623b52f7c4393c424279b1d1004cb331", null ], [ "kModeIDPosctl", "classpx4__ros2_1_1ModeBase.html#a73cb33bd1ac9df1e5b3eb319d64f419a", null ], [ "kModeIDPrecisionLand", "classpx4__ros2_1_1ModeBase.html#a683f9e385013b260a2f875eaf1822948", null ], [ "kModeIDRtl", "classpx4__ros2_1_1ModeBase.html#a654f01c967124dfdcb468667d733107b", null ], diff --git a/group__components.js b/group__components.js index c1ffa9f..ab08531 100644 --- a/group__components.js +++ b/group__components.js @@ -47,6 +47,7 @@ var group__components = [ "kModeIDDescend", "classpx4__ros2_1_1ModeBase.html#a1692146bb14350143a739c3613209c7d", null ], [ "kModeIDInvalid", "classpx4__ros2_1_1ModeBase.html#a3741e155424f7685a33a412ced626dbd", null ], [ "kModeIDLand", "classpx4__ros2_1_1ModeBase.html#a132d1a695e4a80e440ebabee615437d3", null ], + [ "kModeIDLoiter", "classpx4__ros2_1_1ModeBase.html#a623b52f7c4393c424279b1d1004cb331", null ], [ "kModeIDPosctl", "classpx4__ros2_1_1ModeBase.html#a73cb33bd1ac9df1e5b3eb319d64f419a", null ], [ "kModeIDPrecisionLand", "classpx4__ros2_1_1ModeBase.html#a683f9e385013b260a2f875eaf1822948", null ], [ "kModeIDRtl", "classpx4__ros2_1_1ModeBase.html#a654f01c967124dfdcb468667d733107b", null ], diff --git a/mode_8hpp_source.html b/mode_8hpp_source.html index bba6c25..9a389cb 100644 --- a/mode_8hpp_source.html +++ b/mode_8hpp_source.html @@ -165,112 +165,114 @@
84  px4_msgs::msg::VehicleStatus::NAVIGATION_STATE_AUTO_RTL;
85  static constexpr ModeID kModeIDPrecisionLand =
86  px4_msgs::msg::VehicleStatus::NAVIGATION_STATE_AUTO_PRECLAND;
-
87 
-
88  struct Settings
-
89  {
-
90  // NOLINTNEXTLINE allow implicit conversion
-
91  Settings(
-
92  std::string mode_name, bool want_activate_even_while_disarmed = false,
-
93  ModeID request_replace_internal_mode = kModeIDInvalid)
-
94  : name(std::move(mode_name)), activate_even_while_disarmed(want_activate_even_while_disarmed),
-
95  replace_internal_mode(request_replace_internal_mode) {}
-
96  std::string name;
-
97  bool activate_even_while_disarmed{true};
-
98  ModeID replace_internal_mode{kModeIDInvalid};
-
99  };
-
100 
-
101  ModeBase(
-
102  rclcpp::Node & node, Settings settings,
-
103  const std::string & topic_namespace_prefix = "");
-
104  ModeBase(const ModeBase &) = delete;
-
105  virtual ~ModeBase() = default;
-
106 
-
111  bool doRegister();
-
112 
-
113 
-
117  virtual void checkArmingAndRunConditions(HealthAndArmingCheckReporter & reporter) {}
-
118 
-
122  virtual void onActivate() = 0;
-
123 
-
127  virtual void onDeactivate() = 0;
-
128 
-
134  void setSetpointUpdateRate(float rate_hz);
-
135 
-
136  virtual void updateSetpoint(float dt_s) {}
+
87  static constexpr ModeID kModeIDLoiter =
+
88  px4_msgs::msg::VehicleStatus::NAVIGATION_STATE_AUTO_LOITER;
+
89 
+
90  struct Settings
+
91  {
+
92  // NOLINTNEXTLINE allow implicit conversion
+
93  Settings(
+
94  std::string mode_name, bool want_activate_even_while_disarmed = false,
+
95  ModeID request_replace_internal_mode = kModeIDInvalid)
+
96  : name(std::move(mode_name)), activate_even_while_disarmed(want_activate_even_while_disarmed),
+
97  replace_internal_mode(request_replace_internal_mode) {}
+
98  std::string name;
+
99  bool activate_even_while_disarmed{true};
+
100  ModeID replace_internal_mode{kModeIDInvalid};
+
101  };
+
102 
+
103  ModeBase(
+
104  rclcpp::Node & node, Settings settings,
+
105  const std::string & topic_namespace_prefix = "");
+
106  ModeBase(const ModeBase &) = delete;
+
107  virtual ~ModeBase() = default;
+
108 
+
113  bool doRegister();
+
114 
+
115 
+
119  virtual void checkArmingAndRunConditions(HealthAndArmingCheckReporter & reporter) {}
+
120 
+
124  virtual void onActivate() = 0;
+
125 
+
129  virtual void onDeactivate() = 0;
+
130 
+
136  void setSetpointUpdateRate(float rate_hz);
137 
-
143  void completed(Result result);
-
144 
-
145 
-
146  // Properties & state
+
138  virtual void updateSetpoint(float dt_s) {}
+
139 
+
145  void completed(Result result);
+
146 
147 
-
148  ModeID id() const;
+
148  // Properties & state
149 
-
150  bool isArmed() const {return _is_armed;}
+
150  ModeID id() const;
151 
-
152  bool isActive() const {return _is_active;}
+
152  bool isArmed() const {return _is_armed;}
153 
-
154  ConfigOverrides & configOverrides() {return _config_overrides;}
+
154  bool isActive() const {return _is_active;}
155 
-
160  RequirementFlags & modeRequirements() {return _health_and_arming_checks.modeRequirements();}
-
161 
-
162 protected:
-
163  void setSkipMessageCompatibilityCheck() {_skip_message_compatibility_check = true;}
-
164  void overrideRegistration(const std::shared_ptr<Registration> & registration);
-
165 
-
166 private:
-
167  void addSetpointType(SetpointBase * setpoint) override;
-
168  void setRequirement(const RequirementFlags & requirement_flags) override;
-
169 
-
170  friend class ModeExecutorBase;
-
171  RegistrationSettings getRegistrationSettings() const;
-
172  void onAboutToRegister();
-
173  bool onRegistered();
-
174 
-
175  void unsubscribeVehicleStatus();
-
176  void vehicleStatusUpdated(
-
177  const px4_msgs::msg::VehicleStatus::UniquePtr & msg,
-
178  bool do_not_activate = false);
-
179 
-
180  void callOnActivate();
-
181  void callOnDeactivate();
-
182 
-
183  void updateSetpointUpdateTimer();
+
156  ConfigOverrides & configOverrides() {return _config_overrides;}
+
157 
+
162  RequirementFlags & modeRequirements() {return _health_and_arming_checks.modeRequirements();}
+
163 
+
164 protected:
+
165  void setSkipMessageCompatibilityCheck() {_skip_message_compatibility_check = true;}
+
166  void overrideRegistration(const std::shared_ptr<Registration> & registration);
+
167 
+
168 private:
+
169  void addSetpointType(SetpointBase * setpoint) override;
+
170  void setRequirement(const RequirementFlags & requirement_flags) override;
+
171 
+
172  friend class ModeExecutorBase;
+
173  RegistrationSettings getRegistrationSettings() const;
+
174  void onAboutToRegister();
+
175  bool onRegistered();
+
176 
+
177  void unsubscribeVehicleStatus();
+
178  void vehicleStatusUpdated(
+
179  const px4_msgs::msg::VehicleStatus::UniquePtr & msg,
+
180  bool do_not_activate = false);
+
181 
+
182  void callOnActivate();
+
183  void callOnDeactivate();
184 
-
185  void updateModeRequirementsFromSetpoints();
-
186  void setSetpointUpdateRateFromSetpointTypes();
-
187  void activateSetpointType(SetpointBase & setpoint);
-
188 
-
189  std::shared_ptr<Registration> _registration;
+
185  void updateSetpointUpdateTimer();
+
186 
+
187  void updateModeRequirementsFromSetpoints();
+
188  void setSetpointUpdateRateFromSetpointTypes();
+
189  void activateSetpointType(SetpointBase & setpoint);
190 
-
191  const Settings _settings;
-
192  bool _skip_message_compatibility_check{false};
-
193 
-
194  HealthAndArmingChecks _health_and_arming_checks;
+
191  std::shared_ptr<Registration> _registration;
+
192 
+
193  const Settings _settings;
+
194  bool _skip_message_compatibility_check{false};
195 
-
196  rclcpp::Subscription<px4_msgs::msg::VehicleStatus>::SharedPtr _vehicle_status_sub;
-
197  rclcpp::Publisher<px4_msgs::msg::ModeCompleted>::SharedPtr _mode_completed_pub;
-
198  rclcpp::Publisher<px4_msgs::msg::VehicleControlMode>::SharedPtr _config_control_setpoints_pub;
-
199 
-
200  bool _is_active{false};
-
201  bool _is_armed{false};
-
202  bool _completed{false};
-
203 
-
204  float _setpoint_update_rate_hz{0.f};
-
205  rclcpp::TimerBase::SharedPtr _setpoint_update_timer;
-
206  rclcpp::Time _last_setpoint_update{};
-
207 
-
208  ConfigOverrides _config_overrides;
+
196  HealthAndArmingChecks _health_and_arming_checks;
+
197 
+
198  rclcpp::Subscription<px4_msgs::msg::VehicleStatus>::SharedPtr _vehicle_status_sub;
+
199  rclcpp::Publisher<px4_msgs::msg::ModeCompleted>::SharedPtr _mode_completed_pub;
+
200  rclcpp::Publisher<px4_msgs::msg::VehicleControlMode>::SharedPtr _config_control_setpoints_pub;
+
201 
+
202  bool _is_active{false};
+
203  bool _is_armed{false};
+
204  bool _completed{false};
+
205 
+
206  float _setpoint_update_rate_hz{0.f};
+
207  rclcpp::TimerBase::SharedPtr _setpoint_update_timer;
+
208  rclcpp::Time _last_setpoint_update{};
209 
-
210  std::vector<std::shared_ptr<SetpointBase>> _setpoint_types;
-
211  std::vector<SetpointBase *> _new_setpoint_types;
-
212 };
-
213 
-
215 } // namespace px4_ros2
+
210  ConfigOverrides _config_overrides;
+
211 
+
212  std::vector<std::shared_ptr<SetpointBase>> _setpoint_types;
+
213  std::vector<SetpointBase *> _new_setpoint_types;
+
214 };
+
215 
+
217 } // namespace px4_ros2
Definition: context.hpp:20
Definition: health_and_arming_checks.hpp:24
Base class for a mode.
Definition: mode.hpp:70
-
virtual void checkArmingAndRunConditions(HealthAndArmingCheckReporter &reporter)
Definition: mode.hpp:117
-
RequirementFlags & modeRequirements()
Definition: mode.hpp:160
+
virtual void checkArmingAndRunConditions(HealthAndArmingCheckReporter &reporter)
Definition: mode.hpp:119
+
RequirementFlags & modeRequirements()
Definition: mode.hpp:162
void setSetpointUpdateRate(float rate_hz)
uint8_t ModeID
Mode ID, corresponds to nav_state.
Definition: mode.hpp:72
virtual void onDeactivate()=0
@@ -281,10 +283,10 @@
@ Interrupted
Ctrl-C or another error (from ROS)
@ Deactivated
Mode or executor got deactivated.
@ Rejected
The request was rejected.
-
Definition: mode.hpp:89
-
std::string name
Name of the mode with length < 25 characters.
Definition: mode.hpp:96
-
bool activate_even_while_disarmed
If true, the mode is also activated while disarmed if selected.
Definition: mode.hpp:97
-
ModeID replace_internal_mode
Can be used to replace an fmu-internal mode.
Definition: mode.hpp:98
+
Definition: mode.hpp:91
+
std::string name
Name of the mode with length < 25 characters.
Definition: mode.hpp:98
+
bool activate_even_while_disarmed
If true, the mode is also activated while disarmed if selected.
Definition: mode.hpp:99
+
ModeID replace_internal_mode
Can be used to replace an fmu-internal mode.
Definition: mode.hpp:100
Requirement flags used by modes.
Definition: requirement_flags.hpp:17
diff --git a/navtreedata.js b/navtreedata.js index 026e795..1ccf1fc 100644 --- a/navtreedata.js +++ b/navtreedata.js @@ -56,7 +56,7 @@ var NAVTREE = var NAVTREEINDEX = [ "angular__velocity_8hpp_source.html", -"dir_b8e7908c0efb14b858365b2d52beb02b.html" +"dir_b7e881b133c7866aa1b0587ef5240a54.html" ]; var SYNCONMSG = 'click to disable panel synchronisation'; diff --git a/navtreeindex0.js b/navtreeindex0.js index 6486029..cd7aab5 100644 --- a/navtreeindex0.js +++ b/navtreeindex0.js @@ -110,16 +110,17 @@ var NAVTREEINDEX0 = "classpx4__ros2_1_1ModeBase.html#a1692146bb14350143a739c3613209c7d":[3,0,2,20], "classpx4__ros2_1_1ModeBase.html#a1ae9e17a6da52b6d99e389f09295cb98":[3,0,2,10], "classpx4__ros2_1_1ModeBase.html#a20735ebd2fadea15e4498755c24a0d0d":[3,0,2,15], -"classpx4__ros2_1_1ModeBase.html#a2330b704b4eeae79cd19cf295946055d":[3,0,2,26], +"classpx4__ros2_1_1ModeBase.html#a2330b704b4eeae79cd19cf295946055d":[3,0,2,27], "classpx4__ros2_1_1ModeBase.html#a33f25f7c337c4b50350a6fa11723099c":[3,0,2,2], "classpx4__ros2_1_1ModeBase.html#a3741e155424f7685a33a412ced626dbd":[3,0,2,21], "classpx4__ros2_1_1ModeBase.html#a3aa9c6b5f468a816fd430dd1fa6b4175":[3,0,2,12], "classpx4__ros2_1_1ModeBase.html#a3d8ba94373de2a1c5bf0edaac7263ab1":[3,0,2,16], "classpx4__ros2_1_1ModeBase.html#a49de7d1d3872f1c7531abfe870483fb2":[3,0,2,1], "classpx4__ros2_1_1ModeBase.html#a4c031b61de3b2f2ea47d416c31f7b403":[3,0,2,9], -"classpx4__ros2_1_1ModeBase.html#a654f01c967124dfdcb468667d733107b":[3,0,2,25], -"classpx4__ros2_1_1ModeBase.html#a683f9e385013b260a2f875eaf1822948":[3,0,2,24], -"classpx4__ros2_1_1ModeBase.html#a73cb33bd1ac9df1e5b3eb319d64f419a":[3,0,2,23], +"classpx4__ros2_1_1ModeBase.html#a623b52f7c4393c424279b1d1004cb331":[3,0,2,23], +"classpx4__ros2_1_1ModeBase.html#a654f01c967124dfdcb468667d733107b":[3,0,2,26], +"classpx4__ros2_1_1ModeBase.html#a683f9e385013b260a2f875eaf1822948":[3,0,2,25], +"classpx4__ros2_1_1ModeBase.html#a73cb33bd1ac9df1e5b3eb319d64f419a":[3,0,2,24], "classpx4__ros2_1_1ModeBase.html#a7c52ee6ef9afc418b0b063983107f0fb":[3,0,2,14], "classpx4__ros2_1_1ModeBase.html#a80f5091b038153c411945a60d22e2e9e":[3,0,2,8], "classpx4__ros2_1_1ModeBase.html#a865cc49d8de26ce15ed4c863ec1f037e":[3,0,2,4], @@ -248,6 +249,5 @@ var NAVTREEINDEX0 = "dir_728c52ee7baa13f3cf535ab5642f1615.html":[5,0,0,0,0,5], "dir_8da2cce8c833200a2308384b4fa5c068.html":[5,0,0,0,0,1], "dir_af38b6b5d6d37ebc33801d8219340576.html":[5,0,0,0,0,6], -"dir_b4adda84387dc0fc0ee13f2f482eac98.html":[5,0,0], -"dir_b7e881b133c7866aa1b0587ef5240a54.html":[5,0,0,0] +"dir_b4adda84387dc0fc0ee13f2f482eac98.html":[5,0,0] }; diff --git a/navtreeindex1.js b/navtreeindex1.js index d142abc..e7b75bc 100644 --- a/navtreeindex1.js +++ b/navtreeindex1.js @@ -1,5 +1,6 @@ var NAVTREEINDEX1 = { +"dir_b7e881b133c7866aa1b0587ef5240a54.html":[5,0,0,0], "dir_b8e7908c0efb14b858365b2d52beb02b.html":[5,0,0,0,0,0], "dir_b95b01a0d2d44bddfe38398b1ce0aec3.html":[5,0,0,0,0,2,0,0], "dir_cc7c13f17ffdd9c3833a1819211ef352.html":[5,0,0,0,0],