Collision Only With the Floor: Revisited
Posted: 21 Nov 2019, 18:44
Very similarly to this thread, I am attempting to run multiple robots in the same space, without mutual collision. Essentially, I'm trying to simulate generations of evolutionarily-tweaked robots running a course, 100 robots (1 generation) at a time.
Unfortunately, that thread is now outdated, and it is recommended to use a contact callback function instead. That's fine, but I can't get it to work. I set
I'm fairly certain I'm putting it on the right sub-object (it's the one with the 'Collidable' property), so I'm a bit confused as to what I'm doing wrong. In addition, I'd rather not have to put a script on every collidable part of the robot, if that's something I can avoid.
What's the best solution to this in the current version of V-REP?
Unfortunately, that thread is now outdated, and it is recommended to use a contact callback function instead. That's fine, but I can't get it to work. I set
ignoreContact
to true
and collisionResponse
to false
, but, while the function is definitely being called, the robot stubbornly refuses to phase through the wall.Code: Select all
function sysCall_contactCallback(inData)
sim.addStatusbarMessage("Collision callback triggered.")
local retData={}
retData.ignoreContact=true -- handle contact here
retData.collisionResponse=false
return retData
end
What's the best solution to this in the current version of V-REP?