Hi,
I'm trying to do collision detection in V-rep. I'm creating a new collision object but when I start the simulation with the remote API the collision object is removed. This behavior does not occur when starting the simulation from the V-rep GUI. Any Idea on what could be the problem?

The objects are still visible in the scene hierarchy. But I figured out the problem. I'm doing reinforcement learning and each iteration I reload my robot model. I guess there's no way of having a collision object checking a model that's being reloaded several times during the simulation?

define a collection that contains all objects built on top of, say, a dummy. Then, each time you load the model, attach the model to the dummy (sim.setObjectParent). Then the model will automatically be part of the collection.

Now, you can define a collision object between that collection, and the environment.