KatanaGotoThread Class Reference

Katana linear goto thread. More...

#include <goto_thread.h>

Inheritance diagram for KatanaGotoThread:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 KatanaGotoThread (fawkes::RefPtr< CLMBase > katana, fawkes::Logger *logger, unsigned int poll_interval_ms)
 Constructor.
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.

Protected Member Functions

virtual void run ()
 Stub to see name in backtrace for easier debugging.

Detailed Description

Katana linear goto thread.

This thread moves the arm into a specified position.

Author:
Tim Niemueller

Definition at line 28 of file goto_thread.h.


Constructor & Destructor Documentation

KatanaGotoThread::KatanaGotoThread ( 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 40 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::_error_code, KatanaMotionThread::_finished, KatanaMotionThread::_katana, KatanaMotionThread::_logger, fawkes::KatanaInterface::ERROR_CMD_START_FAILED, fawkes::KatanaInterface::ERROR_COMMUNICATION, fawkes::KatanaInterface::ERROR_MOTOR_CRASHED, fawkes::KatanaInterface::ERROR_NO_SOLUTION, fawkes::Logger::log_debug(), fawkes::Logger::log_warn(), and fawkes::Thread::name().

virtual void KatanaGotoThread::run (  )  [inline, protected, virtual]

Stub to see name in backtrace for easier debugging.

See also:
Thread::run()

Reimplemented from fawkes::Thread.

Definition at line 38 of file goto_thread.h.

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

Set target position.

Parameters:
x X coordinate relative to base
y Y coordinate relative to base
z Z coordinate relative to base
phi Phi Euler angle of tool
theta Theta Euler angle of tool
psi Psi Euler angle of tool

Definition at line 58 of file goto_thread.cpp.


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

Generated on 1 Mar 2011 for Fawkes API by  doxygen 1.6.1