example(sampling-c3) : Use C3's new cost computation helpers#404
Merged
Conversation
…urrently utilized)
…cost types match closely; includes test printouts; to be cleaned for final use
…uts to be removed
|
You can update the latest commit since PR 53 has been merged into the main branch of c3 repo. |
Author
|
Already done (my commit and your comment were within a couple minutes of each other). |
xuanhien070594
approved these changes
Apr 23, 2026
xuanhien070594
left a comment
There was a problem hiding this comment.
@xuanhien070594 reviewed 4 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on ebianchi).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on:
This PR changes the sample cost evaluation implementation to rely on the C3 repo's trajectory evaluation functionality. Due to encountering several cost-related bugs in the existing code, this PR also contains bug fixes.
This migration does the following:
x_Nis defined for cost calculation (this has potential to change which sample is selected; I have not noticed a significant impact).x_Ncomes from simulating the LCS for cost from the last plannedx_{N-1}, u_{N-1}.x_Ncomes fromA x_{N-1} + B u_{N-1} + D lambda_{N-1} + dusing the LCS for plan.kSimImpedanceObjectCostOnlyeven though they did not contribute to the full cost). These tests can be run by checking out this commit and running a sampling C3 demo (e.g. Push Anything).This change is