Fix tactile sensor body validation.
PiperOrigin-RevId: 914870657 Change-Id: I57565b4975e0cd7eb1b1ffa199e451a5c5bc0a6e
This commit is contained in:
committed by
Copybara-Service
parent
17fbc0aeef
commit
e1f5534b5f
@@ -2072,8 +2072,7 @@ const char* mj_validateReferences(const mjModel* m) {
|
||||
return "Invalid model: invalid sensor_refid";
|
||||
}
|
||||
if (sensor_type == mjSENS_TACTILE) {
|
||||
int obj_id = m->sensor_objid[i];
|
||||
int parent_body = m->geom_bodyid[obj_id];
|
||||
int parent_body = m->geom_bodyid[m->sensor_refid[i]];
|
||||
int collision_geoms = 0;
|
||||
for (int b = 0; b < m->body_geomnum[parent_body]; ++b) {
|
||||
int geom_id = m->body_geomadr[parent_body]+b;
|
||||
|
||||
Reference in New Issue
Block a user