Skip to content

Commit 0eb2f9f

Browse files
quaglacopybara-github
authored andcommitted
Use meshid in touch sensor for mesh geoms.
PiperOrigin-RevId: 784575734 Change-Id: Ibca753273c67128c6c1421dad8413814dce31182
1 parent c282094 commit 0eb2f9f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugin/sensor/touch_stress.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ void TouchStress::Compute(const mjModel* m, mjData* d, int instance) {
296296
if (m->geom_type[geom] == mjGEOM_SDF) {
297297
sdf_instance[0] = m->geom_plugin[geom];
298298
sdf_ptr[0] = mjc_getSDF(m, geom);
299+
} else if (m->geom_type[geom] == mjGEOM_MESH) {
300+
sdf_instance[0] = m->geom_dataid[geom];
301+
geomtype[0] = (mjtGeom)m->geom_type[geom];
299302
} else {
300303
sdf_instance[0] = geom;
301304
geomtype[0] = (mjtGeom)m->geom_type[geom];

0 commit comments

Comments
 (0)