The purpose of this competition was to implement a singular Lane Following behaviour on the TurtleBot. The objectives included creating a program that would detect lines and move in between them while avoiding going over either line. The goal for the robot was to be able to successfully traverse the track twice, in the shortest time possible with going over a line counting as an additional 5 seconds to your total time.
Robotics is the intelligent connection of perception to action (Brady, 1985)
One way of implementing robotic behaviour systems is splitting the behaviour into specific states, such as a sense, plan, act (SPA) type architecture. The robot can then switch between each state as new information is taken in and adapt in real-time according to the planned behaviour.
The sensing state takes in all sensor data, vision, range, touch, depth, etc., and publishes the desired topics to be used in the planning algorithms. The planning state takes in the published sensor data and decides what to do with the information. This is where all of the decisions on how to react to the environment are made and different behaviours are implemented. This stage is essentially the "brain" of the robot and is where competitive strategy and feedback control is to be taken into consideration. Once a decision is made, the control signal is published and the robot moves into the acting state where the desired behaviour is implemented. The actuators receive the control signal published in the planning state and control the physical movements of the robot.
The TurtleBot is a differential drive robot that moves in two dimensions, which means that both the linear and angular velocities can be commanded. Proportional Derivative (PD) feedback control corrects the current linear and angular velocities according to the current error, which is the difference between the desired and actual set-point. PD control accounts for both correction proportional to the error and for the rate of change in error. Velocity ramps ensure that robot motion is smooth, during both acceleration and deceleration. This is important to prevent jerky behaviour when the PD feedback control system adjusts the robots current trajectory. An additional integral component can be added to the control system, which helps removes steady state error that accumulates in a pure PD controller.
Question: We are expecting our experiment to answer how well a proper usage of image data combined with a properly tuned PID controller can successfully stay within a track and traverse it as fast as possible.
Hypothesis: With enough tuning of our PID controller, and proper implementation of our code to be able to reliably and successfully detect the lines we should be able to have our robot navigate between the two lines successfully and within a timely manner.
We decided to implement the pursuing behaviour as a state machine that implements a simplified SPA architecture. Our algorithm continuously takes in Image data and using HSV data from the data computes a mask showing just the lines and then implements a PD control that maintains it's position between the two lanes. Two states are implemented, 'Start', the robot is initialized when the user presses 'x' on the logitech controller, 'Follower,' where the actual line tracking and movement behaviour happens.
The competition consisted of three rounds per team (attempting to complete two laps per round). Overall our robot placed fourth in the competition. Our robot was able to successfully track and follow the lines properly, but failed to achieve one of the faster times. In the first run our robot ran into a issue where the code did not have a condition to keep it moving in this situation, so it failed at it's attempt (we quickly added the code necessary to fix this after this attempt). The second round was successful, the robot was able to properly go around the track twice only going over the white line in a tight corner. The third round the robot was not tracking anything for the first 10 seconds (due to a known auto camera calibration issue) but was able to recover and complete the two laps.
It is difficult to program a robot that can successfully track two separate lanes accurately while being computationally efficient. This results in certain assumptions having to be made about the image data being received which in turn affects how well your robot can accurately follow the track. While we were able to create a program that could follow and traverse the track, with more tuning of the PID controller, and more accurate assumptions we would have been able to follow the track faster, while keeping the accuracy the same or better.
The purpose of this competition was to implement a track following behaviour on the TurtleBot, incorporating motion control, and competitive strategy. From the results we conclude that it is more challenging to tune a certain program and controller for optimal performance than build a properly working detection and movement system. Our hypothesis stated that with a well tuned enough PID controller and working detection we would be able to follow the track in a timely manner. While we were able to tune the PID controller enough to go through the track at a slower pace it would start making some errors under faster speeds even though it would be able to recover since we didn't tune it enough to handle higher speed conditions.