Skip to content

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.

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.

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.

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