simxGetCollisionHandle allways returns zero

Report crashes, strange behaviour, or apparent bugs
Post Reply
pablo38414
Posts: 1
Joined: 28 Oct 2015, 15:21

simxGetCollisionHandle allways returns zero

Post by pablo38414 »

Hi Everbody,
following problem. I have a "quite" stable remote API betwen my v-Rep and Matlab. I have to detect any collisions, occouring in v-rep. If I have a collision in v-rep, the affected Module gets a different color. Another funktions like simxGetObjectPosition work also perfektly.
In order to detect a collision I need the funktions simxGetCollisionHandle and simxReadCollision, unfortunately returns the CollisionHandle-Number allways a Zero. Are there any further settings I have to do to transfer the Handle-Nummer von v-rep to matlab?

Many thanks in advance

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: simxGetCollisionHandle allways returns zero

Post by coppelia »

Hello,

can you show us the code where you retrieve the handle of the collision object? Also, have you prepared that collision object in V-REP? Does it exist? Also, always remember that (most of the time), the first value returned by the remote API is a function execution status value, and 0 indicates: simx_return_ok. Are you sure you are not using that as your handle?

Cheers

Post Reply