TI-RSLK Car Following Path With Various Obstacles
by fievels in Circuits > Arduino
14 Views, 0 Favorites, 0 Comments
TI-RSLK Car Following Path With Various Obstacles
The main goal of this project was to program a TI-RSLK car to navigate a gradient-based track with multiple obstacles using a closed-loop control system developed in the Arduino IDE. The car was required to execute sharp turns, perform a 225-degree in-place rotation, bypass dead ends, ignore specific dark blocks acting as obstacles, and smoothly handle softer turns and varied track segments. Upon reaching the end of the course, the vehicle needed to reverse direction and come to a precise, complete stop at the designated final position.
Supplies
Tools used: AutoDesk, TI-RSLK car, TI MSP432P401R Launchpad, Arduino IDE, Batteries
We decided to test the car one piece at a time, starting with Region 1 and moving through each black-line event. This way, we could spot problems early and adjust as needed. We divided the track into four regions, allowing us to address the distinct control challenges of each segment systematically.
Region 1 (Start to First Block): We began by validating sensor fusion and PID behavior on the initial arc, tuning Kp and Kd to eliminate wobbling. We tried a few different starting positions and noticed the car drifted slightly in some cases, so testing multiple positions helped us make sure it stayed stable. The primary goal was to establish a robust baseline before executing the 225 degree stationary turn at the first black line, ensuring that later regions would not inherit initial instability.
Region 2 (First to Second Block): After the first block, we tested reorientation and refined steering for the subsequent turn, which included a track cutout and a nearby fork. We added weight to the left side to see if it would help with traction and tried a few sensor weighting setups to ignore the right-hand fork. After some trial and error, we confirmed the car could navigate the curves reliably and detect the second black line after the fork while staying properly aligned.
Region 3 (Second to Third Block): This semi-circular arc required an aggressive right turn. We focused on large-error correction and significantly increased Kp to provide sufficient steering authority for the curve. Tests ensured the car could maintain the desired path through the arc and reliably reach the third black line.
Region 4 (Third Block to Finish): The final segment included a straight path with a parallel track on the right, a turn, and the intended stop. Testing aimed to validate block-count logic and execute a controlled left-jerk maneuver. We tried several sensor weightings and adjusted the jerk duration, but the car didn’t always stop where we wanted. Running multiple trials helped us understand what worked best, even though full consistency wasn’t achieved. Focusing on one section at a time let us fix problems as they came up, see what worked, and get a clearer sense of how the car performed overall.
The most difficult development problem we encountered occurred in Region 4, where the car struggled to reliably detect the third black line and transition correctly into the final state. The car frequently failed to register the line or detected it inconsistently, which caused missed stops or premature termination of the run.
Testing procedure:
To isolate this issue, we ran the car from the beginning of the track for every trial rather than starting near Region 4. This ensured that the black-line counter, state transitions, and LED indicators evolved exactly as they would during a full run. We instrumented the code so that the LED color changed with each detected black line: red for the first line, green for the second line, and blue for the third line.
During each trial, we observed the LED sequence to determine whether the third black line was being counted and whether the Region 4 code executed. We conducted multiple full-track runs while varying the proportional gain used in the section preceding Region 4 and modifying the black-line detection condition used after Block 2. These changes were evaluated using repeated trials to assess whether the LED reliably progressed from red to green to blue at the correct locations.