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

Why two term relative mass and mass #104

Open
ANaaim opened this issue Oct 31, 2023 · 2 comments
Open

Why two term relative mass and mass #104

ANaaim opened this issue Oct 31, 2023 · 2 comments

Comments

@ANaaim
Copy link
Contributor

ANaaim commented Oct 31, 2023

In the following class we found two term :

class InertiaParametersTemplate:
    def __init__(
        self,
        mass: Callable = None,
        center_of_mass: Callable = None,
        inertia: Callable = None,
    ):
        """
        This is a pre-constructor for the InertiaParametersReal class. It allows to create a
        generic model by marker names

        Parameters
        ----------
        mass
            The callback function that returns the mass of the segment with respect to the full body
        center_of_mass
            The callback function that returns the position of the center of mass
            from the segment coordinate system on the main axis
        inertia
            The callback function that returns the inertia xx, yy and zz parameters of the segment
        """
        self.relative_mass = mass
        self.center_of_mass = center_of_mass
        self.inertia = inertia

==> why having the name of the attribute being relative_mass when the name of the parameter is mass ?

@Ipuch
Copy link
Owner

Ipuch commented Oct 31, 2023

This is something that I have never used 😇 It's for somedays but I'm not even sure what it does anymore 🥲

Looking at what you wrote, it looks like callable, so meaning the attributes should be in function of identified length for further computation of inertia parameters I believe.

@ANaaim
Copy link
Contributor Author

ANaaim commented Oct 31, 2023

Maybe having the same name would be more coherent so :)

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

No branches or pull requests

2 participants