Aruna
|
Namespaces | |
anonymous_namespace{movement.cpp} | |
Classes | |
class | Actuator |
class | ActuatorSet |
struct | axis_t |
Enumerations | |
enum | axis_mask_t : uint8_t { axis_mask_t::X = (1 << 0), axis_mask_t::Y = (1 << 1), axis_mask_t::Z = (1 << 2), axis_mask_t::ROLL = (1 << 3), axis_mask_t::YAW = (1 << 4), axis_mask_t::PITCH = (1 << 5), axis_mask_t::DIRECTION_PLUS = (1 << 6), axis_mask_t::DIRECTION_MIN = (1 << 7), axis_mask_t::DIRECTION_BOTH = 192, axis_mask_t::ALL_AXIS = 63, axis_mask_t::MAX = 6, axis_mask_t::NONE = 0 } |
enum | damping_t { damping_t::DISABLE = 0, damping_t::KEEP_VELOCITY = 0x01, damping_t::KEEP_DEGREE = 0x02 } |
enum | status_t { status_t::RUNNING = 0, status_t::STOPPED = 1 } |
Functions | |
status_t | start () |
initialise movement and communicate with hardware for active modes. More... | |
status_t | get_status () |
get the status of the movement unit. More... | |
void * | comm_handler_task (void *arg) |
task to handle all the incoming comm requests. More... | |
status_t | stop () |
Stop all motors and free all processes. More... | |
err_t | register_driver (Actuator *driver) |
register a accelerator driver for use. More... | |
void | calibrate_sensors () |
Calibarte the sensors, aka set 0 point. More... | |
uint8_t | test_sensor () |
test whenever the sensors are connected, sensor should be horizontal and facing up. More... | |
void | set_speed (axis_mask_t axisMask, int16_t speed) |
Set the speed of the motors directly. More... | |
int16_t | get_speed (axis_mask_t single_axis) |
Get the speed of an axis. More... | |
int16_t | get_velocity (axis_mask_t single_axis) |
get the current velocity More... | |
int16_t | get_degree (axis_mask_t single_axis) |
get the angle of an axis (pitch, roll and yaw only) More... | |
void | set_degree (axis_mask_t axisMask, int16_t degree) |
set the degree of an axis (only applies to yaw, pitch and roll) More... | |
void | set_velocity (axis_mask_t axisMask, int16_t mm_per_second) |
Set the target velocity of the ROV. More... | |
axis_mask_t | get_active_axis () |
Get active modus (X,Y,Z,yawn,pitch,roll) More... | |
damping_t | get_damping (axis_mask_t single_axis) |
get the damping of a single mode. More... | |
void | set_damping (axis_mask_t axisMask, damping_t damp) |
set the damping type. More... | |
err_t | unregister_driver (Actuator *driver) |
unregister a accelerator driver for use. More... | |
|
strong |
Enumerator | |
---|---|
X | |
Y | |
Z | |
ROLL | |
YAW | |
PITCH | |
DIRECTION_PLUS | |
DIRECTION_MIN | |
DIRECTION_BOTH | |
ALL_AXIS | |
MAX | |
NONE |
Definition at line 13 of file movementTypes.h.
|
strong |
|
strong |
void aruna::movement::calibrate_sensors | ( | ) |
Calibarte the sensors, aka set 0 point.
make sure that the device is standing still and is level for 400ms.
Definition at line 287 of file movement.cpp.
void * aruna::movement::comm_handler_task | ( | void * | arg | ) |
task to handle all the incoming comm requests.
arg,not | used. |
Definition at line 60 of file movement.cpp.
axis_mask_t aruna::movement::get_active_axis | ( | ) |
Get active modus (X,Y,Z,yawn,pitch,roll)
movement_mode_t
with a bit high on enabled modus. Use movement_mode_mask_t
to decipher. Definition at line 337 of file movement.cpp.
damping_t aruna::movement::get_damping | ( | axis_mask_t | single_axis | ) |
get the damping of a single mode.
single_axis | only 1 bit to high. |
Definition at line 345 of file movement.cpp.
int16_t aruna::movement::get_degree | ( | axis_mask_t | single_axis | ) |
get the angle of an axis (pitch, roll and yaw only)
single_axis | of target axis |
Definition at line 322 of file movement.cpp.
int16_t aruna::movement::get_speed | ( | axis_mask_t | single_axis | ) |
Get the speed of an axis.
single_axis | one axis at a time |
Definition at line 314 of file movement.cpp.
status_t aruna::movement::get_status | ( | ) |
get the status of the movement unit.
Definition at line 56 of file movement.cpp.
int16_t aruna::movement::get_velocity | ( | axis_mask_t | single_axis | ) |
get the current velocity
single_axis | of target axis |
Definition at line 318 of file movement.cpp.
register a accelerator driver for use.
driver | pointer to the driver |
err_t::OK
if it went well. err_t::FAIL
if not. Definition at line 278 of file movement.cpp.
void aruna::movement::set_damping | ( | axis_mask_t | axisMask, |
damping_t | damp | ||
) |
set the damping type.
err_t::DAMP_DISABLE
will disable all damping for that axiserr_t::DAMP_KEEP_VELOCITY
ROV will try to keep the current velocityerr_t::DAMP_KEEP_DEGREE
ROV will try to keep the current degree (only row, yaw and pitch) damp | damping_t, mode to set damping to. |
axisMask | axis to apply damping to |
Definition at line 349 of file movement.cpp.
void aruna::movement::set_degree | ( | axis_mask_t | axisMask, |
int16_t | degree | ||
) |
set the degree of an axis (only applies to yaw, pitch and roll)
axisMask | multiple axis to apply this to |
degree | degree (65535 is maximum) |
Definition at line 329 of file movement.cpp.
void aruna::movement::set_speed | ( | axis_mask_t | axisMask, |
int16_t | speed | ||
) |
Set the speed of the motors directly.
axisMask,multiple | axis to apply speed to. |
speed,speed | of the motors |
Definition at line 296 of file movement.cpp.
void aruna::movement::set_velocity | ( | axis_mask_t | axisMask, |
int16_t | mm_per_second | ||
) |
Set the target velocity of the ROV.
axisMask | axis to apply the velocity to |
mm_per_second | how fast |
Definition at line 333 of file movement.cpp.
status_t aruna::movement::start | ( | ) |
initialise movement and communicate with hardware for active modes.
start SIS report watcher thread
start reporter to report all SIS activiry to the watcher over comm channels
RUNNING
if it is running,STOPPED
is it us currenty stopped. Definition at line 30 of file movement.cpp.
status_t aruna::movement::stop | ( | ) |
Stop all motors and free all processes.
RUNNING
if it is running,STOPPED
is it us currenty stopped. Definition at line 263 of file movement.cpp.
uint8_t aruna::movement::test_sensor | ( | ) |
test whenever the sensors are connected, sensor should be horizontal and facing up.
Definition at line 291 of file movement.cpp.
unregister a accelerator driver for use.
driver | pointer to the driver |
err_t::OK
if it went well. err_t::FAIL
if not.