-
Notifications
You must be signed in to change notification settings - Fork 2
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
output velocity and angular velocity in a ModelTask's link export #31
Conversation
00e12a4
to
7f0e4e5
Compare
math::Pose source2target( math::Pose(source2world - target2world) ); | ||
math::Vector3 sourceInTarget_angular_vel(target2world.rot.RotateVectorReverse(sourceInWorld_angular_vel)); | ||
math::Vector3 sourceInTarget_linear_vel (target2world.rot.RotateVectorReverse(sourceInWorld_linear_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.
It should not consider the velocities of the targetInWorld as well?
(I know that the target frame is usually a fixed point, but is this always the case?)
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.
I know that the target frame is usually a fixed point, but is this always the case?
I elected to generate the velocity of the source frame within the target frame considered-as a fixed frame at time t. Part for simplicity reasons, part because it's a possible convention, part because then one can use it with sourceFrame==targetFrame to get both velocities expressed in the body frame.
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.
Alright.
I just have doubt about the use of sourceFrame==targetFrame.
It means that we interpret the velocities as absolute (velocities of the sourceFrame related to a inertial frame, not the targetFrame) and represent them in targetFrame (for linear case) and sourceFrame (angular case).
The relative velocities of the sourceFrame related to the targetFrame should be zero if they are the same.
math::Pose source2target( math::Pose(source2world - target2world) ); | ||
math::Vector3 sourceInTarget_angular_vel(target2world.rot.RotateVectorReverse(sourceInWorld_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 of the angular velocity in RBS is rock-core/base-types#99:
So, If i got this right regarding the velocities:
The angular velocity is expressed in sourceFrame ( the angular velocity of the moving frame expressed on it own frame).
And the linear velocity is expressed in targetFrame (the linear velocity of the moving frame expressed on the fixed frame). Is that right?
It means that the it->second.source_link_ptr->GetRelativeAngularVel()
would do the job.
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.
Yeah. I'll update to stick to that until we resolve rock-core/base-types#100
Updated. Could you check @joaobrittoneto ? |
Looks fine to me |
No description provided.