Migration Guides: Jazzy to Kilted
This list summarizes important changes between Jazzy (previous) and Kilted (current) releases, where changes to user code might be necessary.
controller_interface
get_ordered_interfacesnow throws if the size of the output vector does not match the size of the input names vector (#2528).controller_interface::init()has been deprecated, use theinit(const controller_interface::ControllerInterfaceParams & params)method instead. (#2390). For example, the following code:controller_interface::ControllerInterfaceParams params; params.controller_name = "controller_name"; params.robot_description = ""; params.update_rate = 50; params.node_namespace = ""; params.node_options = controller.define_custom_node_options(); controller.init(params);
controller_manager
The spawner now supports two new arguments
--switch-asapand--no-switch-asapto control the behaviour of the spawner when switching controllers to be in realtime loop (or) non-realtime loop. By default, it is set to--no-switch-asapbecause when activating multiple controllers at same time might affect the realtime loop performance (#2452). If it is needed to switch controllers in realtime loop, then the argument--switch-asapneed to be parsed to the spawner.
hardware_interface
The preferred signature for the
on_initmethod in allhardware_interface::*Interfaceclasses has changed (# 2323) 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. Hardware implementations implementing theon_initmethod should update their method signature accordingly as the deprecated signature will be removed in a future release.See Writing a Hardware Component for advanced usage of the
HardwareComponentInterfaceParamsobject.The preferred signature for the
init()method in allhardware_interface::*Interfaceclasses has changed (# 2344) 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 updated from passing aconst HardwareInfo &to passing aconst HardwareComponentParams &(# 2323). The old signatures are deprecated and will be removed in a future release.The
thread_priorityvariable in theHardwareInfostruct has been deprecated in favor of newly introducedasync_paramsvariable that has more options in theHardwareComponentParamsstruct. The deprecatedthread_priorityvariable will be removed in a future release. (# 2477).