... | ... | @@ -22,9 +22,11 @@ To execute and test the provided BumperCar.java program on the sumo wrestler dri |
|
|
|
|
|
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. 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.
|
|
|
|
... | ... | @@ -36,6 +38,7 @@ Press the touch sensor and keep it pressed. What happens ? Explain. |
|
|
|
|
|
After activating the touch sensor the robot starts reversing. It stays in reverse until the touch sensor is no longer activated. If the touch sensor is repeatedly pressed, the robot cancels the current action() method and starts over on the same method. This behavior can be seen in the video in fig 2:
|
|
|
|
|
|
|
|
|
[![image alt text](http://img.youtube.com/vi/ZHFlJe0Ao6c/0.jpg)](http://www.youtube.com/watch?v=ZHFlJe0Ao6c)
|
|
|
|
|
|
##### Fig. 2: The robot drives along a table. Once the touch sensors are activated the robot goes in reverse.
|
... | ... | |