Hello,
When running with the code below in isaac sim, the contact value could be read without any problems, but when running with the same code in omniverse isaac gym, the contact value was not read
How can I get the contact value of the cylinder in omniverse isaacgym?
_contact_sensor_interface = _sensor.acquire_contact_sensor_interface()
raw_data = _contact_sensor_interface.get_sensor_reading(“/World/obstacle/obstacle/Cylinder/Contact_Sensor”, use_latest_data = True)
print(raw_data.value)
I find this error log, anybody know this problem?
2024-06-19 16:11:09 [30,001ms] [Error] [omni.isaac.sensor.scripts.commands] Could not create contact sensor prim
update
A problem occurred within the IsaacSensorCreateContactSensor class within commands.py on the path above.
When the mni.kit.commands.execute function runs (if success and self._prim:), the self._prim causes an error.
That’s why I can’t get into the if, even if I force myself to remove the self._prim condition.
The strange thing is that a contact sensor is created in the environment, but the value is not read, and even if you give the option to show the contact sensor, it is not visible in the gym (visible in the isaac sim)
def do(self):
success, self._prim = omni.kit.commands.execute(
“IsaacSensorCreatePrim”,
path=self._path,
parent=self._parent,
schema_type=IsaacSensorSchema.IsaacContactSensor,
translation=self._translation,
visualize=self._visualize,
)
if success and self._prim:
self._prim.CreateThresholdAttr().Set((self._min_threshold, self._max_threshold))
self._prim.CreateColorAttr().Set(self._color)
self._prim.CreateSensorPeriodAttr().Set(self._sensor_period)
self._prim.CreateRadiusAttr().Set(self._radius)
return self._prim
else:
carb.log_error("Could not create contact sensor prim")
return None
(isaac sim)
(omniverse isaac gym)