Joint

Introduction PhysiX Joints and realvirtual.io forward kinematics

Joints use the Unity PhysX system. Due to some limitations of physics joints, you should only use this joint if you really need it for backward kinematics and you should not use it for normal forward kinematics.

The default concept for moving axes in realvirtual.io is to move the position of the gameobjects themselves by using “Kinematic Rigidbodies”. This means that the gameobject hierarchy defines the kinematic chain and that these positions are not controlled by the Unitys physics engine. We took this approach, because pure PhysX-controlled movements have some disadvantages. PhysX joints always have some elastic behavior due to the physics solvers, and very accurate positioning of the axes is very difficult to achieve. For example, it is important that the TCP of a robot is exactly at the desired position after all robot axes are set to the angle calculated by the robot controller.

If you need backward kinematics, which means that a kinematic chain should follow a component that is controlled by a drive, you can use PhysX joints. But you should always keep in mind that these positions are calculated by the PhysX engine and that the position can be inaccurate.

It is only possible to combine Drive-controlled axes with PhysX joints if the PhysX axes follow the Drive. Due to Unity PhysX limitations, it is not possible to put a Drive controlled axis in the middle of a PhyxX Joint controlled kinematic chain. The realvirtual.io Drive MUST always be at the end or beginning of the PhysX kinematic chain. The PhysX kinematic chain will only follow the axis that is fully controlled by a realvirtual.io Drive.

Sometimes the standard Unity Joints (e.g. Configurable Joint) are very hard to understand and overloaded with properties. This is why we implemented a simple Joint script. This Joint script will create a standard Unity joint automatically when the simulation starts.

Joint

With the Joint component you can define cylindrical and linear joints with the same kind of axis and direction definition you already know form realvirtual.io drives. Additionally the connected Rigidbodies will be automatically shown as a Mesh Gizmo in yellow (see picture above).

Connected To is the Rigidody which is connected to this component by this joint.

Delta Center you can move the center of the Joint axis by the defined values. If the value is zero the center point of this joint is in the pivot point of the gameobject the Joint script is attached to.

Center On Object 1 / Center On Object 2 It is possible to define external gameobjects which are defining the rotation point of the axis. If to gameobjects are defined the center between the two gameobjects is the center point of this joint.

Show Gizmo if set to true the axis of the joint is shown by a red line and the connected Rigidody is shown by a yellow mesh.

© 2022 in2Sight GmbH https://realvirtual.io - All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including printing, saving, photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.

Last updated