kin = loadrobot('kinovaJacoJ2S6S300');removeBody(kin,'j2s6s300_link_finger_1');removeBody(kin,'j2s6s300_link_finger_2');removeBody(kin,'j2s6s300_link_finger_3');dhparams = [0 pi/2 0.290 0];bodyTest= rigidBody('bodyTest');jointTest= rigidBodyJoint('jointTest','revolute');setFixedTransform(jointTest,dhparams(1,:),'dh');bodyTest.Joint=jointTest;addVisual(bodyTest,"Mesh",'arm.stl');addBody(kin,bodyTest,'j2s6s300_end_effector');show(kin)
I imported a robot from an existing library, removed some bodies and then I added a new rigidBody (bodyTest) to the rigidBodyTree (kin), all of this worked fine. But I also want to add a visual for this bodyTest in the form of arm.stl. The addVisual function works but there's a units problem, Matlab reads the [mm] values of the stl file as [m] values.
I looked at multiple topics on this problem but none of them offered a real answer for me. I can't use another stl file reader besides addVisual as it is the only function (I think) that specifies the stl file as being the geometrical representation of a rigidBody object.
Thanks in advance.
Best Answer