Skip to content

large updates to interfaces, added analysis suite, improved tests#4

Open
nickwitten wants to merge 5 commits intomainfrom
dev/nick/large-updates
Open

large updates to interfaces, added analysis suite, improved tests#4
nickwitten wants to merge 5 commits intomainfrom
dev/nick/large-updates

Conversation

@nickwitten
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR significantly expands the controls library’s public interfaces (Rust + C FFI), introduces a Kalman-filter-backed RobotModel, and adds an analysis toolchain (Rust CLIs + Python visualization/telemetry tooling) alongside updated C++ tests to exercise the new API surface.

Changes:

  • Reworks the C API to use an opaque RobotModel_t* with setters/getters, transform accessors, and KF predict/update entry points.
  • Refactors bang-bang trajectory generation APIs (pose/twist targets, params struct) and adds extensive C++ test coverage.
  • Adds a new analysis suite (Rust binaries + Python ctypes bindings + visualization + ROS bag → NPZ tooling) for offline simulation and parameter tuning.

Reviewed changes

Copilot reviewed 26 out of 32 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
cpp_tests/test_robot_model.cpp Replaces legacy transform/model tests with lifecycle/KF/transform/currents tests for the new opaque RobotModel_t* API.
cpp_tests/test_bangbang.cpp Updates tests to the new TrajectoryParams_t and ateam_controls_traj_* APIs; adds theta wrap/bounds coverage.
ateam-controls/src/trajectory_params.rs Splits trajectory params into linear/angular errors/limits with new constants.
ateam-controls/src/robot_physical_params.rs Removes old physical parameter constants module.
ateam-controls/src/robot_model.rs Introduces KF state/params/physical params structs and new transforms + KF predict/update methods.
ateam-controls/src/physical_params.rs Adds physical constants (mass/inertia/wheel geometry/motor constants).
ateam-controls/src/lib.rs Adds wrap_angle, new matrix/vector aliases, and exposes new modules.
ateam-controls/src/kalman_params.rs Adds default KF noise constants.
ateam-controls/src/ctypes.rs Expands FFI types (Vector6C/Vector8C) and keeps matrix column-major conversions.
ateam-controls/src/bangbang_trajectory.rs Refactors trajectory params into a struct + adds pose/twist trajectory constructors and new eval helpers.
ateam-controls/Cargo.toml Adds optional serde feature for parameter deserialization.
ateam-controls-c/src/lib.rs Replaces old by-value model structs with opaque-pointer RobotModel API + new trajectory FFI functions.
ateam-controls-c/include/ateam_controls/ateam_controls.h Updates C header types and function signatures for the new opaque model + trajectory APIs.
ateam-controls-c/Cargo.toml Builds both staticlib and cdylib for ctypes-based tooling.
analysis/src/bin/trajectory_sim.rs Updates sim to new model/trajectory APIs and adds KF loop in simulation.
analysis/src/bin/compute_trajectory.rs New CLI to compute and emit trajectory CSV, with optional JSON param loading.
analysis/src/bin/compute_state_measurement.rs New CLI for mapping sensor readings into state-space measurements using the model transforms.
analysis/scripts/wheel_visualize.py New wheel current/velocity plotting helper.
analysis/scripts/trajectory_visualize.py New trajectory plotting script using the Python FFI interface.
analysis/scripts/trajectory_sim_visualize.py Updates sim visualizer column names to match new CSV output fields.
analysis/scripts/trajectory_overlay.py Adds interactive trajectory overlay for KF plots.
analysis/scripts/telem_visualize.py New interactive telemetry visualizer.
analysis/scripts/telem_bag2np.py New ROS2 bag-to-NPZ conversion script for ExtendedTelemetry.
analysis/scripts/rust_interface.py New Python ctypes binding layer for trajectory + state measurement helpers.
analysis/scripts/record_and_visualize.sh Script to record bag, convert to NPZ, and launch visualizers.
analysis/scripts/param_tuning_loop.py New iterative parameter upload/record/convert/visualize tuning workflow.
analysis/scripts/kalman_visualize.py New KF visualization, including measurement reconstruction and overlay hook.
analysis/Cargo.toml Adds dependencies and binaries for the analysis crate.
Cargo.lock Updates lockfile for new dependencies (clap/serde/serde_json/etc.).
COLCON_IGNORE Present (no diff shown) to control colcon behavior.
.vscode/launch.json Adds debug configurations for Rust/Python analysis tools.
.gitignore Ignores python artifacts and local analysis data/.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 32 out of 38 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 32 out of 38 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@nickwitten nickwitten force-pushed the dev/nick/large-updates branch from 148d8d5 to 687dd54 Compare March 4, 2026 02:48
@nickwitten nickwitten marked this pull request as ready for review March 4, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants