Kinematize actors and add sensor
In this chapter we will kinematize actuators such as the conveyor and the cylinder, and add the sensors to the physics simulation.
Setting up the conveyor
We add the component, select the conveyor belt as our reference object, and define the positive direction of movement in the global coordinate system. When we manually enter a test speed, we can already see the dynamic object being carried along.
We notice that the object passes through the guardrail.
This is because we haven’t yet added it to the physics simulation.
We now declare it as a Static
rigid body — and this can be done even during the simulation.
Since the workpiece is currently positioned inside the guardrail,
a large force is generated due to the resulting penetration, causing the workpiece to be violently ejected.
Kinematizing the cylinder
In the next step, we kinematize the cylinder using the KinematicCylinder component. This component also requires a reference object. In our case, we want to move not just a single object, but the cylinder plate together with the piston rod. To do this, we select the responding parts and group them. We then use this group as the reference object.
Next, we specify that the cylinder should only be controlled via an actuator signal, set a speed, and define the maximum stroke length.
When we extend the cylinder now, we notice that it doesn’t move the workpiece.
That’s because the cylinder itself isn’t yet part of the physics simulation.
Since it’s a moving part, we declare the cylinder plate as a Kinematic
rigid body.
Now the plate properly interacts with the workpiece.
Placing the light barrier
Later on, we want to determine the length of the workpieces by measuring how long the light barrier is interrupted. To do this, we insert the LightBarrier component and position it at the end of the guardrail. The Interrupted output indicates whether a dynamic object has been detected or not.
Note
Please note that I do not require a physical object for a light barrier.
If the light barrier Object3D
does not exist in the model, I can position it freely within the space.
However, if a physical object is present, I define this as the corresponding Object3D
. In this case, the light barrier moves along with the object.
Next
In the next chapter, we don't want the workpieces to be generated only once at the start anymore, but instead, we want them to be generated by a source upon a manual trigger from us.