borglab / GTDynamics

Full kinodynamics constraints for arbitrary robot configurations with factor graphs.
BSD 2-Clause "Simplified" License
39 stars 10 forks source link

Added tests for chains #351

Open danbarla opened 2 years ago

danbarla commented 2 years ago

This PR adds tests to testChain.cpp. The first test I added compares between classic analysis (wrench constraint for every link) of an A1 leg and kinematic chain analysis. This comes after I had trouble when comparing bigger factor graphs (classic way and chain way) and I had to go simple and follow the math. There is also an overleaf with detailed explanations.

The second test I added sets a basic graph for one leg of the A1 quadruped using DynamicsGraph, and another graph using Chain constraints. the test compares the results and checks them to be identical.

The third test I added compares a Dynamics Graph and a Chain graph for all 4 legs of the A1, for 1 time slice and 4 legs on the ground (robot standing still)

danbarla commented 2 years ago

adapted overleaf and symbols in code.

dellaert commented 2 years ago

@danbarla can you give me write access on the overleaf? Mostly for commenting but when I see a typo I can immediately fix...

danbarla commented 2 years ago

overleaf and code updated with the ground constraint.

varunagrawal commented 2 years ago

@danbarla should we merge this?

danbarla commented 2 years ago

@danbarla should we merge this?

I am actively working on this branch. I will merge it next week.

danbarla commented 1 year ago

Hi @dellaert , I am ready to merge this PR. It was opened and approved a year ago, but a lot has changed since then. Most of the new code and constraints which I used for the paper and thesis was written and pushed to this PR after it was approved the first time. I realize it wasn't the best thing to do :) . The hardcore changes are in the Chain and ChainDynamicsGraph classes.