Fawkes API  Fawkes Development Version
fawkes::KatanaController Class Referenceabstract

Abstract class for a Neuronics Katana controller. More...

#include <>>

Inheritance diagram for fawkes::KatanaController:

Public Member Functions

virtual ~KatanaController ()
 Virtual empty destructor. More...
 
virtual void init ()=0
 Initialize controller. More...
 
virtual void set_max_velocity (unsigned int vel)=0
 Set maximum velocity. More...
 
virtual bool final ()=0
 Check if movement is final. More...
 
virtual bool joint_angles ()=0
 Check if controller provides joint angle values. More...
 
virtual bool joint_encoders ()=0
 Check if controller provides joint encoder values. More...
 
virtual void calibrate ()=0
 Calibrate the arm. More...
 
virtual void turn_on ()=0
 Turn on arm/motors. More...
 
virtual void turn_off ()=0
 Turn off arm/motors. More...
 
virtual void stop ()=0
 Stop movement immediately. More...
 
virtual void read_coordinates (bool refresh=false)=0
 Store current coordinates of endeeffctor. More...
 
virtual void read_motor_data ()=0
 Read motor data of currently active joints from device into controller libray. More...
 
virtual void read_sensor_data ()=0
 Read all sensor data from device into controller libray. More...
 
virtual void gripper_open (bool blocking=false)=0
 Open Gripper. More...
 
virtual void gripper_close (bool blocking=false)=0
 Close Gripper. More...
 
virtual void move_to (float x, float y, float z, float phi, float theta, float psi, bool blocking=false)=0
 Move endeffctor to given coordinates. More...
 
virtual void move_to (std::vector< int > encoders, bool blocking=false)=0
 Move joints to encoder values. More...
 
virtual void move_to (std::vector< float > angles, bool blocking=false)=0
 Move joints to angle values. More...
 
virtual void move_motor_to (unsigned short id, int enc, bool blocking=false)=0
 Move single joint/motor to encoder value. More...
 
virtual void move_motor_to (unsigned short id, float angle, bool blocking=false)=0
 Move single joint/motor to angle value. More...
 
