-
Notifications
You must be signed in to change notification settings - Fork 36
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
CoM Trajectory Generation from HMC #140
Draft
arntanguy
wants to merge
43
commits into
jrl-umi3218:master
Choose a base branch
from
arntanguy:topic/hmc
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains 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
- Import implementation of LinearTimeInvariantInvertedPendulum from HMC2 - Adapt to mc_rtc - Remove custom types - clang-format code
Adds a LookupTable implementation for convenient pre-computation, storing and access of heavy functions.
- Import LinearControl systems used for generating short-term com trajectories - Replace openhrp eigen types with Eigen - Cleanup formatting and unused commented-out code
- Import all necessary dependencies - Run HMC's sample generator.cpp as-is
Replace the old confusing and inaccurate implementation with the new generic LookupTable implementation: ``` [info] Omega2 = 12.258312499999999 [info] Original omega = 3.498714049475893 [info] New omega = 3.5033993502025997 [info] Actual omega = 3.5011872986174275 [info] Original cosh = 1.0003195295150686 [info] New cosh = 1.0001534265107093 [info] Actual cosh = 1.0001532328194729 [info] Original sinh = 0.02528163620591862 (previous code) [info] New sinh = 0.01751789259907999 (new lookup table implementation) [info] Actual sinh = 0.017506830645288594 (expected value) ``` Note better accuracy could be achieved using a non-uniform distribution.
Bugfix: out-of-bounds access to array m_steps
…ctory Write a first simple example that: - Generates the CoM/ZMP trajectory (open-loop) - Tracks it with the LIPMStabilizer from Stephane - Adds GUI/live plot visualization
If a log file contains one column or less, mc_log_ui would crash as it expects more entries to be available. This commit displays an error message instead.
Bug: Does not interpolate the reference ZMP trajectory
Implements helpers to handle the logic behind discrete reference provided as a step function: - Ensures that steps are ordered by time (using std::set) - Convenience to create steps, add step, find predecessors/successors - Implement efficient logic for sequentially exploiting footsteps in an online setting: removing old footsteps, updating the previous/next step, etc This leads to a more readable and safer implementation of the original generator class, and allows to cleanly change footsteps at any time. The sample state CoMTrajectoryGeneration has been updated accordingly.
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.
This PR is an ongoing implementation of some of HMC's CoM generation features, mainly the long-term and short-term CoM trajectory generation introduced in
In its current state it is not necessarily meant to be merged, but mostly to show that the current status of this implementation should someone wish to take over (@mmurooka, @mitsuharu-morisawa). It might be worth splitting this work into its own
mc_planning
project, and merging it with @mmurooka's own planning developments of #109.For a minimalist usage code sample, please refer to
mc_sample_CoMGeneration
(code / documentation). It is roughly equivalent to hmc's generator exampleThis can be tested using the new sample controller
CoMTrajectoryGeneration
(code). It uses the samegenerator
class used bymc_sample_CoMGeneration
to generate a CoM trajectory between footsteps, and tracks it usingLIPMStabilizer
. You can run this sample controller withHere is a video of what to expect:
vokoscreen-2021-03-30_16-56-52.mp4
The generated documentation for this branch is available at https://arntanguy.github.io/mc_rtc/doxygen.html:
In addition this PR implements:
A generic LookupTable implementation (code / documentation) to pre-compute computationally expensive functions (in this case
cosh/sinh
that are called for the whole time-horizon at every iterationA basic tool
mc_bin_compare
(81f44d8) to compare data between log files. This is used here to check for regressions (9b1bd15) against a reference log file of what the generator sample mc_sample_CoMGeneration should do.
Utilities to safely iterate over preview windows and convert between time/indices. The intent was to limit the risk of mistakes in handling indices when iterating over preview windows. You can see for instance the PreviewWindowView
Missing:
mc_rtc
, by no longer only relying on the stabilizer's tracking performance, but also adapting the reference trajectory to account for perturbations.