Fawkes API
Fawkes Development Version
|
Controller class for a Neuronics Katana, using libkni to interact with the real Katana arm. More...
#include <>>
Public Member Functions | |
KatanaControllerKni () | |
Constructor. More... | |
virtual | ~KatanaControllerKni () |
Destructor. More... | |
virtual void | setup (std::string &device, std::string &kni_conffile, unsigned int read_timeout, unsigned int write_timeout) |
Setup parameters needed to initialize Katana arm with libkni. More... | |
virtual void | init () |
Initialize controller. More... | |
virtual void | set_max_velocity (unsigned int vel) |
Set maximum velocity. More... | |
virtual bool | final () |
Check if movement is final. More... | |
virtual bool | joint_angles () |
Check if controller provides joint angle values. More... | |
virtual bool | joint_encoders () |
Check if controller provides joint encoder values. More... | |
virtual void | calibrate () |
Calibrate the arm. More... | |
virtual void | stop () |
Stop movement immediately. More... | |
virtual void | turn_on () |
Turn on arm/motors. More... | |
virtual void | turn_off () |
Turn off arm/motors. More... | |
virtual void | read_coordinates (bool refresh=false) |
Store current coordinates of endeeffctor. More... | |
virtual void | read_motor_data () |
Read motor data of currently active joints from device into controller libray. More... | |
virtual void | read_sensor_data () |
Read all sensor data from device into controller libray. More... | |
virtual void | gripper_open (bool blocking=false) |
Open Gripper. More... | |
virtual void | gripper_close (bool blocking=false) |
Close Gripper. More... | |
virtual void | move_to (float x, float y, float z, float phi, float theta, float psi, bool blocking=false) |
Move endeffctor to given coordinates. More... | |
virtual void | move_to (std::vector< int > encoders, bool blocking=false) |
Move joints to encoder values. More... | |
virtual void | move_to (std::vector< float > angles, bool blocking=false) |
Move joints to angle values. More... | |
virtual void | move_motor_to (unsigned short id, int enc, bool blocking=false) |
Move single joint/motor to encoder value. More... | |
virtual void | move_motor_to (unsigned short id, float angle, bool blocking=false) |
Move single joint/motor to angle value. More... | |
virtual void | move_motor_by (unsigned short id, int enc, bool blocking=false) |
Move single joint/motor by encoder value (i.e. More... | |
virtual void | move_motor_by (unsigned short id, float angle, bool blocking=false) |
Move single joint/motor by angle value (i.e. More... | |
virtual double | x () |
Get x-coordinate of latest endeffector position. More... | |
virtual double | y () |
Get y-coordinate of latest endeffector position. More... | |
virtual double | z () |
Get z-coordinate of latest endeffector position. More... | |
virtual double | phi () |
Get x-coordinate of latest endeffector position. More... | |
virtual double | theta () |
Get theta-rotation of latest endeffector orientation. More... | |
virtual double | psi () |
Get psi-rotation of latest endeffector orientation. More... | |
virtual void | get_sensors (std::vector< int > &to, bool refresh=false) |
Get sensor values. More... | |
virtual void | get_encoders (std::vector< int > &to, bool refresh=false) |
Get encoder values of joints/motors. More... | |
virtual void | get_angles (std::vector< float > &to, bool refresh=false) |
Get angle values of joints/motors. More... | |
![]() | |
virtual | ~KatanaController () |
Virtual empty destructor. More... | |
Controller class for a Neuronics Katana, using libkni to interact with the real Katana arm.
Definition at line 48 of file controller_kni.h.
fawkes::KatanaControllerKni::KatanaControllerKni | ( | ) |
Constructor.
Definition at line 43 of file controller_kni.cpp.
|
virtual |
Destructor.
Definition at line 56 of file controller_kni.cpp.
|
virtual |
Calibrate the arm.
Implements fawkes::KatanaController.
Definition at line 148 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Check if movement is final.
Implements fawkes::KatanaController.
Definition at line 123 of file controller_kni.cpp.
|
virtual |
Get angle values of joints/motors.
to | vector to be filled with angle values for active joints. |
refresh | refresh joints/motors data (call 'read_motor_data')? |
Implements fawkes::KatanaController.
Definition at line 455 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Get encoder values of joints/motors.
to | vector to be filled with encoder values for active joints. |
refresh | refresh joints/motors data (call 'read_motor_data')? |
Implements fawkes::KatanaController.
Definition at line 442 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Get sensor values.
to | vector to be filled with all available sensor values. |
refresh | refresh sensor data (call 'read_sensor_data')? |
Implements fawkes::KatanaController.
Definition at line 421 of file controller_kni.cpp.
References read_sensor_data(), and fawkes::Exception::what().
|
virtual |
Close Gripper.
blocking | Is this a blocking call? |
Implements fawkes::KatanaController.
Definition at line 246 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Open Gripper.
blocking | Is this a blocking call? |
Implements fawkes::KatanaController.
Definition at line 228 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Initialize controller.
Implements fawkes::KatanaController.
Definition at line 82 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Check if controller provides joint angle values.
Implements fawkes::KatanaController.
Definition at line 137 of file controller_kni.cpp.
|
virtual |
Check if controller provides joint encoder values.
Implements fawkes::KatanaController.
Definition at line 142 of file controller_kni.cpp.
|
virtual |
Move single joint/motor by encoder value (i.e.
increase/decrease).
id | id of the joint/motor. |
enc | increase/decrease by encoder value. |
blocking | Is this a blocking call? |
Implements fawkes::KatanaController.
Definition at line 349 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Move single joint/motor by angle value (i.e.
increase/decrease).
id | id of the joint/motor. |
angle | increase/decrease by angle value. |
blocking | Is this a blocking call? |
Implements fawkes::KatanaController.
Definition at line 366 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Move single joint/motor to encoder value.
id | id of the joint/motor. |
enc | target encoder value. |
blocking | Is this a blocking call? |
Implements fawkes::KatanaController.
Definition at line 315 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Move single joint/motor to angle value.
id | id of the joint/motor. |
angle | target angle value. |
blocking | Is this a blocking call? |
Implements fawkes::KatanaController.
Definition at line 332 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Move endeffctor to given coordinates.
x | translation on x-axis. |
y | translation on y-axis. |
z | translation on z-axis. |
phi | 1st rotation of euler-ZXZ-rotation |
theta | 2nd rotation of euler-ZXZ-rotation |
psi | 3rd rotation of euler-ZXZ-rotation |
blocking | Is this a blocking call? |
Implements fawkes::KatanaController.
Definition at line 264 of file controller_kni.cpp.
References fawkes::Exception::what().
Referenced by move_to().
|
virtual |
Move joints to encoder values.
encoders | vector containing encoder values for all joints. |
blocking | Is this a blocking call? |
Implements fawkes::KatanaController.
Definition at line 283 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Move joints to angle values.
angles | vector containing angle values for all joints. |
blocking | Is this a blocking call? |
Implements fawkes::KatanaController.
Definition at line 299 of file controller_kni.cpp.
References move_to(), and fawkes::Exception::what().
|
virtual |
Get x-coordinate of latest endeffector position.
Call 'read_coordinates()' to read latest position.
Implements fawkes::KatanaController.
Definition at line 403 of file controller_kni.cpp.
|
virtual |
Get psi-rotation of latest endeffector orientation.
Call 'read_coordinates()' to read latest orientation.
Implements fawkes::KatanaController.
Definition at line 415 of file controller_kni.cpp.
|
virtual |
Store current coordinates of endeeffctor.
refresh | fetch new joint data from device (update data in controller library). No need to set to 'true' if 'read_motor_data()' is being called regularly. |
Implements fawkes::KatanaController.
Definition at line 188 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Read motor data of currently active joints from device into controller libray.
Implements fawkes::KatanaController.
Definition at line 198 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Read all sensor data from device into controller libray.
Implements fawkes::KatanaController.
Definition at line 216 of file controller_kni.cpp.
References fawkes::Exception::what().
Referenced by get_sensors().
|
virtual |
Set maximum velocity.
vel | velocity |
Implements fawkes::KatanaController.
Definition at line 112 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Setup parameters needed to initialize Katana arm with libkni.
device | device string, e.g. "/dev/ttyS0" |
kni_conffile | path to kni configfile, e.g. "/etc/kni3/hd300/katana6M180.cfg" |
read_timeout | timeout for read operations, in ms |
write_timeout | timeout for write operations, in ms |
Definition at line 72 of file controller_kni.cpp.
Referenced by KatanaActThread::init().
|
virtual |
Stop movement immediately.
Implements fawkes::KatanaController.
Definition at line 158 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Get theta-rotation of latest endeffector orientation.
Call 'read_coordinates()' to read latest orientation.
Implements fawkes::KatanaController.
Definition at line 409 of file controller_kni.cpp.
|
virtual |
Turn off arm/motors.
Implements fawkes::KatanaController.
Definition at line 178 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Turn on arm/motors.
Implements fawkes::KatanaController.
Definition at line 168 of file controller_kni.cpp.
References fawkes::Exception::what().
|
virtual |
Get x-coordinate of latest endeffector position.
Call 'read_coordinates()' to read latest position.
Implements fawkes::KatanaController.
Definition at line 385 of file controller_kni.cpp.
|
virtual |
Get y-coordinate of latest endeffector position.
Call 'read_coordinates()' to read latest position.
Implements fawkes::KatanaController.
Definition at line 391 of file controller_kni.cpp.
|
virtual |
Get z-coordinate of latest endeffector position.
Call 'read_coordinates()' to read latest position.
Implements fawkes::KatanaController.
Definition at line 397 of file controller_kni.cpp.