Is there an example how to get HardwareInfo ros2?

asked 2022-10-21 07:24:26 -0500

Edvard gravatar image

updated 2022-10-26 07:11:16 -0500

ljaniec gravatar image

Hi. Sorry for all mistakes, English is not my native language.

So I am porting my Noetic project to Foxy. Method configure() from SystemInterface requires hardware_interface::HardwareInfo parameter. If I understand correctly, this data can be acquired through parsing URDF file, but I have hard times with understanding how this can be achieved.

In examples that listed here and in ros2_control_demos there are no such examples. And maybe I overlooked, but I couldn't find any calls for configure() method. Appreciate any help.


UPD. I think, that for parsing URDF purposes I can use hardware_interface::parse_control_resources_from_urdf() method, but it returns std::vector<hardware_interface::HardwareInfo>, so results of this operation can't be used in configure() method and problem still remains.

edit retag flag offensive close merge delete