Skip to content

ARIA Actions Example

Izwor edited this page Nov 2, 2016 · 13 revisions

Here is example of simple ARIA Actions, to understand how it works with robot in ROS+Aria enviroment.

Each action have parameters (left blank if not used or use default value) and priority. You may find below information and examples about simple ARIA actions you can use in The Maze. To find out more please check ARIA Examples or ARIA Manual. If you have already installed ARIA or are using Hackathon VM you may find ARIA Manual in this location: /catkin_ws/src/rosaria/local/Aria/docs/index.html or /usr/local/Aria/docs/index.html

Please check wander.cpp file for easy example how to use ARIA Actions.
For more advanced usage of ARIA Actions please check gotoActionExample and actionExample.

ArActionConstantVelocity

Constructor & Destructor Documentation:
ArActionConstantVelocity::ArActionConstantVelocity
( const char * name = "Constant Velocity",
double velocity = 400
)

Constructor.
Parameters:
name name of the action
velocity velocity to travel at (mm/sec)

Example in .cpp file:
ArActionConstantVelocity constantVelocity("Constant Velocity", 400);

ArActionLimiterForwards

Constructor & Destructor Documentation:
ArActionLimiterForwards::ArActionLimiterForwards
( const char * name = "speed limiter",
double stopDistance = 250,
double slowDistance = 1000,
double slowSpeed = 200,
double widthRatio = 1 )'

Constructor.
Parameters:
name name of the action
stopDistance distance at which to stop (mm)
slowDistance distance at which to slow down (mm)
slowSpeed speed allowed at slowDistance, scales to 0 at slow distance (mm/sec)
widthRatio Ratio of the width of the box to look at to the robot radius (multiplier)

Example in .cpp file:
// limiter for close obstacles
teleop->addAction(new ArActionLimiterForwards("speed limiter near", 300, 600, 250), 95);
// basic values 300,600,250
// limiter for far away obstacles
teleop->addAction(new ArActionLimiterForwards("speed limiter far", 300, 1100, 400), 90);
//basic values 300,1100,400
//Numbers 90 and 95 are for priority of the actions (100 being the highest, 0 the lowest)

ArActionStallRecover

Constructor & Destructor Documentation:
ArActionStallRecover::ArActionStallRecover
( const char * name = "stall recover",
double obstacleDistance = 225,
int cyclesToMove = 50,
double speed = 150,
double degreesToTurn = 45,
bool enabled = true
)

Constructor.
Parameters:
name name of the action
obstacleDistance distance at which not to move because of obstacle. (mm)
cyclesToMove default number of cycles to move (# of cycles) (may be changed via ArConfig)
speed default speed at which to back up or go forward (mm/sec) (may be changed via ArConfig)
degreesToTurn default number of degrees to turn (deg) (may be changed vi ArConfig)
enabled default value of "enabled" state configuration parameter (may be changed via ArConfig)

Example in .cpp file:
// if we're stalled we want to back up and recover
wander->addAction(new ArActionStallRecover, 100);
//Number 100 is for priority of the actions (100 being the highest, 0 the lowest)

Clone this wiki locally