Disable hfields for collision sensors.
PiperOrigin-RevId: 685730321 Change-Id: Ib1d4a90b7b31ca388e018076a274e25c40409080
This commit is contained in:
committed by
Copybara-Service
parent
ee7b994021
commit
8d84b5f693
@@ -31,6 +31,8 @@ Bug fixes
|
||||
^^^^^^^^^
|
||||
- Fixed a bug where ``actuator_force`` was not set in MJX (:github:issue:`2068`).
|
||||
- Fixed bug where MJX data tendon fields were incorrect after calling ``mjx.put_data``.
|
||||
- The compiler now returns an error if height fields are used with :ref:`collision sensors<collision-sensors>` as they
|
||||
are not yet supported.
|
||||
|
||||
|
||||
Version 3.2.3 (Sep 16, 2024)
|
||||
|
||||
@@ -6399,6 +6399,12 @@ void mjCSensor::Compile(void) {
|
||||
throw mjCError(this, "1st body/geom must be different from 2nd body/geom");
|
||||
}
|
||||
|
||||
// height fields are not necessarily convex and are not yet supported
|
||||
if (static_cast<mjCGeom*>(obj)->Type() == mjGEOM_HFIELD ||
|
||||
static_cast<mjCGeom*>(ref)->Type() == mjGEOM_HFIELD) {
|
||||
throw mjCError(this, "height fields are not supported in geom distance sensors");
|
||||
}
|
||||
|
||||
// set
|
||||
needstage = mjSTAGE_POS;
|
||||
if (type==mjSENS_GEOMDIST) {
|
||||
|
||||
@@ -530,6 +530,7 @@ class mjCGeom : public mjCGeom_, private mjsGeom {
|
||||
void SetInertia(void); // compute and set geom inertia
|
||||
bool IsVisual(void) const { return visual_; }
|
||||
void SetNotVisual(void) { visual_ = false; }
|
||||
mjtGeom Type() const { return type; }
|
||||
|
||||
// Compute all coefs modeling the interaction with the surrounding fluid.
|
||||
void SetFluidCoefs(void);
|
||||
|
||||
@@ -61,23 +61,15 @@
|
||||
<fromto geom1="ellipsoid" geom2="box" cutoff="1"/>
|
||||
<fromto geom1="ellipsoid" geom2="cylinder" cutoff="1"/>
|
||||
<fromto geom1="ellipsoid" geom2="mesh2" cutoff="1"/>
|
||||
<fromto geom1="ellipsoid" geom2="hfield" cutoff="1"/>
|
||||
<fromto geom1="mesh1" geom2="sphere" cutoff="1"/>
|
||||
<fromto geom1="mesh1" geom2="box" cutoff="1"/>
|
||||
<fromto geom1="mesh1" geom2="mesh2" cutoff="1"/>
|
||||
<fromto geom1="hfield" geom2="sphere" cutoff="1"/>
|
||||
<fromto geom1="hfield" geom2="box" cutoff="1"/>
|
||||
<fromto geom1="hfield" geom2="mesh1" cutoff="1"/>
|
||||
|
||||
<fromto geom1="ellipsoid" geom2="box" cutoff="0.2"/>
|
||||
<fromto geom1="ellipsoid" geom2="cylinder" cutoff="0.2"/>
|
||||
<fromto geom1="ellipsoid" geom2="mesh2" cutoff="0.2"/>
|
||||
<fromto geom1="ellipsoid" geom2="hfield" cutoff="0.2"/>
|
||||
<fromto geom1="mesh1" geom2="sphere" cutoff="0.2"/>
|
||||
<fromto geom1="mesh1" geom2="box" cutoff="0.2"/>
|
||||
<fromto geom1="mesh1" geom2="mesh2" cutoff="0.2"/>
|
||||
<fromto geom1="hfield" geom2="sphere" cutoff="0.2"/>
|
||||
<fromto geom1="hfield" geom2="box" cutoff="0.2"/>
|
||||
<fromto geom1="hfield" geom2="mesh1" cutoff="0.2"/>
|
||||
</sensor>
|
||||
</mujoco>
|
||||
|
||||
Reference in New Issue
Block a user