KatanaGripperThread Class Reference
Katana gripper thread. More...
#include <gripper_thread.h>

Public Types | |
| enum | gripper_mode_t { OPEN_GRIPPER, CLOSE_GRIPPER } |
| Gripper execution mode. More... | |
Public Member Functions | |
| KatanaGripperThread (fawkes::RefPtr< CLMBase > katana, fawkes::Logger *logger, unsigned int poll_interval_ms) | |
| Constructor. | |
| void | set_mode (gripper_mode_t mode) |
| Set mode. | |
| virtual void | once () |
| Execute an action exactly once. | |
Protected Member Functions | |
| virtual void | run () |
| Stub to see name in backtrace for easier debugging. | |
Detailed Description
Katana gripper thread.This thread opens or closes the gripper when started.
Definition at line 28 of file gripper_thread.h.
Member Enumeration Documentation
Constructor & Destructor Documentation
| KatanaGripperThread::KatanaGripperThread | ( | fawkes::RefPtr< CLMBase > | katana, | |
| fawkes::Logger * | logger, | |||
| unsigned int | poll_interval_ms | |||
| ) |
Constructor.
- Parameters:
-
katana katana linear motion base class logger logger poll_interval_ms interval in ms between two checks if the final position has been reached
Definition at line 39 of file gripper_thread.cpp.
References OPEN_GRIPPER.
Member Function Documentation
| void KatanaGripperThread::once | ( | ) | [virtual] |
Execute an action exactly once.
This code is executed once and only once right after the thread is started before loop() is called. This is useful if you want to implement an one-shot background job. Just implement once() and leave once() untouched. Start the thread and detach it and it will just do its job and then die automatically. If you use set_delete_on_exit(true) even the Thread instance will be automatically deleted.
Reimplemented from fawkes::Thread.
Definition at line 60 of file gripper_thread.cpp.
References KatanaMotionThread::_error_code, KatanaMotionThread::_finished, KatanaMotionThread::_katana, KatanaMotionThread::_logger, CLOSE_GRIPPER, fawkes::KatanaInterface::ERROR_CMD_START_FAILED, fawkes::KatanaInterface::ERROR_COMMUNICATION, fawkes::Logger::log_debug(), fawkes::Logger::log_warn(), and fawkes::Thread::name().
| virtual void KatanaGripperThread::run | ( | ) | [inline, protected, virtual] |
Stub to see name in backtrace for easier debugging.
- See also:
- Thread::run()
Reimplemented from fawkes::Thread.
Definition at line 44 of file gripper_thread.h.
| void KatanaGripperThread::set_mode | ( | gripper_mode_t | mode | ) |
Set mode.
- Parameters:
-
mode open, either open or close
Definition at line 53 of file gripper_thread.cpp.
The documentation for this class was generated from the following files:
- src/plugins/katana/gripper_thread.h
- src/plugins/katana/gripper_thread.cpp

