Hello,
I'm trying to simulate the assembling of two random objects.
I've done some search over the forum and found two possibilities, force sensors and sim.groupShapes().
I already tried the sim.groupShapes function and have got some undesired behaviors: the whole robotic arm was included in the group (even turning off the "collidable" properties of the robot links). I don't know if there is a way to add a force sensor during the program execution.
What are the possibilities of doing it work right?
Simulation of Assembling
Re: Simulation of Assembling
Hello,
sorry for the late reply...
If you need to rigidly attach two dynamically enabled shapes, then indeed, best would be to use a force sensor. Typically, you'd start with (unattached shape2):
and end with (attached shape2):
The attachment happens with sim.setObjectParent(shape2Handle, forceSensorHandle)
If you group 2 or more shapes, then you obtain a brand new shape that includes all the shapes. Typically, you wouldn't do that during simulation, but you could. The function to use is sim.groupShapes(listOfShapes)
Only the shapes contained in listOfShapes will be grouped.
Cheers
sorry for the late reply...
If you need to rigidly attach two dynamically enabled shapes, then indeed, best would be to use a force sensor. Typically, you'd start with (unattached shape2):
Code: Select all
shape1 --> foceSensor
shape2
Code: Select all
shape1 --> foceSensor --> shape2
If you group 2 or more shapes, then you obtain a brand new shape that includes all the shapes. Typically, you wouldn't do that during simulation, but you could. The function to use is sim.groupShapes(listOfShapes)
Only the shapes contained in listOfShapes will be grouped.
Cheers