Skip to content

Commit

Permalink
updated boattest
Browse files Browse the repository at this point in the history
  • Loading branch information
marinkobi committed Jul 29, 2015
1 parent c29e2ff commit 7b723ca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
13 changes: 8 additions & 5 deletions bin/boat.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,20 @@ ulb = -100, -100
uub = 100, 100

#
x0=-3.4, 2, -1, 0,0,0
#x0=0.6, 0.1, -.1, 0,0,0
xf=0, 0, 0, 0,0,0
#x0=-1.76095, -.917983, -2.2352, 1.62703,-1.67655,0.752046
#xf=0, 0.1, -5, 0,0,0

x0=-0.468, -0.332, -3.268, -0.59, 2.427, 3.99
xf=0, 0.1, -5, 0,0,0


# g v
Qf = 1, 5, 5, .01, .05, .05
Qf = 1, 5, 5, .1, .5, .5
Q = 0, 0, 0, 0, 0, 0

#ko = .5

# u
R = .001, .005,
R = .01, .05,

mu=.01
9 changes: 5 additions & 4 deletions bin/boattest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ void solver_process(Viewer* viewer)
Body2dForce<2> force;
force.D(2)= 5;
params.GetVector3d("D", force.D);
force.B << 1, -1, 1, 1, 0, 0;

Body2d<2> sys(&force);
sys.d << 1.16, 0.72;

params.GetVector3d("I", sys.I);


Body2dState x0;
VectorXd qv0(6);
se2.q2g(x0.first, Vector3d(0, 2, 2));
Expand Down Expand Up @@ -86,8 +87,8 @@ void solver_process(Viewer* viewer)
Vector2d u(0,0);
vector<Vector2d> us(N, u);
for (int i = 0; i < N/2; ++i) {
us[i] = Vector2d(0,1);
us[N/2+i] = Vector2d(0,-1);
// us[i] = Vector2d(0,1);
// us[N/2+i] = Vector2d(0,-1);
}

Body2dDdp ddp(sys, cost, ts, xs, us);
Expand All @@ -106,7 +107,7 @@ void solver_process(Viewer* viewer)

getchar();

for (int i = 0; i < 50; ++i) {
for (int i = 0; i < iters; ++i) {

timer_start(timer);
ddp.Iterate();
Expand Down

0 comments on commit 7b723ca

Please sign in to comment.