Skip to content
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

Merged
merged 2 commits into from
Jan 10, 2017

Conversation

doudou
Copy link
Contributor

@doudou doudou commented Dec 31, 2016

No description provided.

@doudou doudou force-pushed the velocities_in_link_export branch from 00e12a4 to 7f0e4e5 Compare January 6, 2017 13:17
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));
Copy link
Contributor

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?)

Copy link
Contributor Author

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.

Copy link
Contributor

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));
Copy link
Contributor

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.

Copy link
Contributor Author

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

@doudou
Copy link
Contributor Author

doudou commented Jan 6, 2017

Updated. Could you check @joaobrittoneto ?

@joaobrittoneto
Copy link
Contributor

Looks fine to me

@doudou doudou merged commit 47709f2 into master Jan 10, 2017
@doudou doudou deleted the velocities_in_link_export branch January 10, 2017 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants