atticusrussell / ros2_rpi_pwm_hardware_interface

hardware interface for PWM servos through Raspberry Pi's GPIO pins compatible with ros2_control framework
Apache License 2.0
6 stars 1 forks source link

create mock component test #20

Open atticusrussell opened 1 year ago

atticusrussell commented 1 year ago

create a test that works with mock hardware to test the hardware interface

atticusrussell commented 1 year ago
Running main() from gmock_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from TestRPiPWMHardwareInterface
[ RUN      ] TestRPiPWMHardwareInterface.load_rpi_pwm_hardware_interface_2dof
[INFO 1687229054.464556096] [resource_manager]: Loading hardware 'RPiPWMHardwareInterface2dof'  (load_hardware() at ./src/resource_manager.cpp:88)
Exception caught: According to the loaded plugin descriptions the class rpi_pwm_hardware_interface/RPiPWMHardwareInterface with base class type hardware_interface::SystemInterface does not exist. Declared types are  fake_components/GenericSystem mock_components/GenericSystem test_hardware_components/TestSystemCommandModes test_hardware_components/TestTwoJointSystem test_system
[       OK ] TestRPiPWMHardwareInterface.load_rpi_pwm_hardware_interface_2dof (44246 ms)
[----------] 1 test from TestRPiPWMHardwareInterface (44246 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (44246 ms total)
[  PASSED  ] 1 test.
[1] + Done                       "/usr/bin/gdb" --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-bshyxq4z.qik" 1>"/tmp/Microsoft-MIEngine-Out-veg4plhj.so0"
atticusrussell commented 1 year ago

possibly create looking at the base RTW hardware interface