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

Cleanup SpatialInertia documentation #435

Merged
merged 4 commits into from
Aug 27, 2018

Conversation

traversaro
Copy link
Member

@prashanthr05 Note that to build the documentation locally you need to run the dox target (i.e. make dox) and have doxygen installed (apt install doxygen).

/**
* @brief Get the SpatialInertia as a 6x6 matrix
*
* If \f$ m \in \mathbb{R}^3 \f$ is the mass,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't m \in \mathbb{R} rather than \mathbb{R}^3 ?

* \f$ 1_3 \in \mathbb{R}^{3 \times 3} \f$ is the 3d identity matrix this
* method returns the \f$ M \in \mathbb{R}^{6 \times 6} \f$ matrix such that:
* \f[
* M =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to express the spatial inertia as \mathbb{M} than M ?

double m_mass; /** mass */
double m_mcom[3]; /** first moment of mass (i.e. mass * center of mass */
RotationalInertiaRaw m_rotInertia; /** rotational inertia */
double m_mass; /** Mass. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These aside comments are passed on as documentation to the next variable declaration. For instance, "Mass" is documented in m_mcom[3].

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use ///< My comment

* Defining \f$ M \f$ as this inertia, return the derivative
* with respect to V of the bias wrench V.cross(M*V).
* Defining \f$ M \in \mathbb{R}^{6 \times 6} \f$ as this inertia, return the derivative
* with respect to \f$ \mathrm{v} = \begin{bmatrix} v \\ \omega \end{bmatrix} \in \mathbb{R}^6 \f$
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the documentation of method biasWrench(const Twist& v), there is a missing identity matrix 1_3 in the 6d inertia matrix defintion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 6D link velocity is denoted with capital V in that method, which is different from the small v notation used in this method.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not getting this comment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throughout the documentation $m$ is denoted as the mass of the rigid body. So when denoted in the 6D inertia matrix, shouldnt it wrtten as $m1_{3}$, where $1_{3}$ is a $3 \times 3$ identity matrix.

Correct me if I'm wrong.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are perfectly right.

@@ -121,12 +137,12 @@ namespace iDynTree
* |:--------:|:-------:|:--------:|
* | 0 | \f$ m \f$ | The mass of the rigid body |
* | 2-4 | \f$ m c \f$ | The first moment of mass of the rigid body |
* | 5-9 | \f$ \operatorname{vech}(I_o) \f$ | The 6 indipendent elements of the 3d inertia matrix (\f$ I_{xx} I_{xy} I_{xz} I_{yy} I_{yz} I_{zz} \f$). |
* | 5-9 | \f$ \mathop{vech}(I) \f$ | The 6 indipendent elements of the 3d inertia matrix, i.e. \f$ \begin{bmatrix} I_{xx} \\ I_{xy} \\ I_{xz} \\ I_{yy} \\ I_{yz} \\ I_{zz} \end{bmatrix} \f$ . |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mc elements 1-3; vech(I) elements 4-9 ?

@@ -121,12 +137,12 @@ namespace iDynTree
* |:--------:|:-------:|:--------:|
* | 0 | \f$ m \f$ | The mass of the rigid body |
* | 2-4 | \f$ m c \f$ | The first moment of mass of the rigid body |
* | 5-9 | \f$ \operatorname{vech}(I_o) \f$ | The 6 indipendent elements of the 3d inertia matrix (\f$ I_{xx} I_{xy} I_{xz} I_{yy} I_{yz} I_{zz} \f$). |
* | 5-9 | \f$ \mathop{vech}(I) \f$ | The 6 indipendent elements of the 3d inertia matrix, i.e. \f$ \begin{bmatrix} I_{xx} \\ I_{xy} \\ I_{xz} \\ I_{yy} \\ I_{yz} \\ I_{zz} \end{bmatrix} \f$ . |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

independent*

* \f]
*
* If \f$ \alpha \in \mathbb{R}^10 \f$ is the inertial parameters representation of \f$ I \f$ .
* If \f$ \alpha \in \mathbb{R}^10 \f$ is the inertial parameters representation of \f$ M \f$,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\mathbb{R}^{10}

* \f]
*
* If \f$ \alpha \in \mathbb{R}^10 \f$ is the inertial parameters representation of \f$ I \f$
* If \f$ \alpha \in \mathbb{R}^10 \f$ is the inertial parameters representation of \f$ M \f$,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\mathbb{R}^{10}

@@ -195,17 +213,18 @@ namespace iDynTree
*
* Get the matrix
* \f[
* Y(v,v_r,a_r) \in \mathbb{R}^{6\times6}
* Y(\mathrm{v},\mathrm{v}_r,a_r) \in \mathbb{R}^{6\times6}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Y(\mathrm{v},\mathrm{v}_r,a_r) \in \mathbb{R}^{6\times10} ?

* \f]
*
* If \f$ \alpha \in \mathbb{R}^10 \f$ is the inertial parameters representation of \f$ I \f$
* If \f$ \alpha \in \mathbb{R}^10 \f$ is the inertial parameters representation of \f$ M \f$, as returned by the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\mathbb{R}^{10}

@traversaro traversaro changed the title Cleanup SpatialInertia documentation [WIP] Cleanup SpatialInertia documentation May 8, 2018
@traversaro
Copy link
Member Author

@prashanthr05 I should have addressed all comments, except for #435 (comment) that I am not getting what I should fix.

@traversaro traversaro changed the title [WIP] Cleanup SpatialInertia documentation Cleanup SpatialInertia documentation Aug 22, 2018
@prashanthr05
Copy link
Contributor

@traversaro if you address that one last comment We can merge this PR.

@traversaro
Copy link
Member Author

traversaro commented Aug 27, 2018

@prashanthr05 Done. Let me know if you can/want check this from India, otherwise I can merge as it is.

@prashanthr05
Copy link
Contributor

@traversaro done. You can merge it :)

@traversaro traversaro merged commit 6521f88 into robotology:devel Aug 27, 2018
@traversaro traversaro deleted the fix/inertiaDocs branch August 27, 2018 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants