Another very useful function of Arduino is to decode input signals (such
as the "RPM" signal from the car's transmission) and
pass that on into the LP so that the control program can know the actual
car velocity. A little more cleverness inside the Arduino, and it could
optionally route the incoming signals from the radio receiver directly
to the car's servos for an immediate "out-of-box" experience (radio control
of the car) without changing any wiring, just a control parameter to the
Arduino from the Java code in the LP. When we scale up the APW
program to other cities, it's important that novice users -- and their
mentors -- get a positive experience with very little opportunity for things
to fail. Then they can add their own code and know that if it doesn't
work, it's their code, not ours.
The the car speed increases, you will begin to notice the effects of
how long it takes your software to process the incoming image before you
tell the steering wheels which way to turn. You cannot do sharp turns on
the track at high speed, not only because the car might spin out or roll
over from lateral acceleration forces, but also because your software cannot
respond quickly enough. This is why race tracks have no sharp turns. As
you extend your car control towards higher speeds, you need to adjust the
planning that goes into steering it to accommodate the increased effects
of latency. If your programs sees a sharp turn coming up, you probably
want to decelerate the car going into the turn. Speed analysis is
an important part of making your car more sophisticated.
1. Initial image processing
2. Steering analysis
3. Speed analysis
4. Servo control
5. Image post-processing
These are some tasks that may or may not deserve separate working group support, but you should think about:
6. GitHub repository
7. Wi-Fi remote interface
8. Custom Arduino code
If we have enough participants, there are some interesting tasks that can be worked on in parallel, then integrated after the basic car functions work properly:
9. Adjusting the speed for the processing latency (slower for tight turns, faster for straight)
10. Predictive steering, so the car drives more smoothly
11. Detecting a stop sign and stopping at the right place
12. Inferring implied lines from parked cars or other non-traffic lane objects in the scene
13. Staying an appropriate distance behind another car in the same lane
14. Making turns (from a script?) when there are choices
15. Passing another car in the road (probably need extra hardware, like another camera)
16. Parallel parking (probably need extra hardware, like more cameras)
The LattePanda (LP) is not as refined as your average desk or laptop computer. The instructions that came with this board gave a particular sequence for powering it up or down. Here you see (for reference) a partial diagram of the edge of the LP opposite to the USB connectors:
On the near right corner in this diagram are two tiny buttons facing
outward from the board. The second one in from the corner is labelled in
the diagram as "POWER" and is used in the power-up
and -down sequences. On the opposite corner is a little block of four pins
sticking straight up, shown here as red and gray. This is where the battery
power comes in. It should already be connected in the system you get. Extending
along the edge away from the power connector is a line of six 3-pin servo
connectors, but only the far three (not shown here) are outputs. They are
not keyed, so you must be careful to ensure that the black (or brown) ground
wire of each servo cable is closest to the edge, and the white (or yellow)
signal wire is closest to the metal plate covering the CPU.
There is a blue LED in the corner of that metal plate,
which displays "D13" of the Arduino output, under the control of the LP.
1. Supply main power (plug in or switch on battery, or plug in wall dongle). The blue Arduino LED and the red pilot on the back side will both come on bright, but the Arduino LED will flicker some and then go dim.
2. Wait for the red pilot light to go out on the bottom side of the LP board.
3. Press the LP "POWER" button.
4. Wait for the Win10 welcome screen & log in. Then the LP is ready to use.
0. Turn off the ESC switch first. All the LEDs in the car (below the computer deck) should go out when you do this.
1. Press the LP "POWER" button. I have it programmed (in Win10) to Hibernate, which is faster than Shut Down. The screen will go dark immediately, but the hibernation process (or shut down) takes a minute or two, with the red pilot light on the bottom side of the LP board still on.
2. Wait for the red pilot light to go out on the bottom side of the LP board. The blue Arduino LED (if you left it on) will remain on, because the Arduino continues to run as long as there is power.
3. Remove power from the LP by unplugging the battery, or if there is a switch, turning the switch off. If you have separate batteries for the camera and servos, unplug them too.
4. Traxxas warns that the big motor battery should also be unplugged when you are done for the day. This would also be a good time to recharge the battery.
0. Make sure the car is properly positioned on its track, or else up on blocks with the wheels clear of obstructions.
1. Power up the LP (see above) and make sure your software is up to date.
2. If power to the camera and/or steering servo are separately controlled, turn that on next.
3. If the motor battery was unplugged, plug it in. Turn on the remote transmitter.
4. Turn the ESC switch on and wait for it to sing its little song. It will start to whine until you press and hold the "deadman" switch (remote transmitter trigger). It may continue to whine until the LP+Arduino starts to provide a PWM signal. Verify that the whine resumes if you release the trigger. All the lights below the computer deck should be solid green at this time.
5. Start your drive software. If the car starts to run away, release the "deadman" switch.
6. If left idle for any period of time, the ESC will chirp every couple seconds to remind you to turn it off.
You can find other checklists in the TrakSim documentation.
Any questions or comments? This is your project.
Rev. 2018 May 22