nasa-jpl / fastcat

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

Add act uts #73

Closed davidinkyu-kim closed 1 year ago

davidinkyu-kim commented 1 year ago

Adding actuator unit test for fault-reset-purging_residue_command

davidinkyu-kim commented 1 year ago

By fastcat::actuator::fault, jsd_egdstate.cmd_position is set to 0. But this is not propagated to the motor controller, tested in the testbed.

alex-brinkman commented 1 year ago

By fastcat::actuator::fault, jsd_egdstate.cmd_position is set to 0. But this is not propagated to the motor controller, tested in the testbed.

So this issue is not fully resolved yet then?

davidinkyu-kim commented 1 year ago

@alex-brinkman I've put add_definitions inside src and under BUILD_TESTS conditional. With cmake 3.12 or higher, we can utilize add_complie_definition or more fine conditionals, but seems the code works so far.

Still working on the real hardware regarding not purging the state with motor controller

davidinkyu-kim commented 1 year ago

fastcat itself builds correctly with the options between BUILD_TESTS=ON and OFF.

However, found that if other package wants to use the header file(e.g. fcat loading up manager.h before building the fastcat library), would fail due to unknown definition of PROTECTED and PRIVATE.

Easy fix is to add add_definitions in fcat's CMakeLists.

alex-brinkman commented 1 year ago

We need to provide definitions for these out of the box, I confirmed they are still lacking in a tiny c++ application with the current implementation. I'm happy to take this small piece over and propose something if you'd like.

davidinkyu-kim commented 1 year ago

Sure, go ahead :)