nasa-jpl / fastcat

C++ EtherCAT Device Command & Control Library
Other
42 stars 10 forks source link

Absolute actuators not correctly ignored in position save file #122

Open JosephBowkett opened 11 months ago

JosephBowkett commented 11 months ago

As discovered by Arthur B, starting and stopping a casah/ros2/fcat node with only absolute platinum actuators causes a bug where a fastcat_saved_positions.yaml file will be created, but nothing placed inside it (because there are no relative encoder actuators) and then the node fails on the next startup because the file does not contain the actuators: field.

The fix is likely to correctly check for (*device)->GetState()->something_something->absolute_encoders == false here: https://github.com/nasa-jpl/fastcat/blob/v0.12.13/src/manager.cc#L945 (paraphrased)

JosephBowkett commented 11 months ago

Further update, it looks like there is no absolute encoder parameter implemented for GoldActuator or PlatinumActuator

Update: I was reminded that Gold and Platinum derive from Actuator, so should still have the parameter available

JosephBowkett commented 11 months ago

Similar, but not quite the same as https://github.com/nasa-jpl/fastcat/issues/45

arthur-bouton commented 9 months ago

Any update on this matter? So far, I have to delete the file fastcat_saved_positions.yaml each time I want to restart the fcat node. Not entirely sure if this is related, but the fcat node is also outputting this warning each time it receives a new command: fcat.cpp:251 | EVR [WARNING_HI ] Device type does not match for [actuator name]