RFLEX plug-in

From Rsewiki
Jump to: navigation, search

As the Institute for Automation got a hand on an iRobot ATRV-Jr robot platform, we needed a plug-in to control the robot. The robot has a fully developed control framework built-in, the rFLEX, that provides odometry and sensors through a RS-232 connection.

iRobot has moved focus towards developing consumer (vacuum) and military robots, so no documentation at all is available for the robot. Fortunately, Carnegie Mellon University (CMU) has drivers for the rFLEX in their Carnegie Mellon Robot Navigation Toolkit (CARMEN). This is actually also the base for the rFLEX drivers in Player/Stage framework. About half of the code is ported from CARMEN - Thank you guys!

Contents

The rFLEX system

rFLEX provides a full interface to the robot sensors, and does somewhat of post-processing, such as odometry calculations and ultrasound processing.

The intension of the interface is to create a flexible platform for all iRobot research robots. As we only had the ATRV-Jr robot for testing, the rFLEX plugin is kept as universal as possible, but bumpers and ultrasound sensors are mapped specifically for ATRV-Jr.

Odometry is provided in a translation / rotation axis configuration. The system outputs position, velocity, acceleration and torque in both axes (i.e. forward speed and rotation speed)

XML Configuration

Through the RHD XML configuration, it is possible to define parameters for the plug-in

The default configuration is seen below:

  <rflex enable="true" lib="librflex.so.1" critical="true">
     <serial port="/dev/ttyUSB0" baudrate="115200" />
     <odometry period="100000" />
     <translation accel="100000" torque="30000" />
     <rotation accel="100000" torque="35000" />
     <bumperbrake default="true" />
  </rflex>

Configuration include serial port settings and default values for accelleration and torque in both translation and rotation axes.

The odometry period sets, how often a odometry package is sampled to the serial bus. The value is in µs.

The final parameter is the bumperbrake, that is described below.

Plug-in special features

Normally, it is against RHD principles to assign too much robot functionality into the plug-ins. But as a safety feature, a brake feature is coupled to the bumpers of the robot.

If the bumperbrake is enabled, the robot will enable it's brake, when bumpers is touched. The default setting is assigned in the XML configuration, but a write-variable makes it possible to en/disable the feature at runtime. This makes the response-time as short as possible for emergency stop.

Plug-in variables

Most of the plug-in functionality is described by the plug-ins it creates

rFLEX plugin variable table
Direction     Variable name     Array contents     Description
r transvel [vel] Velocity of translation
r transaccl [accl] Acceleration of translation
r transtorque [torque] Torque of translation
r transpos [pos] Position of translation (distance)
r rotvel [vel] Velocity of rotation
r rotaccl [accl] Acceleration of rotation
r rottorque [torque] Torque of rotation
r rotpos [pos] Position of rotation (bering)
r sonar [s0]..[s16] Measurements of sonars (mapped 0-16, as on ATRV-Jr)
r bumper [front][rear] Status of ARTV-Jr bumpers
r brake [brake] Status of robot brake (updated at 1Hz)
r battvoltage [batt] Raw mesurement of battery voltage (needs calibration and updated at 1Hz)
w cmdtransvel [vel] Desired velocity of translation (command)
w cmdtransaccl [accl] Max acceleration of translation (XML default used if = 0)
w cmdtranstorque [torque] Max torque of translation (XML default used if = 0)
w cmdrotvel [vel] Desired velocity of rotation (command)
w cmdrotaccl [accl] Max acceleration of rotation (XML default used if = 0)
w cmdrottorque [torque] Max torque of rotation (XML default used if = 0)
w usesonar [enable] Enable / disable ultrasound sonars (default off)
w cmdbrake [brake] Enable / disable robot brake (default off)
w bumperbrake [enable] Enable / disable bumperbrake (overrides default)

Using these variables, it is possible to control all functions on the ATRV-Jr robot... Enjoy

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox