I am setting up some volume detectors around my robot, and the problem I have is that it sometimes detects collisions that are not real. I attached a layout so you can see what I mean. The robot in the layout contains a Python Script behavior that creates the volume detector and uses a while loop to continuously check for collisions between the A3 node of the robot and the volume detector. When the program is run, a collision is detected, but there’s no actual contact between the robot and the volume detector. I placed a red cube at the coordinates of the volume detector, so it can be easily visualized.
There’s probably no fix for this, but does anyone know any workaround? Like ignoring the first N collisions in the simulation or something
example.vcmx (3.3 MB)
At present, I feel that the problem may be in the collision volume of the robot. When I move the robot away and use the physical square to test, everything is normal. This shows that the collision detector is normal, so it also shows that the actual There was indeed a collision between the robot and it. Under the naked eye, we observed that there was no collision. Then, in my opinion, the most suspicious thing is the collision volume of the robot, which is likely to be the collision volume of the third axis of the robot. is a rectangle that exceeds the geometry by a certain distance, which leads to possible collision problems. At present, this is just a guess after I tested your demo, I hope you can find the real reason.
By the way, you can try to use the volume sensor packaged in the modeling, or you can also use code to set Collision Detection. I think these two will be more convenient or more accurate than you using code to set the sensor.
I have a wild guess, maybe this is related to Kuka robot. I use VC articulated robot, it works well. Maybe you can try other robot.