wb-toolbox icon indicating copy to clipboard operation
wb-toolbox copied to clipboard

Add relative Jacobian block

Open HosameldinMohamed opened this issue 3 years ago • 2 comments

Summary

A block similar to the Jacobian block, Screenshot from 2021-08-12 17-33-27

but provided with 2 frame names as inputs, it gives the relative Jacobian between the 2 frames.

It can implement the iDyntree method

bool KinDynComputations::getRelativeJacobian(const iDynTree::FrameIndex refFrameIndex,
                                             const iDynTree::FrameIndex frameIndex,
                                             iDynTree::MatrixDynSize & outJacobian)

In https://github.com/robotology/idyntree/blob/f9051752ca5a6ca8f3a4f101e4a536fe1eb62c5f/src/high-level/src/KinDynComputations.cpp#L1661-L1663

Motivation

It seems like a clean way to have the relative jacobian since the iDyntree function is already available, we just had to wrap it.

Additional context

We drafted a quick block (with @Giulero's help), it looks like this

Screenshot from 2021-08-12 17-40-09

It was a quick draft to test it with the robot, but I think we can omit the input ${ }^{world} H_{base}$.

HosameldinMohamed avatar Aug 12 '21 15:08 HosameldinMohamed

Whenever you are ready feel free to open a PR.

traversaro avatar Aug 12 '21 15:08 traversaro

It was a quick draft to test it with the robot, but I think we can omit the input ${ }^{world} H_{base}$.

Just to clarify, this happens only because in iDynTree (with default velocity representation settings) the relative jacobian between two links L and C is the $J_{L,C}^{rel} $ matrix such that:

$$ {}^{C[L]} \mathrm{v}_{L,C} = J_{L,C}^{rel} \dot{s} $$

where $s \in \mathbb{R}^{n_{dofs}}$ is the vector of internal joint positions (by the way, this is unfortunatly not fully documented). If the relative jacobian assume some other representation of the relative velocity between two frames, for example one using the absolute/world frame, then a dependency on ${}^W H_B$ could appear.

traversaro avatar Aug 21 '21 16:08 traversaro