Improved behaviour of mouse-spring interactions.
Also:
- Renamed recently introduced `mjvPerturb` member `reflocalpos` -> `refselpos` and corrected docstring.
- Added `mjvPerturb.localmass`: body spatial inertia at selection point.
- Removed `const` qualifier to `mjData` argument of `mjv_initPerturb()`, to facilitate spatial inertia computation.
- Improved `mj_Object{Velocity, Acceleration}` docstrings, clarifying that rotational velocities precede linear velocities.
- Removed redundant const qualifiers from non pointer arguments to `mju_dot` and `mju_writeNumBytes`.
PiperOrigin-RevId: 511002168
Change-Id: I27400f497947f330072d4abb7c9bf7e71e6c5d49
This commit is contained in:
committed by
Copybara-Service
parent
9756ed0d80
commit
7542c90cd2
@@ -1029,7 +1029,7 @@ mj_objectVelocity
|
||||
|
||||
.. mujoco-include:: mj_objectVelocity
|
||||
|
||||
Compute object 6D velocity in object-centered frame, world/local orientation.
|
||||
Compute object 6D velocity (rot:lin) in object-centered frame, world/local orientation.
|
||||
|
||||
.. _mj_objectAcceleration:
|
||||
|
||||
@@ -1038,7 +1038,7 @@ mj_objectAcceleration
|
||||
|
||||
.. mujoco-include:: mj_objectAcceleration
|
||||
|
||||
Compute object 6D acceleration in object-centered frame, world/local orientation.
|
||||
Compute object 6D acceleration (rot:lin) in object-centered frame, world/local orientation.
|
||||
|
||||
.. _mj_contactForce:
|
||||
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ Bug fixes
|
||||
:align: right
|
||||
:width: 300px
|
||||
|
||||
#. The ``launch_repl`` functionality in the Python viewer has been fixed.
|
||||
6. The ``launch_repl`` functionality in the Python viewer has been fixed.
|
||||
#. Set ``time`` correctly in ``mjd_transitionFD``, to support time-dependent user code.
|
||||
#. Fixed sensor data dimension validation when ``user`` type sensors are present.
|
||||
#. Fixed incorrect plugin error message when a null ``nsensordata`` callback is encountered during model compilation.
|
||||
|
||||
@@ -1641,8 +1641,9 @@ struct mjvPerturb_ { // object selection and perturbation
|
||||
int active2; // secondary perturbation bitmask (mjtPertBit)
|
||||
mjtNum refpos[3]; // reference position for selected object
|
||||
mjtNum refquat[4]; // reference orientation for selected object
|
||||
mjtNum reflocalpos[3]; // reference selection point in object coordinates
|
||||
mjtNum refselpos[3]; // reference position for selection point
|
||||
mjtNum localpos[3]; // selection point in object coordinates
|
||||
mjtNum localmass; // spatial inertia at selection point
|
||||
mjtNum scale; // relative mouse motion-to-space scaling (set by initPerturb)
|
||||
};
|
||||
typedef struct mjvPerturb_ mjvPerturb;
|
||||
@@ -1973,8 +1974,7 @@ void mjv_movePerturb(const mjModel* m, const mjData* d, int action, mjtNum reldx
|
||||
mjtNum reldy, const mjvScene* scn, mjvPerturb* pert);
|
||||
void mjv_moveModel(const mjModel* m, int action, mjtNum reldx, mjtNum reldy,
|
||||
const mjtNum roomup[3], mjvScene* scn);
|
||||
void mjv_initPerturb(const mjModel* m, const mjData* d,
|
||||
const mjvScene* scn, mjvPerturb* pert);
|
||||
void mjv_initPerturb(const mjModel* m, mjData* d, const mjvScene* scn, mjvPerturb* pert);
|
||||
void mjv_applyPerturbPose(const mjModel* m, mjData* d, const mjvPerturb* pert,
|
||||
int flg_paused);
|
||||
void mjv_applyPerturbForce(const mjModel* m, mjData* d, const mjvPerturb* pert);
|
||||
@@ -2087,7 +2087,7 @@ void mju_addToScl(mjtNum* res, const mjtNum* vec, mjtNum scl, int n);
|
||||
void mju_addScl(mjtNum* res, const mjtNum* vec1, const mjtNum* vec2, mjtNum scl, int n);
|
||||
mjtNum mju_normalize(mjtNum* res, int n);
|
||||
mjtNum mju_norm(const mjtNum* res, int n);
|
||||
mjtNum mju_dot(const mjtNum* vec1, const mjtNum* vec2, const int n);
|
||||
mjtNum mju_dot(const mjtNum* vec1, const mjtNum* vec2, int n);
|
||||
void mju_mulMatVec(mjtNum* res, const mjtNum* mat, const mjtNum* vec, int nr, int nc);
|
||||
void mju_mulMatTVec(mjtNum* res, const mjtNum* mat, const mjtNum* vec, int nr, int nc);
|
||||
mjtNum mju_mulVecMatVec(const mjtNum* vec1, const mjtNum* mat, const mjtNum* vec2, int n);
|
||||
@@ -2146,7 +2146,7 @@ mjtNum mju_sign(mjtNum x);
|
||||
int mju_round(mjtNum x);
|
||||
const char* mju_type2Str(int type);
|
||||
int mju_str2Type(const char* str);
|
||||
const char* mju_writeNumBytes(const size_t nbytes);
|
||||
const char* mju_writeNumBytes(size_t nbytes);
|
||||
const char* mju_warningText(int warning, size_t info);
|
||||
int mju_isBad(mjtNum x);
|
||||
int mju_isZero(mjtNum* vec, int n);
|
||||
|
||||
Reference in New Issue
Block a user