setting and getting Inertia matrix
Posted: 11 Jan 2022, 10:52
Hello,
I am setting the inertia matrix for my robot links using the sim.setShapeMassAndInertia command (I know that this command has been separated into two subcommands in newer versions). I gave as input my desired inertia tensor at the center of mass of my robot's link, the position of the center of mass which I also gave its relative inertia tensor as I mentioned, and also the transformation matrix. I sat my desired inertia and mass values for each link, and after I got the inertia and mass using the getShapeMassAndInertia function. The mass and the COM (center of mass) position values I got from the sim.getShapeMassAndInertia were OK. But the Inertia matrix that I got was different from what I sat for links.
Set I L21 is the Inertia values I sat for the link L21 and the Ret I L21 is the inertia values I got for the Inertia tensor. Why are these values different from each other?
I am setting the inertia matrix for my robot links using the sim.setShapeMassAndInertia command (I know that this command has been separated into two subcommands in newer versions). I gave as input my desired inertia tensor at the center of mass of my robot's link, the position of the center of mass which I also gave its relative inertia tensor as I mentioned, and also the transformation matrix. I sat my desired inertia and mass values for each link, and after I got the inertia and mass using the getShapeMassAndInertia function. The mass and the COM (center of mass) position values I got from the sim.getShapeMassAndInertia were OK. But the Inertia matrix that I got was different from what I sat for links.
Code: Select all
Set I L21:
[[ 0.00336948 -0.00094914 -0.0004642 ]
[-0.00094914 0.0028031 0.00086039]
[-0.0004642 0.00086039 0.00380723]]
Ret I L21:
[[ 4.09732107e-03 -1.19415701e-04 -3.92175352e-05]
[-1.19415541e-04 4.14834451e-03 5.65062743e-04]
[-3.92173752e-05 5.65062743e-04 5.57780266e-03]]