ros2_control hardware interface handle defines value as double * - why?
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!
Just curious if there is anyone with the same thoughts or question? :)