Skip to content
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

Upgrade to struct formats for telemetry #706

Closed
jwbonner opened this issue Sep 4, 2024 · 0 comments · Fixed by #778
Closed

Upgrade to struct formats for telemetry #706

jwbonner opened this issue Sep 4, 2024 · 0 comments · Fixed by #778
Labels
enhancement New feature or request GUI Changes to the PathPlanner GUI PathPlannerLib Changes to PathPlannerLib
Milestone

Comments

@jwbonner
Copy link

jwbonner commented Sep 4, 2024

Currently, PathPlanner publishes poses and the active trajectory to NetworkTables using double arrays. A key advantage of the WPILib struct format is that it communicates data type (pose/translation/etc) and units (radians/degrees). The 2025 version of AdvantageScope will take advantage of this metadata to make it easier to mix and match fields for visualization, such as allowing 2D and 3D poses to be used interchangeably without user input.

WPILib is planning to switch to struct publishing for Field2d, so we've agreed to deprecate the double array formats in AdvantageScope this year (it will display a warning when they are used, and you need to manually select the data type and units). While PP telemetry is primarily intended for use in the PathPlanner app, updating to struct would ensure maximum compatibility moving forward.

Switching the library code to publish as struct would be very simple since PP is already using the standard NT4 publisher API. Also, the PathPlanner client wouldn't need to handle full struct decoding since it only deals with a limited number of data types; double values just need to be read from a raw buffer at the correct offsets. In regard to dashboard compatibility, see Gold872/elastic-dashboard#91.

@jwbonner jwbonner added the enhancement New feature or request label Sep 4, 2024
@mjansen4857 mjansen4857 added GUI Changes to the PathPlanner GUI PathPlannerLib Changes to PathPlannerLib labels Sep 6, 2024
@mjansen4857 mjansen4857 added this to the 2025 milestone Sep 6, 2024
@mjansen4857 mjansen4857 linked a pull request Oct 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request GUI Changes to the PathPlanner GUI PathPlannerLib Changes to PathPlannerLib
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants