-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add link offset to simulation #83
Conversation
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: Ian Chen <[email protected]> Co-authored-by: Ian Chen <[email protected]> Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-physics2 #83 +/- ##
================================================
- Coverage 82.82% 82.54% -0.28%
================================================
Files 106 106
Lines 3663 3679 +16
================================================
+ Hits 3034 3037 +3
- Misses 629 642 +13
Continue to review full report at Codecov.
|
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
@iche033 Fortunately, I was able to figure out a fix for the problem. I think this is ready for a first pass of review 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, the links offset look correct now. There are just some minor code check errors.
EXPECT_EQ(ignition::math::Vector3d(0.5, 0, 0.1), | ||
ignition::math::eigen3::convert(frameData.linearVelocity)); | ||
EXPECT_EQ(ignition::math::Vector3d(0.1, 0.2, 0), | ||
ignition::math::eigen3::convert(frameData.angularVelocity)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to do something to fix the linear and angular vel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that linear and angular velocity are tied to model
instead of link
, and this test case started checking the velocity of link
after I corrected the implementation of framedata
, which is why I removed it. Before it worked because when calling link->FrameDataRelativeToWorld()
, it was getting the velocity of the link's parent model.
If we do want to add velocity for links, then that would be a different feature which allows links to move by itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I see, that makes sense. Just checking, if we assume the link does not move within a model, should it inherit the parent model's velocities in world frame?
In any case, I'm not sure if there's a use case for querying a link's world velocities. We can address this when the need comes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the link doesn't move within model, its WorldPose
is then updated as model's WorldPose
gets updated (since its offset will remain the same), so we probably don't have to keep track of link velocities in world frame.
However, if we want the link to move within model, then we'll have to compute the link velocities with the offset. And yes, I agree that we can add this if the need comes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apart from the minor code check errors, the latest changes look good to me
Signed-off-by: claireyywang <[email protected]>
Closes #57
Link offset is added to the simulation after some update in tpeplugin. The following shows distinct offsetted pose of wheels and caster.
Screenshot of demo with
velocity_control.sdf