Remove unused mjOption.apirate.
PiperOrigin-RevId: 815633571 Change-Id: Ib98f3eb2df47f96fa1fe6e987a3a0cd23a9479f6
This commit is contained in:
committed by
Copybara-Service
parent
a849fedcd2
commit
431f96572e
@@ -308,13 +308,6 @@ adjust it properly through the XML.
|
|||||||
optimization-related applications, real-time is no longer good enough and instead it is desirable to run the
|
optimization-related applications, real-time is no longer good enough and instead it is desirable to run the
|
||||||
simulation as fast as possible. In that case the time step should be made as large as possible.
|
simulation as fast as possible. In that case the time step should be made as large as possible.
|
||||||
|
|
||||||
.. _option-apirate:
|
|
||||||
|
|
||||||
:at:`apirate`: :at-val:`real, "100"`
|
|
||||||
This parameter determines the rate (in Hz) at which an external API allows the update function to be executed. This
|
|
||||||
mechanism is used to simulate devices with limited communication bandwidth. It only affects the socket API and not
|
|
||||||
the physics simulation.
|
|
||||||
|
|
||||||
.. _option-impratio:
|
.. _option-impratio:
|
||||||
|
|
||||||
:at:`impratio`: :at-val:`real, "1"`
|
:at:`impratio`: :at-val:`real, "1"`
|
||||||
|
|||||||
+7
-7
@@ -10,19 +10,19 @@
|
|||||||
| :ref:`option | \* | :class: mjcf-attributes |
|
| :ref:`option | \* | :class: mjcf-attributes |
|
||||||
| <option>` | | |
|
| <option>` | | |
|
||||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||||
| | | | :ref:`timestep<option-timestep>` | :ref:`apirate<option-apirate>` | :ref:`impratio<option-impratio>` | :ref:`tolerance<option-tolerance>` | |
|
| | | | :ref:`timestep<option-timestep>` | :ref:`impratio<option-impratio>` | :ref:`tolerance<option-tolerance>` | :ref:`ls_tolerance<option-ls_tolerance>` | |
|
||||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||||
| | | | :ref:`ls_tolerance<option-ls_tolerance>` | :ref:`noslip_tolerance<option-noslip_tolerance>` | :ref:`ccd_tolerance<option-ccd_tolerance>` | :ref:`gravity<option-gravity>` | |
|
| | | | :ref:`noslip_tolerance<option-noslip_tolerance>` | :ref:`ccd_tolerance<option-ccd_tolerance>` | :ref:`gravity<option-gravity>` | :ref:`wind<option-wind>` | |
|
||||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||||
| | | | :ref:`wind<option-wind>` | :ref:`magnetic<option-magnetic>` | :ref:`density<option-density>` | :ref:`viscosity<option-viscosity>` | |
|
| | | | :ref:`magnetic<option-magnetic>` | :ref:`density<option-density>` | :ref:`viscosity<option-viscosity>` | :ref:`o_margin<option-o_margin>` | |
|
||||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||||
| | | | :ref:`o_margin<option-o_margin>` | :ref:`o_solref<option-o_solref>` | :ref:`o_solimp<option-o_solimp>` | :ref:`o_friction<option-o_friction>` | |
|
| | | | :ref:`o_solref<option-o_solref>` | :ref:`o_solimp<option-o_solimp>` | :ref:`o_friction<option-o_friction>` | :ref:`integrator<option-integrator>` | |
|
||||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||||
| | | | :ref:`integrator<option-integrator>` | :ref:`cone<option-cone>` | :ref:`jacobian<option-jacobian>` | :ref:`solver<option-solver>` | |
|
| | | | :ref:`cone<option-cone>` | :ref:`jacobian<option-jacobian>` | :ref:`solver<option-solver>` | :ref:`iterations<option-iterations>` | |
|
||||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||||
| | | | :ref:`iterations<option-iterations>` | :ref:`ls_iterations<option-ls_iterations>` | :ref:`noslip_iterations<option-noslip_iterations>` | :ref:`ccd_iterations<option-ccd_iterations>` | |
|
| | | | :ref:`ls_iterations<option-ls_iterations>` | :ref:`noslip_iterations<option-noslip_iterations>` | :ref:`ccd_iterations<option-ccd_iterations>` | :ref:`sdf_iterations<option-sdf_iterations>` | |
|
||||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||||
| | | | :ref:`sdf_iterations<option-sdf_iterations>` | :ref:`sdf_initpoints<option-sdf_initpoints>` | :ref:`actuatorgroupdisable<option-actuatorgroupdisable>` | | |
|
| | | | :ref:`sdf_initpoints<option-sdf_initpoints>` | :ref:`actuatorgroupdisable<option-actuatorgroupdisable>` | | | |
|
||||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
| |_| option |br| |_| |L| | | .. table:: |
|
| |_| option |br| |_| |L| | | .. table:: |
|
||||||
|
|||||||
+5
-3
@@ -23,17 +23,19 @@ General
|
|||||||
limit, are recolored by using the :ref:`constraint impedance<soParameters>` :math:`d` to mix the existing color with
|
limit, are recolored by using the :ref:`constraint impedance<soParameters>` :math:`d` to mix the existing color with
|
||||||
:ref:`visual/rgba/constraint<visual-rgba-constraint>`. For spatial tendons, this visualization aid is active only if
|
:ref:`visual/rgba/constraint<visual-rgba-constraint>`. For spatial tendons, this visualization aid is active only if
|
||||||
no :ref:`material<tendon-spatial-material>` is set and :ref:`rgba<tendon-spatial-rgba>` is default.
|
no :ref:`material<tendon-spatial-material>` is set and :ref:`rgba<tendon-spatial-rgba>` is default.
|
||||||
|
|
||||||
- Added :ref:`mju_getXMLDependencies` for computing a list of unique asset dependencies from an MJCF file.
|
- Added :ref:`mju_getXMLDependencies` for computing a list of unique asset dependencies from an MJCF file.
|
||||||
|
|
||||||
- Added the code sample ``dependencies`` which provides command line utility for printing the result of :ref:`mju_getXMLDependencies`.
|
- Added the code sample ``dependencies`` which provides command line utility for printing the result of :ref:`mju_getXMLDependencies`.
|
||||||
|
|
||||||
|
.. admonition:: Breaking ABI changes
|
||||||
|
:class: attention
|
||||||
|
|
||||||
|
- The attribute ``mjOption.apirate`` was unused and has been removed.
|
||||||
|
|
||||||
MJX
|
MJX
|
||||||
^^^
|
^^^
|
||||||
|
|
||||||
- Fix :github:issue:`2508`, ``qLD`` shapes mismatched mjModel during ``get_data_into``.
|
- Fix :github:issue:`2508`, ``qLD`` shapes mismatched mjModel during ``get_data_into``.
|
||||||
|
|
||||||
|
|
||||||
Version 3.3.6 (September 15, 2025)
|
Version 3.3.6 (September 15, 2025)
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -800,7 +800,6 @@ typedef struct mjVFS_ mjVFS;
|
|||||||
struct mjOption_ { // physics options
|
struct mjOption_ { // physics options
|
||||||
// timing parameters
|
// timing parameters
|
||||||
mjtNum timestep; // timestep
|
mjtNum timestep; // timestep
|
||||||
mjtNum apirate; // update rate for remote API (Hz)
|
|
||||||
|
|
||||||
// solver parameters
|
// solver parameters
|
||||||
mjtNum impratio; // ratio of friction-to-normal contact impedance
|
mjtNum impratio; // ratio of friction-to-normal contact impedance
|
||||||
|
|||||||
@@ -170,31 +170,6 @@ class MjcPhysicsSceneAPI : public UsdAPISchemaBase {
|
|||||||
UsdAttribute CreateTimestepAttr(VtValue const& defaultValue = VtValue(),
|
UsdAttribute CreateTimestepAttr(VtValue const& defaultValue = VtValue(),
|
||||||
bool writeSparsely = false) const;
|
bool writeSparsely = false) const;
|
||||||
|
|
||||||
public:
|
|
||||||
// --------------------------------------------------------------------- //
|
|
||||||
// APIRATE
|
|
||||||
// --------------------------------------------------------------------- //
|
|
||||||
/// Determines the rate (in Hz) at which an external API allows
|
|
||||||
/// the update function to be executed.
|
|
||||||
///
|
|
||||||
/// | ||
|
|
||||||
/// | -- | -- |
|
|
||||||
/// | Declaration | `uniform double mjc:option:apirate = 100` |
|
|
||||||
/// | C++ Type | double |
|
|
||||||
/// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
|
|
||||||
/// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
|
|
||||||
MJCPHYSICS_API
|
|
||||||
UsdAttribute GetApiRateAttr() const;
|
|
||||||
|
|
||||||
/// See GetApiRateAttr(), and also
|
|
||||||
/// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
|
|
||||||
/// If specified, author \p defaultValue as the attribute's default,
|
|
||||||
/// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
|
|
||||||
/// the default for \p writeSparsely is \c false.
|
|
||||||
MJCPHYSICS_API
|
|
||||||
UsdAttribute CreateApiRateAttr(VtValue const& defaultValue = VtValue(),
|
|
||||||
bool writeSparsely = false) const;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// --------------------------------------------------------------------- //
|
// --------------------------------------------------------------------- //
|
||||||
// IMPRATIO
|
// IMPRATIO
|
||||||
|
|||||||
@@ -455,10 +455,6 @@ struct MjcPhysicsTokensType {
|
|||||||
///
|
///
|
||||||
/// MjcPhysicsSceneAPI
|
/// MjcPhysicsSceneAPI
|
||||||
const TfToken mjcOptionActuatorgroupdisable;
|
const TfToken mjcOptionActuatorgroupdisable;
|
||||||
/// \brief "mjc:option:apirate"
|
|
||||||
///
|
|
||||||
/// MjcPhysicsSceneAPI
|
|
||||||
const TfToken mjcOptionApirate;
|
|
||||||
/// \brief "mjc:option:ccd_iterations"
|
/// \brief "mjc:option:ccd_iterations"
|
||||||
///
|
///
|
||||||
/// MjcPhysicsSceneAPI
|
/// MjcPhysicsSceneAPI
|
||||||
|
|||||||
@@ -469,7 +469,6 @@ typedef struct mjVFS_ mjVFS;
|
|||||||
struct mjOption_ { // physics options
|
struct mjOption_ { // physics options
|
||||||
// timing parameters
|
// timing parameters
|
||||||
mjtNum timestep; // timestep
|
mjtNum timestep; // timestep
|
||||||
mjtNum apirate; // update rate for remote API (Hz)
|
|
||||||
|
|
||||||
// solver parameters
|
// solver parameters
|
||||||
mjtNum impratio; // ratio of friction-to-normal contact impedance
|
mjtNum impratio; // ratio of friction-to-normal contact impedance
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
// scalar fields of mjOption
|
// scalar fields of mjOption
|
||||||
#define MJOPTION_FLOATS \
|
#define MJOPTION_FLOATS \
|
||||||
X( mjtNum, timestep ) \
|
X( mjtNum, timestep ) \
|
||||||
X( mjtNum, apirate ) \
|
|
||||||
X( mjtNum, impratio ) \
|
X( mjtNum, impratio ) \
|
||||||
X( mjtNum, tolerance ) \
|
X( mjtNum, tolerance ) \
|
||||||
X( mjtNum, ls_tolerance ) \
|
X( mjtNum, ls_tolerance ) \
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ class ModelIOTest(parameterized.TestCase):
|
|||||||
self.assertFalse(hasattr(mx, 'bvh_aabb'))
|
self.assertFalse(hasattr(mx, 'bvh_aabb'))
|
||||||
elif impl == 'c':
|
elif impl == 'c':
|
||||||
# Options specific to C are populated.
|
# Options specific to C are populated.
|
||||||
self.assertEqual(mx.opt._impl.apirate, m.opt.apirate)
|
self.assertEqual(mx.opt._impl.noslip_iterations, m.opt.noslip_iterations)
|
||||||
# Fields private to C backend impl are populated.
|
# Fields private to C backend impl are populated.
|
||||||
self.assertTrue(hasattr(mx._impl, 'bvh_aabb'))
|
self.assertTrue(hasattr(mx._impl, 'bvh_aabb'))
|
||||||
elif impl == 'warp':
|
elif impl == 'warp':
|
||||||
|
|||||||
@@ -497,7 +497,6 @@ class OptionC(PyTreeNode):
|
|||||||
disableactuator: int
|
disableactuator: int
|
||||||
sdf_initpoints: int
|
sdf_initpoints: int
|
||||||
has_fluid_params: bool
|
has_fluid_params: bool
|
||||||
apirate: jax.Array
|
|
||||||
noslip_tolerance: jax.Array
|
noslip_tolerance: jax.Array
|
||||||
ccd_tolerance: jax.Array
|
ccd_tolerance: jax.Array
|
||||||
noslip_iterations: int
|
noslip_iterations: int
|
||||||
|
|||||||
@@ -123,11 +123,6 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
|||||||
type=ValueType(name='mjtNum'),
|
type=ValueType(name='mjtNum'),
|
||||||
doc='timestep',
|
doc='timestep',
|
||||||
),
|
),
|
||||||
StructFieldDecl(
|
|
||||||
name='apirate',
|
|
||||||
type=ValueType(name='mjtNum'),
|
|
||||||
doc='update rate for remote API (Hz)',
|
|
||||||
),
|
|
||||||
StructFieldDecl(
|
StructFieldDecl(
|
||||||
name='impratio',
|
name='impratio',
|
||||||
type=ValueType(name='mjtNum'),
|
type=ValueType(name='mjtNum'),
|
||||||
|
|||||||
@@ -707,7 +707,6 @@ void MakePhysicsSection(mj::Simulate* sim) {
|
|||||||
{mjITEM_EDITNUM, "Noslip Tol", 2, &(opt->noslip_tolerance), "1 0 1"},
|
{mjITEM_EDITNUM, "Noslip Tol", 2, &(opt->noslip_tolerance), "1 0 1"},
|
||||||
{mjITEM_EDITINT, "CCD Iter", 2, &(opt->ccd_iterations), "1 0 1000"},
|
{mjITEM_EDITINT, "CCD Iter", 2, &(opt->ccd_iterations), "1 0 1000"},
|
||||||
{mjITEM_EDITNUM, "CCD Tol", 2, &(opt->ccd_tolerance), "1 0 1"},
|
{mjITEM_EDITNUM, "CCD Tol", 2, &(opt->ccd_tolerance), "1 0 1"},
|
||||||
{mjITEM_EDITNUM, "API Rate", 2, &(opt->apirate), "1 0 1000"},
|
|
||||||
{mjITEM_EDITINT, "SDF Iter", 2, &(opt->sdf_iterations), "1 1 20"},
|
{mjITEM_EDITINT, "SDF Iter", 2, &(opt->sdf_iterations), "1 1 20"},
|
||||||
{mjITEM_EDITINT, "SDF Init", 2, &(opt->sdf_initpoints), "1 1 100"},
|
{mjITEM_EDITINT, "SDF Init", 2, &(opt->sdf_initpoints), "1 1 100"},
|
||||||
{mjITEM_SEPARATOR, "Physical Parameters", mjPRESERVE},
|
{mjITEM_SEPARATOR, "Physical Parameters", mjPRESERVE},
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ void mj_defaultOption(mjOption* opt) {
|
|||||||
|
|
||||||
// timing parameters
|
// timing parameters
|
||||||
opt->timestep = 0.002;
|
opt->timestep = 0.002;
|
||||||
opt->apirate = 100;
|
|
||||||
|
|
||||||
// solver parameters
|
// solver parameters
|
||||||
opt->impratio = 1;
|
opt->impratio = 1;
|
||||||
|
|||||||
@@ -1364,7 +1364,6 @@ void App::PhysicsGui() {
|
|||||||
ImGui_Input("Noslip Tol", &opt.noslip_tolerance, {0, 1, 0.01, 0.1, w});
|
ImGui_Input("Noslip Tol", &opt.noslip_tolerance, {0, 1, 0.01, 0.1, w});
|
||||||
ImGui_Input("CCD Iter", &opt.ccd_iterations, {0, 1000, 1, 100, w});
|
ImGui_Input("CCD Iter", &opt.ccd_iterations, {0, 1000, 1, 100, w});
|
||||||
ImGui_Input("CCD Tol", &opt.ccd_tolerance, {0, 1, 0.01, 0.1, w});
|
ImGui_Input("CCD Tol", &opt.ccd_tolerance, {0, 1, 0.01, 0.1, w});
|
||||||
ImGui_Input("API Rate", &opt.apirate, {0, 1000, 1, 100, w});
|
|
||||||
ImGui_Input("SDF Iter", &opt.sdf_iterations, {1, 20, 1, 10, w});
|
ImGui_Input("SDF Iter", &opt.sdf_iterations, {1, 20, 1, 10, w});
|
||||||
ImGui_Input("SDF Init", &opt.sdf_initpoints, {1, 100, 1, 10, w});
|
ImGui_Input("SDF Init", &opt.sdf_initpoints, {1, 100, 1, 10, w});
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
|
|||||||
@@ -170,11 +170,6 @@ class "MjcSceneAPI" (
|
|||||||
displayName = "Actuator Group Disable"
|
displayName = "Actuator Group Disable"
|
||||||
doc = "List of actuator groups to disable."
|
doc = "List of actuator groups to disable."
|
||||||
)
|
)
|
||||||
uniform double mjc:option:apirate = 100 (
|
|
||||||
displayName = "ApiRate"
|
|
||||||
doc = """Determines the rate (in Hz) at which an external API allows
|
|
||||||
the update function to be executed."""
|
|
||||||
)
|
|
||||||
uniform int mjc:option:ccd_iterations = 35 (
|
uniform int mjc:option:ccd_iterations = 35 (
|
||||||
displayName = "CCD Iterations"
|
displayName = "CCD Iterations"
|
||||||
doc = "Maximum number of iterations of the algorithm used for convex collisions."
|
doc = "Maximum number of iterations of the algorithm used for convex collisions."
|
||||||
|
|||||||
@@ -85,17 +85,6 @@ UsdAttribute MjcPhysicsSceneAPI::CreateTimestepAttr(VtValue const& defaultValue,
|
|||||||
/* custom = */ false, SdfVariabilityUniform, defaultValue, writeSparsely);
|
/* custom = */ false, SdfVariabilityUniform, defaultValue, writeSparsely);
|
||||||
}
|
}
|
||||||
|
|
||||||
UsdAttribute MjcPhysicsSceneAPI::GetApiRateAttr() const {
|
|
||||||
return GetPrim().GetAttribute(MjcPhysicsTokens->mjcOptionApirate);
|
|
||||||
}
|
|
||||||
|
|
||||||
UsdAttribute MjcPhysicsSceneAPI::CreateApiRateAttr(VtValue const& defaultValue,
|
|
||||||
bool writeSparsely) const {
|
|
||||||
return UsdSchemaBase::_CreateAttr(
|
|
||||||
MjcPhysicsTokens->mjcOptionApirate, SdfValueTypeNames->Double,
|
|
||||||
/* custom = */ false, SdfVariabilityUniform, defaultValue, writeSparsely);
|
|
||||||
}
|
|
||||||
|
|
||||||
UsdAttribute MjcPhysicsSceneAPI::GetImpRatioAttr() const {
|
UsdAttribute MjcPhysicsSceneAPI::GetImpRatioAttr() const {
|
||||||
return GetPrim().GetAttribute(MjcPhysicsTokens->mjcOptionImpratio);
|
return GetPrim().GetAttribute(MjcPhysicsTokens->mjcOptionImpratio);
|
||||||
}
|
}
|
||||||
@@ -798,7 +787,6 @@ const TfTokenVector& MjcPhysicsSceneAPI::GetSchemaAttributeNames(
|
|||||||
bool includeInherited) {
|
bool includeInherited) {
|
||||||
static TfTokenVector localNames = {
|
static TfTokenVector localNames = {
|
||||||
MjcPhysicsTokens->mjcOptionTimestep,
|
MjcPhysicsTokens->mjcOptionTimestep,
|
||||||
MjcPhysicsTokens->mjcOptionApirate,
|
|
||||||
MjcPhysicsTokens->mjcOptionImpratio,
|
MjcPhysicsTokens->mjcOptionImpratio,
|
||||||
MjcPhysicsTokens->mjcOptionWind,
|
MjcPhysicsTokens->mjcOptionWind,
|
||||||
MjcPhysicsTokens->mjcOptionMagnetic,
|
MjcPhysicsTokens->mjcOptionMagnetic,
|
||||||
|
|||||||
@@ -111,15 +111,6 @@ class "MjcSceneAPI"
|
|||||||
doc = """Controls the timestep in seconds used by MuJoCo."""
|
doc = """Controls the timestep in seconds used by MuJoCo."""
|
||||||
)
|
)
|
||||||
|
|
||||||
uniform double mjc:option:apirate = 100 (
|
|
||||||
customData = {
|
|
||||||
string apiName = "ApiRate"
|
|
||||||
}
|
|
||||||
displayName = "ApiRate"
|
|
||||||
doc = """Determines the rate (in Hz) at which an external API allows
|
|
||||||
the update function to be executed."""
|
|
||||||
)
|
|
||||||
|
|
||||||
uniform double mjc:option:impratio = 1.0 (
|
uniform double mjc:option:impratio = 1.0 (
|
||||||
customData = {
|
customData = {
|
||||||
string apiName = "ImpRatio"
|
string apiName = "ImpRatio"
|
||||||
|
|||||||
@@ -118,7 +118,6 @@ MjcPhysicsTokensType::MjcPhysicsTokensType()
|
|||||||
mjcMquat("mjc:mquat", TfToken::Immortal),
|
mjcMquat("mjc:mquat", TfToken::Immortal),
|
||||||
mjcOptionActuatorgroupdisable("mjc:option:actuatorgroupdisable",
|
mjcOptionActuatorgroupdisable("mjc:option:actuatorgroupdisable",
|
||||||
TfToken::Immortal),
|
TfToken::Immortal),
|
||||||
mjcOptionApirate("mjc:option:apirate", TfToken::Immortal),
|
|
||||||
mjcOptionCcd_iterations("mjc:option:ccd_iterations", TfToken::Immortal),
|
mjcOptionCcd_iterations("mjc:option:ccd_iterations", TfToken::Immortal),
|
||||||
mjcOptionCcd_tolerance("mjc:option:ccd_tolerance", TfToken::Immortal),
|
mjcOptionCcd_tolerance("mjc:option:ccd_tolerance", TfToken::Immortal),
|
||||||
mjcOptionCone("mjc:option:cone", TfToken::Immortal),
|
mjcOptionCone("mjc:option:cone", TfToken::Immortal),
|
||||||
@@ -281,7 +280,6 @@ MjcPhysicsTokensType::MjcPhysicsTokensType()
|
|||||||
mjcMpos,
|
mjcMpos,
|
||||||
mjcMquat,
|
mjcMquat,
|
||||||
mjcOptionActuatorgroupdisable,
|
mjcOptionActuatorgroupdisable,
|
||||||
mjcOptionApirate,
|
|
||||||
mjcOptionCcd_iterations,
|
mjcOptionCcd_iterations,
|
||||||
mjcOptionCcd_tolerance,
|
mjcOptionCcd_tolerance,
|
||||||
mjcOptionCone,
|
mjcOptionCone,
|
||||||
|
|||||||
@@ -500,7 +500,6 @@ class ModelWriter {
|
|||||||
spec_->option.noslip_tolerance},
|
spec_->option.noslip_tolerance},
|
||||||
{MjcPhysicsTokens->mjcOptionCcd_tolerance,
|
{MjcPhysicsTokens->mjcOptionCcd_tolerance,
|
||||||
spec_->option.ccd_tolerance},
|
spec_->option.ccd_tolerance},
|
||||||
{MjcPhysicsTokens->mjcOptionApirate, spec_->option.apirate},
|
|
||||||
{MjcPhysicsTokens->mjcOptionImpratio, spec_->option.impratio},
|
{MjcPhysicsTokens->mjcOptionImpratio, spec_->option.impratio},
|
||||||
{MjcPhysicsTokens->mjcOptionDensity, spec_->option.density},
|
{MjcPhysicsTokens->mjcOptionDensity, spec_->option.density},
|
||||||
{MjcPhysicsTokens->mjcOptionViscosity, spec_->option.viscosity},
|
{MjcPhysicsTokens->mjcOptionViscosity, spec_->option.viscosity},
|
||||||
|
|||||||
@@ -445,10 +445,6 @@ void ParseUsdPhysicsScene(mjSpec* spec,
|
|||||||
mjc_physics_scene.GetTimestepAttr().Get(×tep);
|
mjc_physics_scene.GetTimestepAttr().Get(×tep);
|
||||||
spec->option.timestep = timestep;
|
spec->option.timestep = timestep;
|
||||||
|
|
||||||
double apirate;
|
|
||||||
mjc_physics_scene.GetApiRateAttr().Get(&apirate);
|
|
||||||
spec->option.apirate = apirate;
|
|
||||||
|
|
||||||
double impratio;
|
double impratio;
|
||||||
mjc_physics_scene.GetImpRatioAttr().Get(&impratio);
|
mjc_physics_scene.GetImpRatioAttr().Get(&impratio);
|
||||||
spec->option.impratio = impratio;
|
spec->option.impratio = impratio;
|
||||||
|
|||||||
@@ -110,8 +110,8 @@ const char* MJCF[nMJCF][mjXATTRNUM] = {
|
|||||||
"inttotal", "interval", "tolrange"},
|
"inttotal", "interval", "tolrange"},
|
||||||
{">"},
|
{">"},
|
||||||
|
|
||||||
{"option", "*", "27",
|
{"option", "*", "26",
|
||||||
"timestep", "apirate", "impratio", "tolerance", "ls_tolerance", "noslip_tolerance",
|
"timestep", "impratio", "tolerance", "ls_tolerance", "noslip_tolerance",
|
||||||
"ccd_tolerance", "gravity", "wind", "magnetic", "density", "viscosity",
|
"ccd_tolerance", "gravity", "wind", "magnetic", "density", "viscosity",
|
||||||
"o_margin", "o_solref", "o_solimp", "o_friction",
|
"o_margin", "o_solref", "o_solimp", "o_friction",
|
||||||
"integrator", "cone", "jacobian",
|
"integrator", "cone", "jacobian",
|
||||||
@@ -1130,7 +1130,6 @@ void mjXReader::Option(XMLElement* section, mjOption* opt) {
|
|||||||
|
|
||||||
// read options
|
// read options
|
||||||
ReadAttr(section, "timestep", 1, &opt->timestep, text);
|
ReadAttr(section, "timestep", 1, &opt->timestep, text);
|
||||||
ReadAttr(section, "apirate", 1, &opt->apirate, text);
|
|
||||||
ReadAttr(section, "impratio", 1, &opt->impratio, text);
|
ReadAttr(section, "impratio", 1, &opt->impratio, text);
|
||||||
ReadAttr(section, "tolerance", 1, &opt->tolerance, text);
|
ReadAttr(section, "tolerance", 1, &opt->tolerance, text);
|
||||||
ReadAttr(section, "ls_tolerance", 1, &opt->ls_tolerance, text);
|
ReadAttr(section, "ls_tolerance", 1, &opt->ls_tolerance, text);
|
||||||
|
|||||||
@@ -990,7 +990,6 @@ void mjXWriter::Option(XMLElement* root) {
|
|||||||
|
|
||||||
// option
|
// option
|
||||||
WriteAttr(section, "timestep", 1, &model->option.timestep, &opt.timestep);
|
WriteAttr(section, "timestep", 1, &model->option.timestep, &opt.timestep);
|
||||||
WriteAttr(section, "apirate", 1, &model->option.apirate, &opt.apirate);
|
|
||||||
WriteAttr(section, "impratio", 1, &model->option.impratio, &opt.impratio);
|
WriteAttr(section, "impratio", 1, &model->option.impratio, &opt.impratio);
|
||||||
WriteAttr(section, "tolerance", 1, &model->option.tolerance, &opt.tolerance);
|
WriteAttr(section, "tolerance", 1, &model->option.tolerance, &opt.tolerance);
|
||||||
WriteAttr(section, "ls_tolerance", 1, &model->option.ls_tolerance, &opt.ls_tolerance);
|
WriteAttr(section, "ls_tolerance", 1, &model->option.ls_tolerance, &opt.ls_tolerance);
|
||||||
|
|||||||
@@ -104,7 +104,6 @@ TEST_F(MjcPhysicsSceneTest, TestDefaults) {
|
|||||||
// If this test is failing due to an update of defaults in Mujoco you need to
|
// If this test is failing due to an update of defaults in Mujoco you need to
|
||||||
// update mjcPhysics/schema.usda.
|
// update mjcPhysics/schema.usda.
|
||||||
EXPECT_REAL_USD_FALLBACK_EQ_MODEL_DEFAULT(Timestep, timestep);
|
EXPECT_REAL_USD_FALLBACK_EQ_MODEL_DEFAULT(Timestep, timestep);
|
||||||
EXPECT_REAL_USD_FALLBACK_EQ_MODEL_DEFAULT(ApiRate, apirate);
|
|
||||||
EXPECT_REAL_USD_FALLBACK_EQ_MODEL_DEFAULT(ImpRatio, impratio);
|
EXPECT_REAL_USD_FALLBACK_EQ_MODEL_DEFAULT(ImpRatio, impratio);
|
||||||
|
|
||||||
EXPECT_VEC3_USD_FALLBACK_EQ_MODEL_DEFAULT(Wind, wind);
|
EXPECT_VEC3_USD_FALLBACK_EQ_MODEL_DEFAULT(Wind, wind);
|
||||||
|
|||||||
@@ -724,19 +724,6 @@ TEST_F(MjcfSdfFileFormatPluginTest, TestPhysicsScenePrimWind) {
|
|||||||
pxr::GfVec3d(1, 2, 3));
|
pxr::GfVec3d(1, 2, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(MjcfSdfFileFormatPluginTest, TestPhysicsScenePrimApirate) {
|
|
||||||
auto stage = OpenStage(R"(
|
|
||||||
<mujoco model="test">
|
|
||||||
<option apirate="1.2"> </option>
|
|
||||||
</mujoco>
|
|
||||||
)");
|
|
||||||
|
|
||||||
ExpectAttributeEqual(
|
|
||||||
stage,
|
|
||||||
kPhysicsScenePrimPath.AppendProperty(MjcPhysicsTokens->mjcOptionApirate),
|
|
||||||
1.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(MjcfSdfFileFormatPluginTest, TestPhysicsScenePrimImpratio) {
|
TEST_F(MjcfSdfFileFormatPluginTest, TestPhysicsScenePrimImpratio) {
|
||||||
auto stage = OpenStage(R"(
|
auto stage = OpenStage(R"(
|
||||||
<mujoco model="test">
|
<mujoco model="test">
|
||||||
|
|||||||
@@ -5089,7 +5089,6 @@ public unsafe struct _mjVFS
|
|||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public unsafe struct mjOption_ {
|
public unsafe struct mjOption_ {
|
||||||
public double timestep;
|
public double timestep;
|
||||||
public double apirate;
|
|
||||||
public double impratio;
|
public double impratio;
|
||||||
public double tolerance;
|
public double tolerance;
|
||||||
public double ls_tolerance;
|
public double ls_tolerance;
|
||||||
|
|||||||
@@ -156,7 +156,6 @@ public struct MjSizeStruct {
|
|||||||
public struct MjOptionStruct {
|
public struct MjOptionStruct {
|
||||||
|
|
||||||
// "timestep" and "gravity" come from global settings.
|
// "timestep" and "gravity" come from global settings.
|
||||||
// "apirate" is only relevant to HAPTIX.
|
|
||||||
[Tooltip("Ratio of frictional-to-normal constraint impedance.")]
|
[Tooltip("Ratio of frictional-to-normal constraint impedance.")]
|
||||||
public float ImpRatio;
|
public float ImpRatio;
|
||||||
[Tooltip("Global magnetic flux used by magnetometer sensors.")]
|
[Tooltip("Global magnetic flux used by magnetometer sensors.")]
|
||||||
|
|||||||
Reference in New Issue
Block a user