The sensor had a very narrow cone. So we needed a big target the
farther we wanted to measure.
It takes sound approximately 15 ms to travel 2 * 255cm. The NXJ is
capable of updating faster than this, so the speed of sound can
interfere with programs using fast update-rate.
The tracker program is a linear control system as the speed slows the
closer to the preferred distance the robot gets.
We tried 3 settings for the minPower for the tracker program.
Default (60%): It would oscillate back and forth around three 35cm
mark.
At 255cm, it's power is max(60, (255-35) * 0.5) = 110%
At 0cm, it's power is - min(60, |0-35| * 0.5) = - min(60, 16) = 60%,
At 35cm, it's power is max(60, (35-35)*0.5) = 60%
Change 1 (0%): It would stop at around 138cm away from the wall, with
a power of 51%. So 51% is the least amount of power needed to make the
wheels turn. So this could be a good minPower.
Change 2 (51%): It wasn't. Engine power needed to make the wheel turn
is variable. and 51% isn't always enough. when it backing up it would
stop at 35cm though. So we need a higher minPower. But then we're back to 60%.
We implemented a simple program the turned into the wall on high
distance, and turn away from the wall on lower distance. This worked
somewhat well. When the robot was placed at the correct distance it
would keep the correct distance untill the oscillations eventually
became too big and it would turn 180% degrees.
Ingen kommentarer:
Send en kommentar