#include <demonstrator_control_maestro.h>
Public Member Functions | |
virtual bool | close () |
Close. | |
virtual bool | init (DemonstratorParams *params) |
Initializing. | |
virtual bool | isMoving () |
MapDemonCtrlMaestro (DemonstratorParams *params) | |
Constructor. | |
virtual bool | movePos (const std::vector< double > &target_positions) |
virtual bool | recover () |
Recovery after emergency stop or power supply failure. | |
virtual bool | runCalibration () |
virtual void | setAcceleration () |
virtual void | setVelocity () |
Sets the maximum angular velocity (rad/s) for the Joints, use with care! | |
virtual bool | stop () |
virtual bool | updatePositions () |
virtual | ~MapDemonCtrlMaestro () |
Destructor. | |
Public Attributes | |
bool | is_moving_ |
Private Types | |
enum | { GET_POSITION = 0x90, SET_TARGET = 0x84, SET_VEL = 0x87, SET_ACCEL = 0x89, IS_MOVING = 0x93, GO_HOME = 0xA2 } |
Private Member Functions | |
double | int2rad (const int v, const int dof=0) |
int | rad2int (const double v, const int dof=0) |
void | writeCmd (const unsigned char cmd, const unsigned char channel=255, const unsigned char *data=NULL, const int size=0) |
Private Attributes | |
int | fd_ |
Definition at line 13 of file demonstrator_control_maestro.h.
anonymous enum [private] |
Definition at line 44 of file demonstrator_control_maestro.h.
Constructor.
Definition at line 18 of file demonstrator_control_maestro.cpp.
MapDemonCtrlMaestro::~MapDemonCtrlMaestro | ( | ) | [virtual] |
Destructor.
Definition at line 24 of file demonstrator_control_maestro.cpp.
bool MapDemonCtrlMaestro::close | ( | ) | [virtual] |
Close.
Reimplemented from MapDemonCtrl.
Definition at line 257 of file demonstrator_control_maestro.cpp.
bool MapDemonCtrlMaestro::init | ( | DemonstratorParams * | params | ) | [virtual] |
Initializing.
get serial port configurable parameters
now open serial port
open(2) returns <0 if the port could NOT be opened
Reimplemented from MapDemonCtrl.
Definition at line 31 of file demonstrator_control_maestro.cpp.
double MapDemonCtrlMaestro::int2rad | ( | const int | v, |
const int | dof = 0 |
||
) | [inline, private] |
Definition at line 69 of file demonstrator_control_maestro.h.
bool MapDemonCtrlMaestro::isMoving | ( | ) | [virtual] |
Definition at line 223 of file demonstrator_control_maestro.cpp.
bool MapDemonCtrlMaestro::movePos | ( | const std::vector< double > & | target_positions | ) | [virtual] |
Reimplemented from MapDemonCtrl.
Definition at line 140 of file demonstrator_control_maestro.cpp.
int MapDemonCtrlMaestro::rad2int | ( | const double | v, |
const int | dof = 0 |
||
) | [inline, private] |
Definition at line 60 of file demonstrator_control_maestro.h.
bool MapDemonCtrlMaestro::recover | ( | ) | [virtual] |
Recovery after emergency stop or power supply failure.
Reimplemented from MapDemonCtrl.
Definition at line 268 of file demonstrator_control_maestro.cpp.
bool MapDemonCtrlMaestro::runCalibration | ( | ) | [virtual] |
Reimplemented from MapDemonCtrl.
Definition at line 129 of file demonstrator_control_maestro.cpp.
void MapDemonCtrlMaestro::setAcceleration | ( | ) | [virtual] |
Definition at line 293 of file demonstrator_control_maestro.cpp.
void MapDemonCtrlMaestro::setVelocity | ( | ) | [virtual] |
Sets the maximum angular velocity (rad/s) for the Joints, use with care!
A Value of 0.5 is already pretty fast, you probably don't want anything more than one...
Reimplemented from MapDemonCtrl.
Definition at line 282 of file demonstrator_control_maestro.cpp.
bool MapDemonCtrlMaestro::stop | ( | ) | [virtual] |
Reimplemented from MapDemonCtrl.
Definition at line 246 of file demonstrator_control_maestro.cpp.
bool MapDemonCtrlMaestro::updatePositions | ( | ) | [virtual] |
Reimplemented from MapDemonCtrl.
Definition at line 179 of file demonstrator_control_maestro.cpp.
void MapDemonCtrlMaestro::writeCmd | ( | const unsigned char | cmd, |
const unsigned char | channel = 255 , |
||
const unsigned char * | data = NULL , |
||
const int | size = 0 |
||
) | [private] |
Definition at line 304 of file demonstrator_control_maestro.cpp.
int MapDemonCtrlMaestro::fd_ [private] |
Definition at line 54 of file demonstrator_control_maestro.h.
Definition at line 40 of file demonstrator_control_maestro.h.