KatanaMotionThread Class Reference
Katana motion thread base class. More...
#include <motion_thread.h>

Public Member Functions | |
| KatanaMotionThread (const char *thread_name, fawkes::RefPtr< CLMBase > katana, fawkes::Logger *logger) | |
| Constructor. | |
| bool | finished () const |
| Did the motion finish already? | |
| virtual void | reset () |
| Reset for next execution. | |
| unsigned int | error_code () const |
| Error code. | |
Protected Attributes | |
| fawkes::RefPtr< CLMBase > | _katana |
| Katana object for interaction with the arm. | |
| bool | _finished |
| Set to true when motion is finished, to false on reset. | |
| fawkes::Logger * | _logger |
| Logger. | |
| unsigned int | _error_code |
| Set to the desired error code on error. | |
Detailed Description
Katana motion thread base class.Base class for motion threads for the Katana.
When implementing a motion thread ensure that you read the sensor data during the communication with the arm. The main (act) thread will not do this as not to interfere with motion thread communication. You can use code like this:
_katana->GetBase()->GetSCT()->arr[0].recvDAT(); // update sensor values
Definition at line 34 of file motion_thread.h.
Constructor & Destructor Documentation
| KatanaMotionThread::KatanaMotionThread | ( | const char * | thread_name, | |
| fawkes::RefPtr< CLMBase > | katana, | |||
| fawkes::Logger * | logger | |||
| ) |
Constructor.
- Parameters:
-
thread_name name of the thread katana katana linear motion base class logger logger
Definition at line 46 of file motion_thread.cpp.
References _error_code, _finished, _katana, and _logger.
Member Function Documentation
| unsigned int KatanaMotionThread::error_code | ( | ) | const |
Error code.
- Returns:
- error code, one or more of the ERROR_* constants from the KatanaInterface or'ed.
Definition at line 73 of file motion_thread.cpp.
References _error_code.
| bool KatanaMotionThread::finished | ( | ) | const |
Did the motion finish already?
- Returns:
- true if the motion was finished, flase otherwise
Definition at line 62 of file motion_thread.cpp.
References _finished.
| void KatanaMotionThread::reset | ( | void | ) | [virtual] |
Reset for next execution.
Resets _finished and _error_code. If you override this method call the base class method in your method. It should be used to do anything that is required to be able to run the thread again.
Definition at line 85 of file motion_thread.cpp.
References _error_code, and _finished.
Member Data Documentation
unsigned int KatanaMotionThread::_error_code [protected] |
Set to the desired error code on error.
Definition at line 53 of file motion_thread.h.
Referenced by error_code(), KatanaMotionThread(), KatanaGripperThread::once(), KatanaGotoThread::once(), KatanaCalibrationThread::once(), and reset().
bool KatanaMotionThread::_finished [protected] |
Set to true when motion is finished, to false on reset.
Definition at line 49 of file motion_thread.h.
Referenced by finished(), KatanaMotionThread(), KatanaGripperThread::once(), KatanaGotoThread::once(), KatanaCalibrationThread::once(), and reset().
fawkes::RefPtr<CLMBase> KatanaMotionThread::_katana [protected] |
Katana object for interaction with the arm.
Definition at line 47 of file motion_thread.h.
Referenced by KatanaMotionThread(), KatanaGripperThread::once(), KatanaGotoThread::once(), and KatanaCalibrationThread::once().
fawkes::Logger* KatanaMotionThread::_logger [protected] |
Logger.
Definition at line 51 of file motion_thread.h.
Referenced by KatanaMotionThread(), KatanaGripperThread::once(), KatanaGotoThread::once(), and KatanaCalibrationThread::once().
The documentation for this class was generated from the following files:
- src/plugins/katana/motion_thread.h
- src/plugins/katana/motion_thread.cpp

