RoboJackets / robocup-software

Georgia Tech RoboJackets Software for the RoboCup Small Size League
Apache License 2.0
182 stars 187 forks source link

Estimate kicks using the framework provided in the vision filter #1246

Open JNeiger opened 5 years ago

JNeiger commented 5 years ago

The classes and description of the estimation are already provided. I'll add some more info in a little bit about how exactly it goes down.

JNeiger commented 5 years ago

Description

As we move towards event based and matric based transitions on plays, a nonzero amount rely on the detection of a kick and predicting the actual motion of the chip/kick. This feature needs direct access to the camera config as well as the raw camera measurements so it's build into the vision filter for right now.

Requirements

Design

Link to design document

Implementation Background

When a kick is detected, a kick event object is created. This contains all the useful info to estimate the kick trajectory itself, like the fully history of raw camera detections of the ball.

Due to the dribbler, on flat kicks there are two phases to the motion. The first is the backspin phase where the ball is sliding over the field. After a short amount of time, the slipping stops and the ball begins to roll. These two phases have drastically different friction coefficients. Tigers and ZJU have estimated that this happens at a consistent % velocity of the initial kick. ZJU estimates it to be 5/7 of the initial velocity and I think Tigers has it at 2/3 of the initial velocity. See 4.1 here.

The vision filter itself is highly influenced by Tiger's autoref code. Here is the relavant code for kick estimation.

Implementation Hints

The esitmators should take a kick event and optimize a model to fit. The closer the fit, the more likely this is the correct model. Every frame, the optimization should pull in the newest data and "correct" the fit to be more accurate. The most accurate fit should be exposed to the rest of soccer.

You most likely will have to get the camera configuration and use raw camera params from vision to fully estimate the chips themselves.