Description

UAria is an UObject created to drive all MobileRobots/ActivMedia platforms. It uses the Advanced Robot Interface for Applications (ARIA) manufacturer library. ARIA can dynamically control your robot's velocity, heading, relative heading, and other motion parameters either through simple low-level commands or through its high-level Actions infrastructure. ARIA also receives position estimates, sonar readings, and all other current operating data sent by the robot platform. ARIA provides tools to integrate I/O with your own custom hardware—digital, analog, and serial—and includes comprehensive support for all MobileRobots/ActivMedia robot accessories, including the SICK LMS-200, SICK LMS-100, and Hokuyo URG 04-LX laser-range finders, control of the pan-tilt-zoom camera or pan-tilt unit, Pioneer Gripper and Arm, and more. (Some other devices are supported by separate software libraries, either provided by us or the original device manufacturer.) This module can be easy expanded to new features using ARIA and your robot.

PeopleBotPowerBotpioneer

Requirements:

UAria was compiled with ARIA (MobileRobots Advanced Robotics Interface for Applications) shared libraries provided by ActivMedia Robotics LLC and MobileRobots Inc. Current version of the module was compiled with ARIA 2.9.0-1 included in the package.

You can download latest ARIA here: http://robots.mobilerobots.com/wiki/ARIA
ARIA library bocumentation you can find here http://robots.mobilerobots.com/Aria/docs/main.html

 

Module functions:

Connecting

UAria.addDefaultArgument("default arguments"); - add default arguments for Aria (serial ports, baudrate, etc.),
UAria.robotConnection(true|false); - connect to robot,
UAria.sonarConnection(true|false); - connect sonars,
UAria.laserConnection(true|false); - connect laser,
UAria.laserSetup(start, end, range, flip); - set laser parameters,

Moving

UAria.stop; - stop all movements,
UAria.setTrans(distance); - move the given distance forward/backwards [mm],
UAria.setRot(angle); - sets the heading [deg],
UAria.setRotDelta(angle); - sets the delta heading [deg],

UAria.isMoveDone(); - sees if the robot is done moving the previously given move,
UAria.isHeadingDone(); - sees if the robot is done changing to the previously given setHeading,

UAria.setTransSpeed(speed); - sets the desired translational velocity [mm/s],
UAria.getTransSpeed(); - gets the desired translational velocity [mm/s],
UAria.setRotSpeed(speed); - sets the rotational velocity [deg/s],
UAria.getRotSpeed(); - gets the rotational velocity [deg/s],

Position

UAria.getX(); - gets the global X position,
UAria.getY(); - gets the global Y position,
UAria.getTheta(); - gets the global angular position ("theta"),
[x, y, theta] = UAria.getPosition(); - get robot position,
UAria.setPosition(x, y, theta); - set robot position,

Moving parameters

UAria.getRotVelMax(); - gets the maximum rotational velocity [deg/s],
UAria.getTransVelMax(); - gets the maximum translational velocity [mm/s],
UAria.setRotVelMax(rotVelMax); - set the maximum rotational velocity [deg/s],
UAria.setTransVelMax(transVelMax); - set the maximum translational velocity [mm/s],

UAria.getTransAccel(); - gets the translational acceleration [mm/s^2],
UAria.setTransAccel(transAccel); - set the translational acceleration [mm/s^2],
UAria.getRotAccel(); - gets the rotational acceleration [deg/s^2],
UAria.setRotAccel(rotAccel); - set the rotational acceleration [deg/s^2],

UAria.getTransDecel(); - gets the translational deceleration [mm/s^2],
UAria.setTransDecel(transDecel); - set the translational deceleration [mm/s^2],
UAria.getRotDecel(); - gets the rotational deceleration [deg/s^2],
UAria.setRotDecel(rotDecel); - set the rotational deceleration [deg/s^2],

Sensors

UAria.getSonars(); - gets all sonars measurements
UAria.getBumpers(); - gets all bampers measurements
UAria.getLaser(); - gets all laser measurements
UAria.getLaserPolar(start, end); - get angle and value of the nearest object given polar
UAria.getSonarsPolar(start, end); - get angle and value of the nearest object given polar 

Other

UAria.getBattery(); - gets battery voltage 

 

Urbiscript example

connections

loadModule("UAria");
var Global.Aria=UAria.new();
Aria.addDefaultArgument("-rp COM1 -connectLaser -laserType urg2.0 -laserPortType serial -laserPort COM3"); 
Aria.robotConnection(true);

position

robot.body.addComponent("odometry");
do(robot.body.odometry) {
function x() { call.Aria.getX(); };
function y() { call.Aria.getY(); };
function yaw() { call.Aria.getTheta();};
};
echo(robot.body.odometry.x);
echo(robot.body.odometry.y);
echo(robot.body.odometry.yaw);

speeds

UVar.new(Global,"speedTrans");
&speedTrans.owned=true;
&speedTrans.notifyAccess( closure() {&speedTrans.writeOwned(Aria.getTransSpeed); });
&speedTrans.notifyChangeOwned( closure() {Aria.setTransSpeed(&speedTrans.val);});
UVar.new(Global,"speedRot");
&speedRot.owned=true;
&speedRot.notifyAccess( closure() {&speedRot.writeOwned(Aria.getRotSpeed); });
&speedRot.notifyChangeOwned( closure() {Aria.setRotSpeed(&speedRot.val);});
robot.body.addComponent("x");
Global.getSlot("speedTrans").copy(robot.body.x,"speed");
robot.body.addComponent("yaw");
Global.getSlot("speedRot").copy(robot.body.yaw,"speed");
echo(robot.body.x.speed);
echo(robot.body.yaw.speed);

drive

robot.body.x.speed = 100;
robot.body.yaw.speed = 10;

Download

LINK

 

 

 

EMYS and FLASH are Open Source and distributed according to the GPL v2.0 © Rev. 0.9.1, 15.05.2017

FLASH Documentation