Detect objects colliding with the current object.
Sensor to detect objects colliding with the current object, with more settings than the Touch sensor
You can set these properties in your scripts with <component>.properties(<property1>=..., <property2>=...).
Only look for objects with this property, default “” (all objects)
This sensor exports these datafields at each simulation step:
objects colliding with the current object
Interface support:
(attention, no interface support!)
Returns the current data stored in the sensor.
Return value
a dictionary of the current sensor’s data
The following example shows how to use this component in a Builder script:
from morse.builder import *
robot = ATRV()
# creates a new instance of the sensor
collision = Collision()
# place your component at the correct location
collision.translate(<x>, <y>, <z>)
collision.rotate(<rx>, <ry>, <rz>)
robot.append(%(var)s)
# define one or several communication interface, like 'socket'
collision.add_interface(<interface>)
env = Environment('empty')
(This page has been auto-generated from MORSE module morse.sensors.collision.)