... | ... | @@ -16,7 +16,14 @@ |
|
|
As an example of a behavior-based control program the leJOS NXJ distribution contains a BumperCar program. It consists of two behaviors DriveForward and DetectWall both implementing the interface Behavior and a main program BumperCar that uses an instance of the class Arbitrator to control the activation of the two behaviors.
|
|
|
|
|
|
First, make BumperCar run the base sumo wrestler driving base mounted with a bumper and an ultrasonic sensor.
|
|
|
Plan
|
|
|
|
|
|
### Plan
|
|
|
To execute and test the provided BumperCar.java program on the sumo wrestler driving base we used an express bot [2], built for sumo wrestling, as seen in Fig. ??
|
|
|
|
|
|
We then equipped the robot with a front bumper with two touch sensors, and a forward facing ultrasonic sensor. |
|
|
\ No newline at end of file |
|
|
We then equipped the robot with a front bumper with two touch sensors, and a forward facing ultrasonic sensor.
|
|
|
|
|
|
![bumpercar](http://gitlab.au.dk/uploads/group-22/lego/cfcea2fed9/bumpercar.png)
|
|
|
##### Fig. 1: The base robot equipped with an ultrasonic sensor and two touch sensors.
|
|
|
|
|
|
### Result
|
|
|
When deployed on the sumo wrestler driving base, the robot drives across the platform and over the edge. This is due to the ultrasonic sensor which is not able to detect when the robot comes close to the edge, but instead looks for walls. Due to this fact it makes little sense to deploy the robot on the sumo track. (Insert Video). To overcome the problem with driving over the edge, the sensor could be mounted with an angle towards the floor in order to measure the distance to the ground. If the robot goes near the edge of the platform, the sensor will detect an increase in its readings meaning that the robot has encountered the edge. Additionally a light sensor be implemented to detect the white border along the edge of the track. |