Hello guys.
I've recently found this software and was wondering about its capabilities.
Can it handle simulation when the number of objects is big but relatively simple and no physics simulation required.
Example being this picture:
https://drive.google.com/file/d/1mkKfnM ... sp=sharing
Can v-rep handle big amount of objects?
Re: Can v-rep handle big amount of objects?
Sure.
Physics engines will try to do some simplification by themselves: see 3.2.1. Islands and Disabled Bodies (specific to ODE) and simulation islands (specific to Bullet).
However, you can reduce the computational complexity of the scene by not simulating the dynamics of ALL the objects. Instead, only enable dynamics on objects whenever it makes sense (e.g. when the gripper is grasping the object...?).
Physics engines will try to do some simplification by themselves: see 3.2.1. Islands and Disabled Bodies (specific to ODE) and simulation islands (specific to Bullet).
However, you can reduce the computational complexity of the scene by not simulating the dynamics of ALL the objects. Instead, only enable dynamics on objects whenever it makes sense (e.g. when the gripper is grasping the object...?).
Re: Can v-rep handle big amount of objects?
this code comes from a scene handling the creation of lots of dynamic respondable objects:
a few optimizations that are done are:
Code: Select all
function sysCall_actuation()
-- omissis...
-- set objects to static `decayTime` seconds after their creation:
while #objectHandle>0 and (objectTime[1]+ decayTime)<sim.getSimulationTime() do
sim.resetDynamicObject(objectHandle[1])
sim.setObjectInt32Parameter(objectHandle[1],sim.shapeintparam_static,1)
table.insert(staticObjectHandle,objectHandle[1])
table.remove(objectHandle,1)
table.remove(objectTime,1)
end
-- group every `groupFactor` static shapes to speed-up collision checking:
while #staticObjectHandle>groupFactor do
sim.groupShapes({unpack(staticObjectHandle,1,groupFactor)})
for i=1,groupFactor do table.remove(staticObjectHandle,1) end
end
end
- make the object static when it has stopped moving / it's not moving
- group the static objects to speed up collision checking
Re: Can v-rep handle big amount of objects?
Maybe in your case you can use robot proximity as a discriminant for when the objects need to be dynamically enabled.
Re: Can v-rep handle big amount of objects?
You can optimize things at various levels. As previously described, you can do this for the physics aspect of things. But you can also simply switch to a different object representation depending on a distance factor (e.g. distance to a camera, a robot, etc.).
So for instance, if the distance is large, then you can hide the mesh and show a simple cube approximating the mesh. In a similar way, you can disable/enable distance calculation or collision detection (or others) for a given object. This can be done, say, every x seconds, (i.e. checking the distance, and enabling/disabling things)
But in the end, you should not expect to have a very fluid simulation if you have more then 1000-2000 objects in your scene, specially if those objects are complex or computational demanding.
Cheers
So for instance, if the distance is large, then you can hide the mesh and show a simple cube approximating the mesh. In a similar way, you can disable/enable distance calculation or collision detection (or others) for a given object. This can be done, say, every x seconds, (i.e. checking the distance, and enabling/disabling things)
But in the end, you should not expect to have a very fluid simulation if you have more then 1000-2000 objects in your scene, specially if those objects are complex or computational demanding.
Cheers