virtual void move_motor_by (unsigned short id, int enc, bool blocking=false)=0
 Move single joint/motor by encoder value (i.e. More...
 
virtual void move_motor_by (unsigned short id, float angle, bool blocking=false)=0
 Move single joint/motor by angle value (i.e. More...
 
virtual double x ()=0
 Get x-coordinate of latest endeffector position. More...
 
virtual double y ()=0
 Get y-coordinate of latest endeffector position. More...
 
virtual double z ()=0
 Get z-coordinate of latest endeffector position. More...
 
virtual double phi ()=0
 Get x-coordinate of latest endeffector position. More...
 
virtual double theta ()=0
 Get theta-rotation of latest endeffector orientation. More...
 
virtual double psi ()=0
 Get psi-rotation of latest endeffector orientation. More...
 
virtual void get_sensors (std::vector< int > &to, bool refresh=false)=0
 Get sensor values. More...
 
virtual void get_encoders (std::vector< int > &to, bool refresh=false)=0
 Get encoder values of joints/motors. More...
 
virtual void get_angles (std::vector< float > &to, bool refresh=false)=0
 Get angle values of joints/motors. More...
 

Detailed Description

Abstract class for a Neuronics Katana controller.

Author
Bahram Maleki-Fard

Definition at line 37 of file controller.h.

Constructor & Destructor Documentation

◆ ~KatanaController()

Member Function Documentation

◆ calibrate()

virtual void fawkes::KatanaController::calibrate ( )
pure virtual

Calibrate the arm.

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaCalibrationThread::once(), and ~KatanaController().

◆ final()

virtual bool fawkes::KatanaController::final ( )
pure virtual

Check if movement is final.

Returns
movement is final

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaMotorControlThread::once(), KatanaGotoThread::once(), and KatanaGripperThread::once().

◆ get_angles()

virtual void fawkes::KatanaController::get_angles ( std::vector< float > &  to,
bool  refresh = false 
)
pure virtual

Get angle values of joints/motors.

Parameters
tovector to be filled with angle values for active joints.
refreshrefresh joints/motors data (call 'read_motor_data')?

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::update_sensor_values(), and ~KatanaController().

◆ get_encoders()

virtual void fawkes::KatanaController::get_encoders ( std::vector< int > &  to,
bool  refresh = false 
)
pure virtual

Get encoder values of joints/motors.

Parameters
tovector to be filled with encoder values for active joints.
refreshrefresh joints/motors data (call 'read_motor_data')?

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::update_sensor_values(), and ~KatanaController().

◆ get_sensors()

virtual void fawkes::KatanaController::get_sensors ( std::vector< int > &  to,
bool  refresh = false 
)
pure virtual

Get sensor values.

Parameters
tovector to be filled with all available sensor values.
refreshrefresh sensor data (call 'read_sensor_data')?

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::update_sensor_values(), and ~KatanaController().

◆ gripper_close()

virtual void fawkes::KatanaController::gripper_close ( bool  blocking = false)
pure virtual

Close Gripper.

Parameters
blockingIs this a blocking call?

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaGripperThread::once(), and ~KatanaController().

◆ gripper_open()

virtual void fawkes::KatanaController::gripper_open ( bool  blocking = false)
pure virtual

Open Gripper.

Parameters
blockingIs this a blocking call?

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaGripperThread::once(), and ~KatanaController().

◆ init()

virtual void fawkes::KatanaController::init ( )
pure virtual

Initialize controller.

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::init(), and ~KatanaController().

◆ joint_angles()

virtual bool fawkes::KatanaController::joint_angles ( )
pure virtual

Check if controller provides joint angle values.

Returns
can get angle values

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::update_sensor_values(), and ~KatanaController().

◆ joint_encoders()

virtual bool fawkes::KatanaController::joint_encoders ( )
pure virtual

Check if controller provides joint encoder values.

Returns
can get encoder values

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::update_sensor_values(), and ~KatanaController().

◆ move_motor_by() [1/2]

virtual void fawkes::KatanaController::move_motor_by ( unsigned short  id,
int  enc,
bool  blocking = false 
)
pure virtual

Move single joint/motor by encoder value (i.e.

increase/decrease).

Parameters
idid of the joint/motor.
encincrease/decrease by encoder value.
blockingIs this a blocking call?

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaMotorControlThread::once(), and ~KatanaController().

◆ move_motor_by() [2/2]

virtual void fawkes::KatanaController::move_motor_by ( unsigned short  id,
float  angle,
bool  blocking = false 
)
pure virtual

Move single joint/motor by angle value (i.e.

increase/decrease).

Parameters
idid of the joint/motor.
angleincrease/decrease by angle value.
blockingIs this a blocking call?

Implemented in fawkes::KatanaControllerKni.

◆ move_motor_to() [1/2]

virtual void fawkes::KatanaController::move_motor_to ( unsigned short  id,
int  enc,
bool  blocking = false 
)
pure virtual

Move single joint/motor to encoder value.

Parameters
idid of the joint/motor.
enctarget encoder value.
blockingIs this a blocking call?

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaMotorControlThread::once(), and ~KatanaController().

◆ move_motor_to() [2/2]

virtual void fawkes::KatanaController::move_motor_to ( unsigned short  id,
float  angle,
bool  blocking = false 
)
pure virtual

Move single joint/motor to angle value.

Parameters
idid of the joint/motor.
angletarget angle value.
blockingIs this a blocking call?

Implemented in fawkes::KatanaControllerKni.

◆ move_to() [1/3]

virtual void fawkes::KatanaController::move_to ( float  x,
float  y,
float  z,
float  phi,
float  theta,
float  psi,
bool  blocking = false 
)
pure virtual

Move endeffctor to given coordinates.

Parameters
xtranslation on x-axis.
ytranslation on y-axis.
ztranslation on z-axis.
phi1st rotation of euler-ZXZ-rotation
theta2nd rotation of euler-ZXZ-rotation
psi3rd rotation of euler-ZXZ-rotation
blockingIs this a blocking call?

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaGotoThread::once(), and ~KatanaController().

◆ move_to() [2/3]

virtual void fawkes::KatanaController::move_to ( std::vector< int >  encoders,
bool  blocking = false 
)
pure virtual

Move joints to encoder values.

Parameters
encodersvector containing encoder values for all joints.
blockingIs this a blocking call?

Implemented in fawkes::KatanaControllerKni.

◆ move_to() [3/3]

virtual void fawkes::KatanaController::move_to ( std::vector< float >  angles,
bool  blocking = false 
)
pure virtual

Move joints to angle values.

Parameters
anglesvector containing angle values for all joints.
blockingIs this a blocking call?

Implemented in fawkes::KatanaControllerKni.

◆ phi()

virtual double fawkes::KatanaController::phi ( )
pure virtual

Get x-coordinate of latest endeffector position.

Call 'read_coordinates()' to read latest position.

Returns
x-coordinate Get phi-rotation of latest endeffector orientation. Call 'read_coordinates()' to read latest orientation.
phi-rotation (1st rotation of euler-ZXZ-rotation)

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::once(), and ~KatanaController().

◆ psi()

virtual double fawkes::KatanaController::psi ( )
pure virtual

Get psi-rotation of latest endeffector orientation.

Call 'read_coordinates()' to read latest orientation.

Returns
psi-rotation (3rd rotation of euler-ZXZ-rotation)

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::once(), and ~KatanaController().

◆ read_coordinates()

virtual void fawkes::KatanaController::read_coordinates ( bool  refresh = false)
pure virtual

Store current coordinates of endeeffctor.

Parameters
refreshfetch new joint data from device (update data in controller library). No need to set to 'true' if 'read_motor_data()' is being called regularly.

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::once(), and ~KatanaController().

◆ read_motor_data()

virtual void fawkes::KatanaController::read_motor_data ( )
pure virtual

Read motor data of currently active joints from device into controller libray.

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaMotorControlThread::once(), KatanaGotoThread::once(), KatanaGripperThread::once(), and ~KatanaController().

◆ read_sensor_data()

virtual void fawkes::KatanaController::read_sensor_data ( )
pure virtual

◆ set_max_velocity()

virtual void fawkes::KatanaController::set_max_velocity ( unsigned int  vel)
pure virtual

Set maximum velocity.

Parameters
velvelocity

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::init(), KatanaActThread::loop(), and ~KatanaController().

◆ stop()

virtual void fawkes::KatanaController::stop ( )
pure virtual

◆ theta()

virtual double fawkes::KatanaController::theta ( )
pure virtual

Get theta-rotation of latest endeffector orientation.

Call 'read_coordinates()' to read latest orientation.

Returns
theta-rotation (2nd rotation of euler-ZXZ-rotation)

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::once(), and ~KatanaController().

◆ turn_off()

virtual void fawkes::KatanaController::turn_off ( )
pure virtual

Turn off arm/motors.

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::loop(), and ~KatanaController().

◆ turn_on()

virtual void fawkes::KatanaController::turn_on ( )
pure virtual

Turn on arm/motors.

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::loop(), and ~KatanaController().

◆ x()

virtual double fawkes::KatanaController::x ( )
pure virtual

Get x-coordinate of latest endeffector position.

Call 'read_coordinates()' to read latest position.

Returns
x-coordinate

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::once(), and ~KatanaController().

◆ y()

virtual double fawkes::KatanaController::y ( )
pure virtual

Get y-coordinate of latest endeffector position.

Call 'read_coordinates()' to read latest position.

Returns
y-coordinate

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::once(), and ~KatanaController().

◆ z()

virtual double fawkes::KatanaController::z ( )
pure virtual

Get z-coordinate of latest endeffector position.

Call 'read_coordinates()' to read latest position.

Returns
z-coordinate

Implemented in fawkes::KatanaControllerKni.

Referenced by KatanaActThread::once(), and ~KatanaController().


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