Return an object's moment of inertia
Return an object's moment of inertia
Looking at http://www.coppeliarobotics.com/helpFil ... terIDs.htm, it's easy to get the mass for an object, but there doesn't seem to be support for getting the moment of inertia as well. It'd be nice to have it for getting the total moment of inertia of a rigid object composed of multiple elements (understanding of course that moments of inertia can't be simply summed without taking into account the relative location of each element relative to the CG).
Re: Return an object's moment of inertia
Hello,
for a shape, you can retrieve the mass and moment of inertia with simGetShapeMassAndInertia.
Added note on 20/08/2020: From CoppeliaSim version > 4.1.0 rev1, sim.setShapeMassAndInertia and sim.getShapeMassAndInertia are deprecated. Use instead
Cheers
for a shape, you can retrieve the mass and moment of inertia with simGetShapeMassAndInertia.
Added note on 20/08/2020: From CoppeliaSim version > 4.1.0 rev1, sim.setShapeMassAndInertia and sim.getShapeMassAndInertia are deprecated. Use instead
sim.setShapeMass
, sim.getShapeMass
, sim.setShapeInertia
and sim.getShapeInertia
.Cheers
Re: Return an object's moment of inertia
Hah, another case where V-REP has thought of everything. I looked at parameter IDs because that's where I was already getting the object's mass, and didn't think at all to look in the API.
There seems to be some duplication between methods that access the model via parameter IDs and API methods that access model directly. Is one an older way that is moving toward depreciation?
There seems to be some duplication between methods that access the model via parameter IDs and API methods that access model directly. Is one an older way that is moving toward depreciation?
Re: Return an object's moment of inertia
Actually both ways will be kept.
The alternative way is a quick way to add functionality without modifying the interface. It is also a convenient way to access some functions not directly exported by the remote API or the ROS interface for instance.
Cheers
The alternative way is a quick way to add functionality without modifying the interface. It is also a convenient way to access some functions not directly exported by the remote API or the ROS interface for instance.
Cheers