-
Notifications
You must be signed in to change notification settings - Fork 15
Pragnay/remove hardcoded offsets #264
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -100,6 +100,10 @@ | |||||||||||||||||||||||||||||||
| #define GOAL_GENERATE_NEW 1 | ||||||||||||||||||||||||||||||||
| #define GOAL_STOP 2 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| // Offsets | ||||||||||||||||||||||||||||||||
| #define COLLISION_RANGE 5 | ||||||||||||||||||||||||||||||||
| #define Z_RANGE 15 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| // Jerk action space (for JERK dynamics model) | ||||||||||||||||||||||||||||||||
| static const float JERK_LONG[4] = {-15.0f, -4.0f, 0.0f, 4.0f}; | ||||||||||||||||||||||||||||||||
| static const float JERK_LAT[3] = {-4.0f, 0.0f, 4.0f}; | ||||||||||||||||||||||||||||||||
|
|
@@ -116,281 +120,23 @@ static const float offsets[4][2] = { | |||||||||||||||||||||||||||||||
| {-1, -1} // bottom-left | ||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
| /** | |
| * Generates a square grid of 2D integer offsets centered at (0,0). | |
| * | |
| * The resulting grid has dimensions offset_range x offset_range. For example, | |
| * an offset_range of 5 will generate offsets in the inclusive range [-2, 2] | |
| * for both x and y, producing 25 (dx, dy) pairs. | |
| * | |
| * Parameters: | |
| * offsets Pre-allocated array of size offset_range^2 by 2 that will | |
| * be filled with the generated (dx, dy) offset pairs. | |
| * offset_range Side length of the square grid. Typically a positive odd | |
| * integer so that the grid is symmetrically centered on (0,0). | |
| */ |
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.
The new defines COLLISION_RANGE and Z_RANGE lack documentation explaining what they represent. Consider adding comments explaining that these define the grid dimensions for collision detection and z-coordinate updates, respectively. For example: "Grid dimension for collision detection (creates a 5x5 grid)" and "Grid dimension for z-coordinate updates (creates a 15x15 grid)".