Add body/simple attribute to control simple body optimization.
PiperOrigin-RevId: 942164766 Change-Id: I1e83bb99b6a1955917eb9b2e9bed0dc7b8e6a161
This commit is contained in:
committed by
Copybara-Service
parent
4ecfe5c1f3
commit
5618666a7d
@@ -335,9 +335,8 @@ std::vector<const char*> MJCF[nMJCF] = {
|
||||
{">"},
|
||||
{"model", "*", "name", "file", "content_type"},
|
||||
{">"},
|
||||
|
||||
{"body", "R", "name", "childclass", "pos", "quat", "mocap",
|
||||
"axisangle", "xyaxes", "zaxis", "euler", "gravcomp", "sleep", "user"},
|
||||
{"body", "R", "name", "childclass", "pos", "quat", "mocap", "axisangle",
|
||||
"xyaxes", "zaxis", "euler", "gravcomp", "sleep", "simple", "user"},
|
||||
{"<"},
|
||||
{"inertial", "?", "pos", "quat", "mass", "diaginertia",
|
||||
"axisangle", "xyaxes", "zaxis", "euler", "fullinertia"},
|
||||
@@ -644,6 +643,13 @@ const mjMap TFAuto_map[3] = {
|
||||
};
|
||||
|
||||
|
||||
// FAuto type
|
||||
const mjMap FAuto_map[2] = {
|
||||
{"false", 0},
|
||||
{"auto", 1}
|
||||
};
|
||||
|
||||
|
||||
// body sleep type
|
||||
const int bodysleep_sz = 4;
|
||||
const mjMap bodysleep_map[bodysleep_sz] = {
|
||||
@@ -3926,6 +3932,9 @@ void mjXReader::Body(XMLElement* section, mjsBody* body, mjsFrame* frame,
|
||||
if (MapValue(elem, "sleep", &n, bodysleep_map, bodysleep_sz)) {
|
||||
child->sleep = (mjtSleepPolicy) n;
|
||||
}
|
||||
if (MapValue(elem, "simple", &n, FAuto_map, 2)) {
|
||||
child->simple = (mjtByte) n;
|
||||
}
|
||||
|
||||
// read userdata
|
||||
std::vector<double> userdata;
|
||||
|
||||
Reference in New Issue
Block a user