I would like for an assembly to start and stop on the marked stopper in the picture. I have already gotten this to work with a normal component.
However, when I try to use an assembly, the same function(stopMovement()/startMovement) won’t make it stop, so it just moves past the stopper.
So, I wanted to ask if there is a way to make the assembly stop at the stopper. I’ve already looked through the documentation and haven’t found anything yet.
here is the layout the issue is in the stopper_control python script.
When I select a Product in the Product creator it will stop fine on the stopper Sensor, but when I change to an assembly at the Product creator it will no longer stop.
Also important is that the path/conveyor will not be turned but instead only stop that part.
Hi, please re-save the layout with Include Components enabled from “Save As”. If it’s not enabled, imported geometries are not saved with the layout, and everything is invisible when the layout is opened on another computer.
Ah, I see the issue now.
The component signal to stop the product comes from volume sensor Vol4. As the component signal was using a precise test instead of bounding box intersection, it doesn’t detect the entire assembly but rather a part inside the assembly. We need to start/stop the movement of the upmost component in the hierarchy.
Assembly products in VC belong inside an invisible dynamic component ‘AssemblyBaseComponent’. This can be seen using the Inspector addon. The part that was detected by the volume sensor was two levels under the assembly base component:
We call this function for the component signal’s value: while the detected component’s parent is not the conveyor, we go one level up in the node hierarcy. The Conveyor Sensor component’s raycasting mode has something similar.
(Note: ComponentPathSensor behaviour isn’t affected by this detail, as it detects the leading edge of a bounding box. The assembly base component’s bounding box is sized to fit the bounding boxes of all products inside the assembly. Also I believe there might be some built-in mechanism for detecting the correct component from the node hierarchy, but I am not sure.)
Thank you sooo much!
I also appreciate the recommendation of the inspector addon.
I didn’t know that existed and it will definitely be useful to me in the future.