In "rec/robotino/api2/c/OmniDrive.h" you can find functions for manipulating Robotino's omnidrive.
More...
#include "rec/robotino/api2/c/globals.h"
#include "rec/robotino/api2/c/Com.h"
Go to the source code of this file.
|
DLLEXPORT OmniDriveId | OmniDrive_construct () |
|
DLLEXPORT BOOL | OmniDrive_destroy (OmniDriveId id) |
|
DLLEXPORT BOOL | OmniDrive_setComId (OmniDriveId id, ComId comId) |
|
DLLEXPORT BOOL | OmniDrive_setVelocity (OmniDriveId id, float vx, float vy, float omega) |
|
DLLEXPORT BOOL | OmniDrive_project (OmniDriveId id, float *m1, float *m2, float *m3, float vx, float vy, float omega) |
|
DLLEXPORT int | OmniDrive_num_objects (void) |
|
In "rec/robotino/api2/c/OmniDrive.h" you can find functions for manipulating Robotino's omnidrive.
Use OmniDrive_construct() to create a new omnidrive object. Associate the omnidrive object with a com object using OmniDrive_setComId(). Use OmniDrive_setVelocity() to drive Robotino.
#define INVALID_OMNIDRIVEID -1 |
Invalid OmniDriveId is -1
Construct an OmniDrive object
- Returns
- Returns the ID of the newly constructed OmniDrive object.
Destroy the OmniDrive object assigned to id
- Parameters
-
id | The id of the OmniDrive object to be destroyed |
- Returns
- Returns TRUE (1) on success. Returns FALSE (0) if the given OmniDriveId is invalid.
DLLEXPORT int OmniDrive_num_objects |
( |
void |
| ) |
|
DLLEXPORT BOOL OmniDrive_project |
( |
OmniDriveId |
id, |
|
|
float * |
m1, |
|
|
float * |
m2, |
|
|
float * |
m3, |
|
|
float |
vx, |
|
|
float |
vy, |
|
|
float |
omega |
|
) |
| |
Project the velocity of the robot in cartesian coordinates to single motor speeds.
- Parameters
-
id | The omnidrive id |
m1 | The resulting speed of motor 1 in rpm |
m2 | The resulting speed of motor 2 in rpm |
m3 | The resulting speed of motor 3 in rpm |
vx | Velocity in x-direction in mm/s |
vy | Velocity in y-direction in mm/s |
omega | Angular velocity in deg/s |
- Returns
- Returns TRUE (1) on success. Returns FALSE (0) if the given OmniDriveId is invalid.
Associated an OmniDrive object with a communication interface, i.e. binding the OmniDrive to a specific Robotino
- Returns
- Returns TRUE (1) on success. Returns FALSE (0) if the given OmniDriveId or ComId is invalid.
DLLEXPORT BOOL OmniDrive_setVelocity |
( |
OmniDriveId |
id, |
|
|
float |
vx, |
|
|
float |
vy, |
|
|
float |
omega |
|
) |
| |
Drive Robotino associated with id
- Parameters
-
id | The omnidrive id |
vx | Velocity in x-direction in m/s |
vy | Velocity in y-direction in m/s |
omega | Angular velocity in rad/s |
- Returns
- Returns TRUE (1) on success. Returns FALSE (0) if the given OmniDriveId is invalid.