I am attempting to add a contact sensor to a robot via the python API. When I load in the default Ant scene from the contact sensor example or create a robot from scratch out of meshes, my code executes just fine. As soon as I try to add a contact sensor to the Franka or UR10 as set up in the ‘Isaac Examples’ tab, isaac sim completely crashes. I tried applying it to different links and meshes, but nothing seems to work. Here is the command that is causing the crash:
def create_sensor(self, parent_path, position, radius, name):
result, sensor = omni.kit.commands.execute(
"IsaacSensorCreateContactSensor",
path="/tact_sensor_" + name,
parent=parent_path,
min_threshold=0,
max_threshold=1000000,
color=(1, 0, 0, 1),
radius=radius,
sensor_period=1,
translation=position,
visualize=True,
)
Was the Ant example setup in such a way that allows for contact besides just adding the sensor? If so, how can I do this for another robot made in the past?