Skip to content

Commit

Permalink
Merge pull request #308 from USC-ACTLab/hlcmdEvalShiftBug
Browse files Browse the repository at this point in the history
HighLevelCmd: Add missing shift for traj. eval
  • Loading branch information
ataffanel authored Apr 20, 2018
2 parents 71ebff0 + 585d85c commit e88c926
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/src/pptraj.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ struct traj_eval piecewise_eval(
// if we get here, the trajectory has ended
struct poly4d const *end_piece = &(traj->pieces[traj->n_pieces - 1]);
struct traj_eval ev = poly4d_eval(end_piece, end_piece->duration);
ev.pos = vadd(ev.pos, traj->shift);
ev.vel = vzero();
ev.acc = vzero();
ev.omega = vzero();
Expand Down Expand Up @@ -333,6 +334,7 @@ struct traj_eval piecewise_eval_reversed(
// if we get here, the trajectory has ended
struct poly4d const *end_piece = &(traj->pieces[0]);
struct traj_eval ev = poly4d_eval(end_piece, 0.0f);
ev.pos = vadd(ev.pos, traj->shift);
ev.vel = vzero();
ev.acc = vzero();
ev.omega = vzero();
Expand Down

0 comments on commit e88c926

Please sign in to comment.