This UObject has been 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’
The following objects are defined to support the Pioneer 3-DX Robot. Please note that when loaded,
‘p3dx.u’ also defines the robot variable to enforce the conformance with the Gostai Standard Robotics
API (Section 22).
Below, we denote read-only slots with ‘r’, and read-write slots with ‘rw’.
- 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 P3dx.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
value for the front/left/left sonar (r)
- [front][left][front].val
value for the front/left/front sonar (r)
- [front][front][left].val
value for the front/front/left sonar (r)
- [front][front][right].val
value for the front/front/right sonar (r)
- [front][right][front].val
value for the front/right/front sonar (r)
- [front][right][right].val
value for the front/right/right sonar (r)
- [right][front].val
value for the right/front sonar (r)
- [right][back].val
value for the right/back sonar (r)
- [back][right][right].val
value for the back/right/right sonar (r)
- [back][right][back].val
value for the back/right/back sonar (r)
- [back][front][right].val
value for the back/front/right sonar (r)
- [back][front][left].val
value for the back/front/left sonar (r)
- [back][left][back].val
value for the back/left/back sonar (r)
- [back][left][left].val
value for the back/left/left sonar (r)
- [left][back].val
value for the left/back sonar (r)
- [left][front].val
value for the right/front sonar (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 (r)
- laserDistanceMax
Maximum distance the laser can return (r)
- 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)
Three modes are available in order to control the Pioneer 3-DX 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, ...).