This UObject has been created to drive the Pioneer 3-DX robot. It uses the Aria/Arnl
manufacturer library.
- 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 # path for your urbi-sdk directory
ARNLPATH=/usr/local/Arnl # path for your arnl directory
- Run make to compile
- If you are working with the simulator MobileSim, make sure it is running.
- Run ‘make run’.
- Connect to the Urbi server, for instance 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 25).
Below, we denote read-only slots with ‘r’, and read-write slots with ‘rw’.
30.2.1 P3dx
- body
The P3dx.body class.
- go(d)
Cover d meters.
- model
Model of the robot (r).
- 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.
- name
Name of the robot (r).
- robotType
Type of the robot (r).
- serial
Serial number of the robot (r).
- stop
Stop any movement.
- turn(r)
Turn r radians.
30.2.2 P3dx.body
- load
Enable the motors (rw)
- safetyDistanceMax
Speed is not restrained if all obstacles
- safetyDistanceMin
Moving is not allowed if any obstacle is closer (rw)
- sonar
The object P3dx.body.sonar.
- wheel[left].speed
Left wheel translation speed (r)
- wheel[right].speed
Right wheel translation speed (r)
30.2.3 P3dx.body.odometry
- coveredAngle
Total yaw angle covered (r)
- coveredDistance
Total distance covered (r)
- position
List for [x, y, z, yaw] in absolute frame (rw)
- x
Odometric x position (r)
- y
Odometric y position (r)
- yaw
Odometric yaw angle (r)
- z
Always 0 (r)
30.2.4 P3dx.body.sonar
- 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)
30.2.5 P3dx.body.laser
- angleMax
Angle of the first value in the robot frame (r)
- angleMin
Angle of the last value in the robot frame (r)
- laserDistanceMax
Maximum distance the laser can return (r)
- laserDistanceMin
Minimum distance the laser can return (r)
- lastCaptureTimestamp
Last time laser read its values (r)
- load
Connect to sick laser (rw)
- resolution
Angle between to laser values (r)
- val
181 distances given by the laser (r)
30.2.6 P3dx.body.camera
- load
Connect the camera mechanical aspect (rw)
- pitch
Pitch value for camera (rw)
- yaw
Yaw value for camera (rw)
- zoom
Zoom value for camera (rw)
30.2.7 P3dx.body.x
- speed
Translation speed (rw)
30.2.8 P3dx.body.yaw
- speed
Rotation speed (rw) are further (rw)
30.2.9 P3dx.planner
- locFailureEvent
Event emit-ed if localization fails. In this case mapFileName is set to “”.
- 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).
30.2.10 P3dx.body.battery
- 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, ...).