Add sensors for potential and kinetic energy.
PiperOrigin-RevId: 716775375 Change-Id: Ic8ab7f1a51df970ab551dabe7c797cde13cd97fd
This commit is contained in:
committed by
Copybara-Service
parent
688d367733
commit
240a7afdee
@@ -6206,7 +6206,11 @@ void mjCSensor::ResolveReferences(const mjCModel* m) {
|
||||
((mjCGeom*)obj)->SetNotVisual();
|
||||
}
|
||||
|
||||
} else if (type != mjSENS_CLOCK && type != mjSENS_PLUGIN && type != mjSENS_USER) {
|
||||
} else if (type != mjSENS_E_POTENTIAL &&
|
||||
type != mjSENS_E_KINETIC &&
|
||||
type != mjSENS_CLOCK &&
|
||||
type != mjSENS_PLUGIN &&
|
||||
type != mjSENS_USER) {
|
||||
throw mjCError(this, "invalid type in sensor");
|
||||
}
|
||||
|
||||
@@ -6539,6 +6543,8 @@ void mjCSensor::Compile(void) {
|
||||
}
|
||||
break;
|
||||
|
||||
case mjSENS_E_POTENTIAL:
|
||||
case mjSENS_E_KINETIC:
|
||||
case mjSENS_CLOCK:
|
||||
dim = 1;
|
||||
needstage = mjSTAGE_POS;
|
||||
|
||||
Reference in New Issue
Block a user