Notebook 08 part 2

print

Lab Notebook

the Alishan train track

Date: 17/04 2012
Group members participating: Falk, Jeppe and Jakob
Duration of activity: 7 hours

Goal

As in the first try the goal is still to solve the Alishan train track, but with a different, simpler, approach.

Plan

states2.png

Since the state machine got out of hands the new program should be simpler with less states.
It is based on the line follower from the 4th session. The robot is still using two light sensors but only one of them is used to follow the line. The other one is used to detect the different sections of the track.

There are 8 states now:

  1. From the start zone the left sensor follows the left edge of the line
  2. If the right sensor detects the black line at the first curve the sensors switch roles, now the right sensor follows the right edge of the line and the robot turns right
  3. At the next curve the robot turn left and the sensors switch roles again, so the left one follows the left edge of the line
  4. If the right sensor detects the border of the top zone a turning move is triggered
  5. On the way down out of the top zone the left sensor follows the left edge of the line
  6. At the curve the sensors switch roles, now the right sensor follows the right edge of the line
  7. At the last curve the switch again, the left sensor follows the left edge of the line
  8. If the right sensor detects green the car stops in the goal zone

Results

  • The new approach works better than then old one makes it easier to test the different parts of the programm and find bugs.
  • Additional lights helped to make the sensors more independent from the surrounding light and driving direction (up/down matters, too)
  • On the way down the robot was supposed to use the same states as on the way up, but there are a few adjustments needed. Because of the slope the motor power on the way down has to be reduced.
  • On the way back the turning of the robot around the curves has to be adjusted, too.
  • There are gaps on the tracks that are detected on the way down, because the sensor is close to the track. They are hard to compensate, because they are not detected every time.
  • The status of the battery has an influence on the motors and hence changes the turning in curves and at the top of the course.

Conclusion

The line follower works and after countless tries the robot almost made the track.These two videos show the result:

Run of the robot, where it almost reaches the goal zone.

Here the robot reaches the green zone but needs a little help on the way there.

The source code can be found in the references [3].

References

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License