File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
controller_interface/include/controller_interface
hardware_interface/include/hardware_interface Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -202,8 +202,20 @@ class ControllerInterfaceBase : public rclcpp_lifecycle::node_interfaces::Lifecy
202202
203203 std::shared_ptr<const rclcpp_lifecycle::LifecycleNode> get_node () const ;
204204
205+ /* *
206+ * Get the current lifecycle state of the controller node.
207+ * \note This method is not real-time safe and should not be called in the control loop.
208+ * \note This method is thread safe.
209+ * \returns lifecycle state of the controller node.
210+ */
205211 const rclcpp_lifecycle::State & get_lifecycle_state () const ;
206212
213+ /* *
214+ * Get the lifecycle id of the controller node that is cached internally
215+ * to avoid calls to get_lifecycle_state() in the real-time control loop.
216+ * \note This method is real-time safe and thread safe and can be called in the control loop.
217+ * \returns lifecycle id of the controller node.
218+ */
207219 uint8_t get_lifecycle_id () const ;
208220
209221 unsigned int get_update_rate () const ;
Original file line number Diff line number Diff line change @@ -678,12 +678,17 @@ class HardwareComponentInterface : public rclcpp_lifecycle::node_interfaces::Lif
678678
679679 // / Get life-cycle state of the hardware.
680680 /* *
681+ * \note This method is not real-time safe and should not be called in the control loop.
682+ * \note This method is thread safe.
681683 * \return state.
682684 */
683685 const rclcpp_lifecycle::State & get_lifecycle_state () const { return lifecycle_state_; }
684686
685687 // / Set life-cycle state of the hardware.
686688 /* *
689+ * Get the lifecycle id of the hardware component interface that is cached internally to avoid
690+ * calls to get_lifecycle_state() in the real-time control loop.
691+ * \note This method is real-time safe and thread safe and can be called in the control loop.
687692 * \return state.
688693 */
689694 void set_lifecycle_state (const rclcpp_lifecycle::State & new_state)
You can’t perform that action at this time.
0 commit comments