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

Minor additions to gym_ignition.rbd package #283

Conversation

diegoferigo
Copy link
Collaborator

@diegoferigo diegoferigo commented Dec 23, 2020

  • New utils module with useful extract_skew, extract_symm, vee and wedge methods
  • Expose KinDynComputations.get_generalized_gravity_forces
  • Expose KinDynComputations.get_average_velocity_jacobian

import numpy as np


def hat(vector3: np.ndarray) -> np.ndarray:
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a big problem, but the symbol that in latex is typically used for representing this operator is the wedge, not the hat.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, makes sense to match latex terminology here 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I start having second thoughts on this, using hat instead of wedge would give the code a more colloquial sense since standing to the notation document the operator is pronounced hat while in latex is typesetted as wedge.

Copy link
Contributor

@traversaro traversaro Dec 28, 2020

Choose a reason for hiding this comment

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

the operator is pronounced hat while in latex is typesetted as wedge.

I guess there is no absolute reference, but for me $\hat{a}$ is pronounced as hat I.e. the hat is on top of the symbol, while $a^\wedge$ is pronounced as wedge (i.e. where the symbol is on the top right, like an exponential).

skew_symmetric[1, 0]])


def skew(matrix: np.ndarray) -> np.ndarray:
Copy link
Contributor

Choose a reason for hiding this comment

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

I am afraid that this may be confusing to user, as they could expect that this function takes a 3\times 1 vector and return the 3x3 skew symmetric matrices, what now is done by the hat operator.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you have any better name for the decomposition of a matrix in its skew symmetric and symmetric parts?

Copy link
Contributor

Choose a reason for hiding this comment

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

extract_skew and extract_symmetric or skew_part and symmetric_part seems to be more clear to me, especially if no docs are provided.

Copy link
Contributor

@traversaro traversaro left a comment

Choose a reason for hiding this comment

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

Minor comments.

@diegoferigo diegoferigo force-pushed the feature/small_additions_rbd_module branch from bbedf68 to aadee25 Compare January 5, 2021 13:52
@diegoferigo
Copy link
Collaborator Author

@traversaro addressed naming suggestions and added documentation

@diegoferigo diegoferigo force-pushed the feature/small_additions_rbd_module branch from aadee25 to cc04bd4 Compare January 5, 2021 13:57
@diegoferigo diegoferigo force-pushed the feature/small_additions_rbd_module branch from cc04bd4 to 0929564 Compare January 5, 2021 14:08
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.

2 participants