Teleop is an UObject created to drive the Pioneer 3-DX robot. It uses the Aria/Arnl manufacturer
library.
Prerequisites:
Installation:
- Untar you archive file
- Move in your archive and create a config.mk file where variables UPATH and ARNLPATH are defined.
For example
UPATH=/usr/local/gostai
ARNLPATH=/usr/local/Arnl
- Enter ”make” to compile
Running:
- If you are working with the simulator MobileSim, make sure it is running
- Enter ‘make run’
- You can now join the urbi server with ‘telnet IPYouNeed 54000’
One can enter the commands: (with r for read only and rw for read and write)
- robotType
Type of the robot (r).
- name
Name of the robot (r).
- model
Model of the robot (r).
- serial
Serial number of the robot (r).
- body
The Teleop.body (Section 26.2.2) class.
- go(d)
Cover d meters.
- turn(r)
Turn r radians.
- stop
Stop any movement.
- moveTo(list)
Try to plan a path to position list == [x,y,th] in absolute frame. mapFileName must
have a valid value and motorsLoad must be 1.
- load
Enable the motors (rw)
- wheel[left].speed
Left wheel translation speed (r)
- wheel[right].speed
Right wheel translation speed (r)
- safetyDistanceMin
Moving is not allowed if any obstacle is closer (rw)
- safetyDistanceMax
Speed is not restrained if all obstacles
- x
Odometric x position (r)
- y
Odometric y position (r)
- z
Always 0 (r)
- yaw
Odometric yaw angle (r)
- coveredDistance
Total distance covered (r)
- coveredAngle
Total yaw angle covered (r)
- position
List for [x,y,z,yaw] in absolute frame (rw)
- load
Enable the sonars (rw).
- [front][left][left].val
- [front][left][front].val
- [front][front][left].val
- [front][front][right].val
- [front][right][front].val
- [front][right][right].val
- [right][front].val
- [right][back].val
16 values for sonars (r)
- load
Connect to sick laser (rw)
- val
181 distances given by the laser (r)
- lastCaptureTimestamp
Last time laser read its values (r)
- angleMin
Angle of the last value in the robot frame (r)
- angleMax
Angle of the first value in the robot frame (r)
- resolution
Angle between to laser values (r)
- laserDistanceMin
Minimum distance the laser can return
- laserDistanceMax
Maximum distance the laser can return
- load
Connect the camera mechanical aspect (rw)
- yaw
Yaw value for camera (rw)
- pitch
Pitch value for camera (rw)
- zoom
Zoom value for camera (rw)
- speed
Translation speed (rw)
- speed
Rotation speed (rw) are further (rw)
- mapFileName
Path to a map file. Setting a string value will also try to start a localization task. laserLoad
must be 1. This may fail if :
- the file is unknown;
- the robot cannot localize itself on the map (the initial position of the robot SHOULD
be equal to the Home position inside the map file).
Value ”” deletes the previous map and stops the localization task.
At any time, it might be set to ”” if the localization task fails.
- pathPlanningEvent
Event emitted when path planning ends (r) with first parameter equal to :
-
- 0
if the path planning fails;
-
- 1
if it succeeds;
-
- 2
if it is canceled for any reason (new path, manual motion commands, change of map).
- locFailureEvent
Event emit-ed if localization fails. In this case mapFileName is set to ””
- voltage
Current voltage (r)
When file ‘teleop.u’ is not used, one can still access directly the Teleop UObject.
- load
Connect the whole robot (rw).
- sonarsLoad
Enable the sonar (rw), load must be 1.
- motorsLoad
Enable the motors (rw), load must be 1.
- laserLoad
Connect to sick (rw), load must be 1.
- cameraLoad
Connect the camera (rw), load must be 1. This only concerns the mechanical aspect of
the camera
- speedDelta
Translation speed (rw)
- speedAlpha
Rotation speed (rw)
- speedLeft
Left wheel translation speed (r)
- speedRight
Right wheel translation speed (r)
- position
List for [x,y,z,theta] in absolute frame (rw)
- odometryDelta
Covered distance (r)
- odometryAlpha
Covered angle (r)
- distMin
Moving is not allowed if any obstacle is closer (rw)
- distMax
Speed is not restrained if all obstacles are further (rw)
- batteryVoltage
Current voltage (r)
- sonarsVal
16 distances given by the sonars (r)
- laserVal
181 distances given by the laser (r)
- laserAngleMax
Angle of the first value in the robot frame (r)
- laserAngleMin
Angle of the last value in the robot frame (r)
- laserLastTimestamp
Last time laser read its values (r)
- cameraYaw
Yaw value for camera (rw)
- cameraPitch
Pitch value for camera (rw)
- mapFileName
Name of a map file from directory ‘/usr/local/Arnl/examples/’ or a complete path to a map
file. Setting a string value will also try to start a localization task. laserLoad must be 1. This
may fail if :
- the file is unknown;
- the robot cannot localize itself on the map (the initial position of the robot SHOULD
be equal to the Home position inside the map file).
Value ”” deletes the previous map and stops the localization task.
At any time, it might be set to ”” if the localization task fails.
- pathPlanningEvent
Event emitted when path planning ends (r) with first parameter equal to :
-
- 0
if the path planning fails;
-
- 1
if it succeeds;
-
- 2
if it is canceled for any reason (new path, manual motion commands, change of map).
- locFailureEvent
Event emitted if localization fails. In this case mapFileName is set to ””
- stop
Stop any movement.
- turn(theta)
Turn theta radians
- go(d)
Cover d meters
- status
Values for load, motorsLoad, sonarLoad, laserLoad, cameraLoad, mapFileName
- moveTo(x, y, th)
Try to plan a path to position (x, y, th) in absolute frame. mapFileName must have a valid value
and motorsLoad must be 1.
Three modes are available in order to control the Pioneer P3-D3 mobility:
- Use go and turn to choose a distance and an angle.
- Use speedDelta and speedAlpha to choose translation and rotation speeds.
- Use moveTo to select a goal on a map that must be reached thank to path planning. Note
that distMin and distMax have no impact in this mode.
Every physical quantity is in SI units (m, s, rad, ...).