Skip to content

Possible issue in TransformTask::targetVel: Full transform applied instead of rotation only #492

@Saeed-Mansouri

Description

@Saeed-Mansouri

Hi, and thanks for your great work on mc_rtc!

While reviewing the implementation of the following function:

void TransformTask::targetVel(const sva::MotionVecd & worldVec)
{
auto X_0_f = frame_->position();
auto velB = X_0_f * worldVec;
refVelB(velB);
}

I noticed something that may be incorrect or at least questionable depending on the intended use.

If worldVec is defined as the velocity (twist) of a point on a body, expressed in the world frame, then applying the full transformation X_0_f (which includes translation) may not be appropriate.

In this case, it seems more consistent to apply only the rotational part of the transform (i.e., X_0_f.rotation()) when converting the velocity from world to body frame. Using the full transform introduces an additional velocity component from the translation, which might not be intended.

Please let me know if I misunderstood the intended semantics.

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions