Kinematic Tool
Defining kinematics in complex CAD designs
The KinematicTool
provides a graphical user interface (GUI) for creating, configuring, and managing kinematic axes and their components within realvirtual. It enables users to easily create and manipulate axes, set axis references, manage limits, and handle connections between axes and other components.
The tool saves all configurations in the Axis script, which is automatically added to relevant components. In the background, the KinematicTool adds necessary standard components such as Drives, Kinematic, and Group based on the kinematic definition. Users can define Kinematic Axes (with Drives) that precisely follow the Drives' positions, as well as Physical Axes (with Unity PhysX Joints) that are controlled purely by Unity's physics connections.
For a detailed walkthrough of using the Kinematic Tool, be sure to check out our YouTube tutorial.
Open the Kinematic Tool
To open the Kinematic Tool window, you can:
Select realvirtual > Kinematic Tool in the realvirtual.io menu.
Click the "Axis" button within the realvirtual scene overlay menu.
Use the hotkey "Alt+K".
Create a Kinematic Axis
Open the Kinematic Tool:
The Axis will be created as a child of the currently selected GameObject when you open the Kinematic Tool.
Enter a new Axis Name in the provided field.
Click Create Axis to generate the Axis.
Select Axis Reference
After creating the Axis:
Select a Reference GameObject:
Choose a GameObject that will define the position of the Axis. This GameObject does not need to be part of the Axis itself; it serves to establish the center point of rotation or direction of movement.
Visualize Reference Points:
While in Set Axis Reference mode, you can hover over GameObjects. The geometrical center will be marked with a white cross, while the pivot point of the object will be indicated by green, red, and blue crosses. These centers can be used as reference points.
Choose Reference Type:
Pivot Point: Preferably use the pivot point of the GameObject for accurate Axis positioning.
Bounding Box Center: Use this if the pivot point is not suitable.
Radius Center: Select this if no appropriate object is available. For the Radius Center, you need to choose three vertices on the object to define the center point.
By following these steps, you ensure precise positioning and orientation of your Kinematic Axis.
Select Axis Direction
Select the Axis Direction:
After selecting the reference point, the next step is to set the direction of the Axis. You can choose the direction, which will be displayed as a pink line in the editor. Or you can iterate through some options with "Ctrl + D".
It is possible to efine an offset for the current axis rotation. Browse standard values using "Ctrl + R".
Visualize the Axis Type:
The type of the Axis will be indicated using a gizmo, which helps in visualizing the axis configuration.
Adjust Gizmo Distance:
Modify the line length and distance by using the Gizmo Distance option. This allows for precise adjustments to the visual representation of the Axis in the scene.
Axis Direction: Choose the direction from the drop-down menu or browse options with "Ctrl + D".
Axis Rotation: Define an offset for the current axis rotation. Browse standard values using "Ctrl + R".
When creating a physical axis that adheres to specific movement constraints, you should define upper and lower limits. This ensures that the axis respects these boundaries during operation.
Select parts belonging to the Axis
An Axis is a kinematic component that consists of several GameObjects moving together. To define which GameObjects are part of the Axis, follow these steps:
Select Parts Mode (Selecting with hovering over the parts)
Select Parts Mode:
Activate "Select Parts" mode to start defining which parts will be associated with the Axis.
Highlight and Select Parts:
Hover over the parts in the Scene that should belong to the Axis. The mesh of the parts will be highlighted for easy identification. Click the left mouse button to add the highlighted parts to the Axis.
Deselect Parts:
To remove parts from the selection, hold the "Shift" key while clicking on them.
This mode is particularly useful if the CAD structure is not oriented towards kinematics, requiring you to select each part individually.
Select Parts in the Scene (Selecting in the Hierarchy View).
To exit "Select Parts" mode, click the pink button associated with this mode. You can then select parts directly in the Hierarchy view. This approach is useful if the CAD structure is already somewhat kinematic-oriented, and you wish to select entire hierarchy elements. After selecting elements in the Hierarchy view, click "Add Selected Parts" to include all selected parts and their subparts in the Axis.
Select Parts by Collision Detection
Select Neighbours:
Use the "Select Neighbours" function to select all neighboring parts of the currently defined Axis parts. This function only recognizes immediate neighbors.
Fill:
The "Fill" option selects all parts located between the currently selected components.
Select Connected:
The "Select Connected" function identifies all parts connected to the selected components, including those that are not immediate neighbors.
After using "Select Neighbours," "Fill," or "Select Connected," the detected parts will be highlighted in Unity's Hierarchy view. You can review the selections before finalizing the process. Click "Add Selected Parts" to incorporate these parts into the Axis.
Adding a Drive
To control the Axis with a drive, click "Add Drive." This action means the Axis's position will be fully managed by the Drive. If you choose not to add a Drive, the Axis will be controlled entirely by physical joints.
Changing the View, Isolate and Hide Mode
While selecting parts, you can adjust the view by using the "Isolate" or "Hide" buttons. These options allow you to isolate or hide selected parts for better visibility and management.
Defining the Kinematic Hierarchy
For Drive-Controlled Axis:
To define a kinematic hierarchy for Drive-controlled axes, you can simply arrange one axis below another in the hierarchy.
Alternatively, you can specify the Kinematic parent under "Connected Axis." This will automatically establish the kinematic hierarchy when the simulation begins.
For Physical Axis:
Physical axes are controlled by Unity physics through joints and do not have a drive. Therefore, you should avoid using the GameObject hierarchy to represent the kinematic chain. Instead, use "Connected Axis" to define kinematic connections.
In cases where you need to have two axes on one kinematic object, define the additional axis as a child of the first physical axis and select "Secondary Axis." This setup will automatically create two or more joints on one Rigidbody when the simulation starts.
© 2024 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