Fawkes API  Fawkes Development Version
KatanaGotoThread Class Reference

Katana linear goto thread. More...

#include "goto_thread.h"

Inheritance diagram for KatanaGotoThread:

List of all members.

Public Member Functions

 KatanaGotoThread (fawkes::RefPtr< fawkes::KatanaController > katana, fawkes::Logger *logger, unsigned int poll_interval_ms)
 Constructor.
virtual void set_target (float x, float y, float z, float phi, float theta, float psi)
 Set target position.
virtual void once ()
 Execute an action exactly once.

Detailed Description

Katana linear goto thread.

This thread moves the arm into a specified position.

Author:
Tim Niemueller

Constructor & Destructor Documentation

KatanaGotoThread::KatanaGotoThread ( fawkes::RefPtr< fawkes::KatanaController katana,
fawkes::Logger logger,
unsigned int  poll_interval_ms 
)

Constructor.

Parameters:
katanakatana controller base class
loggerlogger
poll_interval_msinterval in ms between two checks if the final position has been reached

Definition at line 41 of file goto_thread.cpp.


Member Function Documentation

void KatanaGotoThread::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 71 of file goto_thread.cpp.

References KatanaMotionThread::_katana, KatanaMotionThread::_logger, fawkes::Logger::log_warn(), fawkes::Exception::what(), KatanaMotionThread::_finished, KatanaMotionThread::_error_code, fawkes::Logger::log_debug(), and fawkes::Thread::name().

void KatanaGotoThread::set_target ( float  x,
float  y,
float  z,
float  phi,
float  theta,
float  psi 
) [virtual]

Set target position.

Parameters:
xX coordinate relative to base
yY coordinate relative to base
zZ coordinate relative to base
phiPhi Euler angle of tool
thetaTheta Euler angle of tool
psiPsi Euler angle of tool

Definition at line 59 of file goto_thread.cpp.


The documentation for this class was generated from the following files: