-
Notifications
You must be signed in to change notification settings - Fork 290
[WIP] add fire control simulation #3242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
I think the CI failure is from using a really old fork. We haven't used that version of sphinx for around 2 years. |
| Fire Control | ||
| ============ | ||
|
|
||
| .. note:: Fire control is a difficult problem, and depends on the shooting mechanism and the gamepiece. This sequence of articles covers one approach to solving fire-control in a "soft" conceptual manner that can apply to many different shooting mechanisms and gamepieces. We do not provide example code; the core concept is so simple that working example code would be 90% distracting details of the assumed game context, and 10% fire-control algorithm. If you understand the concepts presented here, you will be able to apply them to your own robot and gamepiece. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This note uses the term Fire control before it's defined below. It should probably be moved down a little
|
|
||
| 1. Pick a set of distances to the target that we will experimentally shoot from. This is setting the resolution of your table; in reality, your robot will never be exactly at a distance that you recorded in the table, and you will have to interpolate between the recorded distances. The higher the resolution of the table, the more accurate your shooting will be, but the more data you will need to collect and the more time it will take to build the table. Generally, it is a good idea to start with a low resolution and increase it only if you observe that it is not sufficiently accurate. | ||
| 2. "Dial in" the control variables that successfully score the game piece from each of the starting distances. Note that if your shooter is not consistent at this stage, then there is nothing the software can do to compensate for it; the mechanical quality of your shooter is always more important than the subtlety of the control software. | ||
| 3. (Optional) Measure the time-of-flight of the gamepiece to the goal from each of the starting distances, and record it in the table along with the control variables. This is needed later, when we discuss shooting at moving targets or from a moving robot; recording this ahead-of-time reduces the amount of computation required at runtime, and improves the accuracy of the shoot-on-the-move algorithm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not just strictly time of flight, but also the time from the fire command until the object starts flight. Depending on robot design, this could be significant and deserves mentioning (especially since it's harder to measure)
| 2. "Dial in" the control variables that successfully score the game piece from each of the starting distances. Note that if your shooter is not consistent at this stage, then there is nothing the software can do to compensate for it; the mechanical quality of your shooter is always more important than the subtlety of the control software. | ||
| 3. (Optional) Measure the time-of-flight of the gamepiece to the goal from each of the starting distances, and record it in the table along with the control variables. This is needed later, when we discuss shooting at moving targets or from a moving robot; recording this ahead-of-time reduces the amount of computation required at runtime, and improves the accuracy of the shoot-on-the-move algorithm. | ||
|
|
||
| Using the Firing Table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given several of the threads on chiefdelphi, this probably deserves code examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really trying to keep this sequence conceptual; including example code means verifying that code works and the effort there seems surplus to the reward. we can/should link to the InterpolatingTreeMap class, though.

includes way too many features! i am particularly proud of the cotangent geodesic and the convergence envelope ;)