Continuous tracking was one of our stretch goals, and we initially planned to pursue both hitting a moving target and continuously tracking the object. However, our initial attempts yielded very confusing results, and due to time constraints we determined that it would be more realistic to fully implement hitting the static and moving targets rather than spreading ourselves too thin.
Our initial approach to the continuous tracking problem was to store the positions of the target in a buffer. At a predetermined rate, we would sample the target position, take the median of the sample to remove the effect of outliers, and store this position in a buffer. Simultaneously, we would be moving the arm to the positions stored in the buffer. We quickly ran into problems with populating the buffer that we were not able to readily solve, and the arm was nowhere near following the target consistently. As a result, we tabled the project for post-demo exploration.
After the demo, we tried implementing a position-based refresh instead of a constant update of the position. We would only push a new position to the arm if the position of the target moved outside a certain tolerance. This worked marginally better, and the arm was able to somewhat follow the path of the target if it was moving very slowly.
Continuous tracking of a very slow moving target
However, as the video shows, the arm is very slow to respond and only moves a small distance at a time. These small motions are the best we can do to stay close to the target, since once the arm has started moving on a path, it cannot be interrupted. Additionally, the time taken to calculate the path and actually move along the path create a large delay that prevents us from tracking anything moving faster than a slow crawl, as can be seen in the video. In order to properly track the target continuously, we would have to create our own path planner that would dynamically change the path based on some input.