Skip to content

Commit

Permalink
Quick but dubious fix for GPS getting position updates
Browse files Browse the repository at this point in the history
(Movement seems to be slightly jerky compared to pre-refactor, but I'm
not spending much time on this since the commentary suggests that others
are already thinking about The Right Way to do it.)
  • Loading branch information
Kerry Moffitt committed Sep 10, 2018
1 parent 5a83b38 commit 762a635
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion AirLib/include/physics/FastPhysicsEngine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,15 @@ class FastPhysicsEngine : public PhysicsEngineBase {
body.setKinematics(next);
body.setWrench(next_wrench);
body.kinematicsUpdated();
}


////// (FIXME this is from PhysicsBody, where it's commented out - it appears that we need it here to ensure that GPS sensing functions properly)
//TODO: this is now being done in PawnSimApi::update. We need to re-think this sequence
body.getEnvironment().setPosition(next.pose.position);
body.getEnvironment().update();
////// (End FIXME)

}

static void updateCollisionResponseInfo(const CollisionInfo& collision_info, const Kinematics::State& next,
bool is_collision_response, CollisionResponse& collision_response)
Expand Down

0 comments on commit 762a635

Please sign in to comment.