Skip to content

feat(c3) Additional cost calculation functions used by sampling C3 examples#53

Merged
Meow404 merged 20 commits intomainfrom
bibit/cost-evaluation
Apr 23, 2026
Merged

feat(c3) Additional cost calculation functions used by sampling C3 examples#53
Meow404 merged 20 commits intomainfrom
bibit/cost-evaluation

Conversation

@ebianchi
Copy link
Copy Markdown
Contributor

@ebianchi ebianchi commented Apr 23, 2026

Most of the cost calculation functionality used by sampling C3 examples (not in the C3 repo) was introduced by the merged PR #44. This PR brings a few minor additional features that are useful for the downstream use cases:

  1. Quadratic trajectory costs can be computed for a subset of data vector indices. Bindings and tests are included for these new input argument options for ComputeQuadraticTrajectoryCost.
  2. LCS-based PD control can be simulated with or without feedforward control terms, which can be switched on or off via a boolean argument. Bindings and tests are included for these new input argument options for SimulatePDControlWithLCS.
  3. LCS-based PD control now takes in an LCS simulation configuration object (LCSSimulateConfig type). This should have been included earlier.

Confirmed that all tests (old and new) run successfully after introduction of these changes.


This change is Reviewable

…tions, corresponding tests, general clean up
…ifferent cost matrices than those from C3 object; address minor PR comments
@github-actions
Copy link
Copy Markdown

LCOV of commit d95bdf8 during C3 Coverage #146

Summary coverage rate:
  lines......: 92.3% (2109 of 2284 lines)
  functions..: 81.4% (206 of 253 functions)
  branches...: 49.1% (1725 of 3516 branches)

Files changed coverage rate:
                                                          |Lines       |Functions  |Branches    
  Filename                                                |Rate     Num|Rate    Num|Rate     Num
  ==============================================================================================
  core/traj_eval.cc                                       |14.1%     99|1300%    12|    -      0
  core/traj_eval.h                                        |44.4%     63| 314%    28|    -      0

Copy link
Copy Markdown
Collaborator

@Meow404 Meow404 left a comment

Choose a reason for hiding this comment

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

@Meow404 reviewed 5 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on ebianchi).

@Meow404 Meow404 merged commit 5c08cb2 into main Apr 23, 2026
4 checks passed
@ebianchi ebianchi deleted the bibit/cost-evaluation branch April 27, 2026 16:31
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