Skip to content
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

Merge my project: Real time iLQR control and SysID code into main branch #76

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

Ericcsr
Copy link
Collaborator

@Ericcsr Ericcsr commented Feb 5, 2022

No description provided.

Copy link
Owner

@keenon keenon left a comment

Choose a reason for hiding this comment

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

This broadly looks good. I have a couple of comments about the naming of functions, and comments we need to add to explain things. There's a test or two I'd like to setup to run on CI to check for future regressions, and a few stray files I don't think you meant to commit. I also think it might be good to add some tests for all the getContactFreeXXXJacobian() and getContactReducedXXXJacobian() methods, comparing those to finite differencing, just to ensure we don't ship methods that are false advertising, and to prevent other students from breaking your code in later projects.

unittests/comprehensive/test_iLQR.cpp Outdated Show resolved Hide resolved
unittests/comprehensive/test_iLQRHalfCheetah.cpp Outdated Show resolved Hide resolved
dart/dynamics/Skeleton.hpp Show resolved Hide resolved
dart/neural/BackpropSnapshot.hpp Outdated Show resolved Hide resolved
dart/realtime/RealTimeControlBuffer.hpp Outdated Show resolved Hide resolved
unittests/comprehensive/test_iLQR.cpp Outdated Show resolved Hide resolved
unittests/comprehensive/test_iLQRHalfCheetah.cpp Outdated Show resolved Hide resolved
unittests/comprehensive/test_iLQRHalfCheetah.cpp Outdated Show resolved Hide resolved
Copy link
Owner

@keenon keenon left a comment

Choose a reason for hiding this comment

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

Let's get the CARTPOLE_ILQR test back in the test_iLQRHalfCheetah (unless you moved that test to another file and I missed it), and then I think we're good to merge.

@@ -41,195 +40,6 @@ using namespace realtime;
using namespace trajectory;
using namespace server;

#ifdef iLQR_TEST
Copy link
Owner

Choose a reason for hiding this comment

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

Sorry, I didn't mean to delete this test! I just meant to uncomment it. I think it'd be good to run this test at every commit.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This test is identical to test_iLQR, and the rest of Half cheetah set up should be classified as an example. Therefore, I delete the test case to remove duplication. Sorry for the confusion.

{
final_cost = simulate_traj(ilqr.getStatesFromiLQRBuffer(), ilqr.getActionsFromiLQRBuffer(), true);
}
std::cout << "Final Cost: " << final_cost << std::endl;
Copy link
Owner

Choose a reason for hiding this comment

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

We should put a EXPECT_TRUE(final_cost < some_value); here, where you replace some_value with a number that makes the test barely pass.

@@ -224,5 +185,6 @@ TEST(REALTIME, CARTPOLE_ILQR)
final_cost = simulate_traj(ilqr.getStatesFromiLQRBuffer(), ilqr.getActionsFromiLQRBuffer(), true);
}
std::cout << "Final Cost: " << final_cost << std::endl;
EXPECT_TRUE(final_cost < 5);
Copy link
Owner

Choose a reason for hiding this comment

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

Excellent!

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