fix the orientation of some joints

Post links to your CoppeliaSim videos, scenes and models
Post Reply
smallliwan
Posts: 6
Joined: 24 Oct 2016, 10:09

fix the orientation of some joints

Post by smallliwan »

hello
I want to control a 2DOF manipulator in x-z plane,which means that the two revolute joints only rotate around y axis. But there some problems to do that:
1 when the second joint is set to be a child of the first arm link ,I can't fix its initial orientation to 90,0,0(if it is not a child,the initial orientation can be fixed to 90,0,0) ,that means the orientation will have litte values for dBeta, dGamma , and the dAlpha is always 90.
2 Also,when I set torque to control the two joints in torque/force mode, the second joint have velocities at dAlpha, dBeta, dGamma, and the manipulator didn't move whin x-z plane

the arm links are not crooked, I don‘t know how to set the manipulator.

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: fix the orientation of some joints

Post by coppelia »

Hello,

can you post the scene?
Point 1) that you meantion is normal: when an object has a parent, then its absolute position/orientation is always calculated, and is the result of the multiplication between its local transformation matrix and its parent absolute transformation matrix. The rounding errors give you the small non-zero values.

Cheers

smallliwan
Posts: 6
Joined: 24 Oct 2016, 10:09

Re: fix the orientation of some joints

Post by smallliwan »

Thanks for your reply
After some check,I found that the unreasonable orientation at Beta and Gamma are caused by the link1, which is the child of Rob_joint1 and the parent of Rob-joint 2(I have removed Rob-joint 2 from the scene).this is the scene:https://drive.google.com/open?id=0B2MkK ... 1paa2p2cU0
At the beginning, the orientation of link1, relative to parent frame(Rob_joint1), is 90 0 0, once I started the simulation, this orientation changed to 9.0000e+01 8.6329e-06 -2.1340e-05, or other similar values, which caused another unreasonable orientations and angular velocities at latter links and joints. I think the relative orientation of link1 to joint1 should be fixed.
whether this problem is caused by rounding eeror and normal?

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: fix the orientation of some joints

Post by coppelia »

The problem is linked to the physics engine directly: a joint is also just a constraint that needs to be minimized. So a joint can come apart when the constraints cannot be satisfied (e.g. over-constrained mechanism, or mechanism that moves too fast, that exerts too large forces, etc. This is somewhat specific to each physics engine.

We have following transformation matrices:

baseM * jointM * jointIntrinsicM * linkM

jointIntrinsicM only depends on the joint angle, and is a simple rotation around one axis (the Z-axis):

jointIntrinsicM = rotZ

But during simulation, when the joint is handled by the physics engine, then we have:

jointIntrinsicM = rotZ * errorM

ErrorM comes from the physics engine. What the orientation dialog displays is actually: errorM * linkM

Cheers

smallliwan
Posts: 6
Joined: 24 Oct 2016, 10:09

Re: fix the orientation of some joints

Post by smallliwan »

So you mean that errorM is related to the physics engine and is always here during simulation, but can I eliminate these unreasonable no-zero values at some orientation and make errorM to be 1, through changing the force to joint or inertia/mass of link,or other methods.

thanks all the time

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: fix the orientation of some joints

Post by coppelia »

Yes, but errorM only exists for a dynamic construction. If you simulate something kinematically, you won't have that disturbance.

You can try to adjust various parameters in order to reduce the errorM, such as masses, inertias, forces/torques, etc. Make sure you also carefully read this section.

Cheers

smallliwan
Posts: 6
Joined: 24 Oct 2016, 10:09

Re: fix the orientation of some joints

Post by smallliwan »

OK,thanks a lot,I will try

Post Reply