ros2_control hardware interface handle defines value as double * - why?

asked 2021-08-12 07:22:25 -0500

Webadone gravatar image

updated 2022-08-18 09:22:37 -0500

Hi!

So the hardware interface Handle (https://github.com/ros-controls/ros2_...) defines double * as value.

I've understood that the way to go is to write a hardware driver like an ActuatorInterface, SensorInterface etc and each information like position, effort etc is made available by a {ReadOnly,ReadWrite}Handle. With that, a Controller is registering for that information and is doing the 'higher level' processing of it.

If I for example want to share something like a status register which often uses bits to encode the informations its somewhat 'wired' to use a double for that and it makes me feel unwell when casting around int<->double and doing shifts and binary operations on something that is meant to be a double :)

Do I miss something or is there a best practice for that example (sharing a status register)?

Thanks a lot!

edit retag flag offensive close merge delete

Comments

Just curious if there is anyone with the same thoughts or question? :)

Webadone gravatar image Webadone  ( 2022-08-18 09:23:58 -0500 )edit