Problem creating multibody from rotated links
I am creating a multibody robot with revolute joints. If all the links are in their original orientation, the links appear to be moved to the appropriate position when the joints are linked. A problem occurs when I rotate the links before linking the joint to set the initial pose of the robot. Upon starting the simulation, the links seem to be out of position so that the axes do not line up. The physics engine then rapidly pulls the joints back into line, but due to the inertia the links are now not at the angles intended.
I have tried both rotating the links before joining and setting the rotation of the joint before linking, but similar problems seem to be happening.
Here's a bit of the code:-
shoulder = new RevoluteJoint.
shoulder set-relative-rotation around-axis (1,0,0) by 1.5.
shoulder link parent robotbody to-child arm
with-normal (1,0,0)
with-parent-point (1,0,0)
with-child-point (-.5,0,1.5).
This also goes wrong:-
shoulder = new RevoluteJoint.
arm set-rotation around-axis (1,0,0) by 1.5.
shoulder link parent robotbody to-child arm
etc.
Anyone got any suggestions?
- Login to post comments

Problem creating multibody from rotated links
I would have expected the first bit of code to work, assuming that the rotation you're using is correct... Have you tried specifying the optional use-current-relative-rotation argument to the link method?
- jon
Problem creating multibody from rotated links
Thanks Jon. Setting that parameter does help, if the link is oriented before joining rather than setting the joint rotation before linking. The code that seems to be working is: -