ICube-Robotics / ethercat_driver_ros2

Hardware Interface for EtherCAT module integration with ros2_control
https://icube-robotics.github.io/ethercat_driver_ros2/
Apache License 2.0
126 stars 32 forks source link

Round values when using masks and factors or offsets at the same time #62

Closed JensVanhooydonck closed 7 months ago

JensVanhooydonck commented 1 year ago

When using the bool type in combination with a factor, the outcome is not as expected.

I use this to have an on/off contact which drives a pneumatic cilinder with length of 0.25m.

Factor in this case will be 4. During planning the value will be between 0 and 1, but due to rounding errors it never get's to 1, always stays at 0.9999...

With this rounding, we now can use this to round the 0.9999 to a 1.

JensVanhooydonck commented 7 months ago

Fixed by #85