Remove mj_activate and mj_deactivate.
PiperOrigin-RevId: 538799120 Change-Id: I4d6729131e20ab9ae15c94c221ba83ae5732e942
This commit is contained in:
committed by
Copybara-Service
parent
188b04fba5
commit
466c9aca82
@@ -23,7 +23,6 @@ API function can be classified as:
|
||||
- :ref:`OpenGL rendering<OpenGLrendering>`.
|
||||
- :ref:`UI framework<UIframework>`.
|
||||
- :ref:`Error and memory<Errorandmemory>`.
|
||||
- Deprecated :ref:`activation<Activation>` mechanism.
|
||||
- :ref:`Aliases for C standard math<Standardmath>` functions.
|
||||
- :ref:`Vector math<Vectormath>`.
|
||||
- :ref:`Quaternions<Quaternions>`.
|
||||
|
||||
@@ -2020,31 +2020,6 @@ mju_writeLog
|
||||
|
||||
Write [datetime, type: message] to MUJOCO_LOG.TXT.
|
||||
|
||||
.. _Activation:
|
||||
|
||||
Activation
|
||||
^^^^^^^^^^
|
||||
|
||||
The functions in this section are maintained for backward compatibility with the now-removed activation mechanism.
|
||||
|
||||
.. _mj_activate:
|
||||
|
||||
mj_activate
|
||||
~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mj_activate
|
||||
|
||||
Return 1 (for backward compatibility).
|
||||
|
||||
.. _mj_deactivate:
|
||||
|
||||
mj_deactivate
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mj_deactivate
|
||||
|
||||
Do nothing (for backward compatibility).
|
||||
|
||||
.. _Standardmath:
|
||||
|
||||
Standard math
|
||||
|
||||
@@ -102,6 +102,8 @@ General
|
||||
from the ``mjData`` stack and arena.
|
||||
- Removed ``pstack`` and ``parena`` from the output of ``mj_printData``, since these are implementation details of the
|
||||
``mjData`` allocators that are affected by diagnostic paddings in instrumented builds.
|
||||
- Removed the ``mj_activate`` and ``mj_deactivate`` functions. These had been kept around for compatibility with old
|
||||
user code from when MuJoCo was closed source, but have been no-op functions since open sourcing.
|
||||
|
||||
|
||||
Version 2.3.5 (April 25, 2023)
|
||||
|
||||
@@ -2343,8 +2343,6 @@ void* mju_malloc(size_t size);
|
||||
void mju_free(void* ptr);
|
||||
void mj_warning(mjData* d, int warning, int info);
|
||||
void mju_writeLog(const char* type, const char* msg);
|
||||
int mj_activate(const char* filename);
|
||||
void mj_deactivate(void);
|
||||
void mju_zero3(mjtNum res[3]);
|
||||
void mju_copy3(mjtNum res[3], const mjtNum data[3]);
|
||||
void mju_scl3(mjtNum res[3], const mjtNum vec[3], mjtNum scl);
|
||||
|
||||
@@ -800,15 +800,6 @@ MJAPI void mj_warning(mjData* d, int warning, int info);
|
||||
MJAPI void mju_writeLog(const char* type, const char* msg);
|
||||
|
||||
|
||||
//---------------------------------- Activation ----------------------------------------------------
|
||||
|
||||
// Return 1 (for backward compatibility).
|
||||
MJAPI int mj_activate(const char* filename);
|
||||
|
||||
// Do nothing (for backward compatibility).
|
||||
MJAPI void mj_deactivate(void);
|
||||
|
||||
|
||||
//---------------------------------- Standard math -------------------------------------------------
|
||||
|
||||
#ifdef mjUSEDOUBLE
|
||||
|
||||
@@ -5142,27 +5142,6 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
|
||||
),
|
||||
doc='Write [datetime, type: message] to MUJOCO_LOG.TXT.',
|
||||
)),
|
||||
('mj_activate',
|
||||
FunctionDecl(
|
||||
name='mj_activate',
|
||||
return_type=ValueType(name='int'),
|
||||
parameters=(
|
||||
FunctionParameterDecl(
|
||||
name='filename',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='char', is_const=True),
|
||||
),
|
||||
),
|
||||
),
|
||||
doc='Return 1 (for backward compatibility).',
|
||||
)),
|
||||
('mj_deactivate',
|
||||
FunctionDecl(
|
||||
name='mj_deactivate',
|
||||
return_type=ValueType(name='void'),
|
||||
parameters=(),
|
||||
doc='Do nothing (for backward compatibility).',
|
||||
)),
|
||||
('mju_zero3',
|
||||
FunctionDecl(
|
||||
name='mju_zero3',
|
||||
|
||||
@@ -42,10 +42,6 @@ PYBIND11_MODULE(_functions, pymodule) {
|
||||
// for MjWrapper types and therefore generates prettier docstrings.
|
||||
py::module::import("mujoco._structs");
|
||||
|
||||
// Activation
|
||||
Def<traits::mj_activate>(pymodule);
|
||||
Def<traits::mj_deactivate>(pymodule);
|
||||
|
||||
// Virtual file system
|
||||
// Skipped entire section
|
||||
|
||||
|
||||
+2
-14
@@ -62,26 +62,14 @@ void GlobalModel::Clear() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// single instance of global model, protected with mutex
|
||||
static GlobalModel themodel;
|
||||
static std::mutex themutex;
|
||||
|
||||
|
||||
|
||||
//---------------------------------- Functions -----------------------------------------------------
|
||||
|
||||
// Return 1 (for backward compatibility).
|
||||
int mj_activate(const char* filename) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Do nothing (for backward compatibility).
|
||||
void mj_deactivate(void) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// mj_loadXML helper function
|
||||
mjModel* _loadXML(const char* filename, int vfs_provider,
|
||||
char* error, int error_sz) {
|
||||
|
||||
@@ -23,11 +23,6 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// activate license, call mju_error on failure; return 1 if ok, 0 if failure
|
||||
MJAPI int mj_activate(const char* filename);
|
||||
|
||||
// deactivate license, free memory
|
||||
MJAPI void mj_deactivate(void);
|
||||
|
||||
// parse XML file in MJCF or URDF format, compile it, return low-level model
|
||||
// if vfs is not NULL, look up files in vfs before reading from disk
|
||||
|
||||
@@ -3544,12 +3544,6 @@ public static unsafe extern void mj_warning(mjData_* d, int warning, int info);
|
||||
[DllImport("mujoco", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static unsafe extern void mju_writeLog([MarshalAs(UnmanagedType.LPStr)]string type, [MarshalAs(UnmanagedType.LPStr)]string msg);
|
||||
|
||||
[DllImport("mujoco", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static unsafe extern int mj_activate([MarshalAs(UnmanagedType.LPStr)]string filename);
|
||||
|
||||
[DllImport("mujoco", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static unsafe extern void mj_deactivate();
|
||||
|
||||
[DllImport("mujoco", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static unsafe extern void mju_zero3(double* res);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user