Fix issue 2111 by providing options to preserve world velocity when set positions

#2814 Merged at 61e742f
  1. Ying Lu

Issue 2111
The change in this PR is based on the discussion at this PR 2598 Thanks to all the discussions and this should be inline with the discussions.
The tests are taken from Peter's commit f6f9387 with slight modifications to cover both cases: preserveWorldVelocity and zeroWorldVelocity
The tests in joint_set_position_test all pass but the other unit and integration tests are still running to see whether any functionality is affected

Comments (10)

  1. Zach Anderson

    This is looking good to me. But it looks like right now the _preserveWorldVelocity is being completely ignored in the derived classes. We don't have to implement the flag in all physics engines, but we should be sure to notify the user if _preserveWorldVelocity is set to a value that is not the current behavior of the physics engine instead of ignoring it and performing the current behavior anyway. Also don't forget to add the flag to simbody/SimbodyJoint and dart/DARTJoint as well.

  2. Jorge Santos Simon

    Hi, what's the status of this PR? I'm very interested on this fix, and so also worried about the apparent lack of progress for the last month.

    What's still missing? Can I contribute (though I know nearly nothing about Gazebo internals... but i'm a good C++ programmer)

    Thanks for the effort!

    1. Michael Grey

      Thanks for the bump on this thread. It fell off the radar for a little while.

      I'll get the CI going for this and try to do a speedy review so we can move this along.