You're reading the documentation for a development version. For the latest released version, please have a look at Kilted.
Migration Guides: Kilted Kaiju to Lyrical Luth
This list summarizes important changes between Kilted Kaiju (previous) and Lyrical Luth (current) releases, where changes to user code might be necessary.
controller_interface
controller_manager
hardware_interface
The signature for the
on_initmethod in allhardware_interface::*Interfaceclasses has changed (#2323, #2589) fromCallbackReturn on_init(const hardware_interface::HardwareInfo& info)
to
CallbackReturn on_init(const HardwareComponentInterfaceParams& params)
The
HardwareInfoobject can be accessed from theHardwareComponentInterfaceParamsobject usingparams.hardware_info. See Writing a Hardware Component for advanced usage of theHardwareComponentInterfaceParamsobject.The signature for the
init()method in allhardware_interface::*Interfaceclasses has changed (#2344, #2589) fromCallbackReturn init(const HardwareInfo & hardware_info, rclcpp::Logger logger, rclcpp::Clock::SharedPtr clock)
to
CallbackReturn init(const hardware_interface::HardwareComponentParams & params)
The
initializemethods of all hardware components (such asActuator,Sensor, etc.) have been changed from passing aconst HardwareInfo &to passing aconst HardwareComponentParams &(#2323, #2589).The
get_valueof LoanedStateInterface and LoanedCommandInterface is now accessed usingget_optionalmethod. The value will be returned as anstd::optional<T>. (#2061).This change was made to better handle cases where the interface value may not be accessible due to a concurrent access from other threads in the system.
The
double get_value()of standard StateInterface and CommandInterface is now accessed usingget_optionalorbool get_value(T & value, bool wait_for_lock)method. The value will be returned as anstd::optional<T>when usingget_optional(#2831).Likewise, the
set_valuemethod has been updated tobool set_value(const T & value, bool wait_for_lock)and return value is to indicate success or failure of the operation (#2831).You can use the return values of these methods to handle cases where the interface value may not be accessible due to a concurrent access from other threads in the system. You can set the
wait_for_lockparameter totrueto block until the lock is acquired, however, this is not real-time safe and should be used with caution in real-time contexts.