Page 1 of 1

link orientations in multibody are getting affected by another multibody loaded from stl.

Posted: Wed Dec 07, 2022 4:48 pm
by sai_yg
I was trying to procedurally creates some utensils and place them inside the sink model I had to load from an stl file.
if I load the sink model first, the link orientations in the bowl multibody are all messed up.
but if I create the procedural multibodies first, and then load the sink mesh from stl. the orientations are as expected.

Code: Select all

mbid = p.createMultiBody(
        # 0,
        # -1,
        # -1,
        # (0,0,0),
        # (0,0,0,1),
        linkMasses=[0]*lns,
        linkCollisionShapeIndices=col_shapes,
        linkVisualShapeIndices=col_shapes,
        linkPositions=col_shape_poses,
        linkOrientations=col_shape_orns,
        linkInertialFramePositions=[(0,0,0)]*lns,#col_shape_poses,
        linkInertialFrameOrientations=[(0,0,0,1)]*lns,#col_shape_orns,
        linkParentIndices=[0]*lns,
        linkJointTypes=[p.JOINT_FIXED]*lns,
        linkJointAxis=[(0,0,0)]*lns,
        physicsClientId=pbClientId)
I also tried by uncommenting the first few arguments.
I'm developing code in jupyter notebook.
the orientations in both cases are also same. I checked the diff in an online tool.
please let me know if you need any additional data.

Re: link orientations in multibody are getting affected by another multibody loaded from stl.

Posted: Wed Dec 07, 2022 5:19 pm
by sai_yg
Update :
1. when loading the sink mesh from stl file, I was not creating a visual shape and using that while creating multibody.
2. made changes and used the same mesh as visual shape, and the issue is resolved now.
when visualShapes are not created for models loaded from file path, there seem to be a problem with orientations for created primitive shapes following that.