1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #pragma once
- #include "AP_Gripper.h"
- #include "AP_Gripper_Backend.h"
- #include <SRV_Channel/SRV_Channel.h>
- #define EPM_RETURN_TO_NEUTRAL_MS 500
- class AP_Gripper_EPM : public AP_Gripper_Backend {
- public:
- AP_Gripper_EPM(struct AP_Gripper::Backend_Config &_config);
-
- void init_gripper() override;
-
- void grab() override;
-
- void release() override;
-
- bool grabbed() const override;
-
- bool released() const override;
-
-
- void update_gripper() override;
- private:
-
- void neutral();
- bool should_use_uavcan() const { return _uavcan_fd >= 0; }
- struct UAVCANCommand make_uavcan_command(uint16_t command) const;
-
- int _uavcan_fd = -1;
-
- uint32_t _last_grab_or_release;
- };
|