diff --git a/doc/APIreference/APIfunctions.rst b/doc/APIreference/APIfunctions.rst index a7d25dc2..96aab950 100644 --- a/doc/APIreference/APIfunctions.rst +++ b/doc/APIreference/APIfunctions.rst @@ -23,7 +23,6 @@ API function can be classified as: - :ref:`OpenGL rendering`. - :ref:`UI framework`. - :ref:`Error and memory`. -- Deprecated :ref:`activation` mechanism. - :ref:`Aliases for C standard math` functions. - :ref:`Vector math`. - :ref:`Quaternions`. diff --git a/doc/APIreference/functions.rst b/doc/APIreference/functions.rst index dff71a37..72e234ed 100644 --- a/doc/APIreference/functions.rst +++ b/doc/APIreference/functions.rst @@ -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 diff --git a/doc/changelog.rst b/doc/changelog.rst index cf4ebdb6..ec11e1ce 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -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) diff --git a/doc/includes/references.h b/doc/includes/references.h index b4ac36af..986444d3 100644 --- a/doc/includes/references.h +++ b/doc/includes/references.h @@ -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); diff --git a/include/mujoco/mujoco.h b/include/mujoco/mujoco.h index 2c1b3075..23df98cf 100644 --- a/include/mujoco/mujoco.h +++ b/include/mujoco/mujoco.h @@ -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 diff --git a/introspect/functions.py b/introspect/functions.py index 6dcf5a2e..d4a0ba1a 100644 --- a/introspect/functions.py +++ b/introspect/functions.py @@ -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', diff --git a/python/mujoco/functions.cc b/python/mujoco/functions.cc index b0ed622e..a3b0a16c 100644 --- a/python/mujoco/functions.cc +++ b/python/mujoco/functions.cc @@ -42,10 +42,6 @@ PYBIND11_MODULE(_functions, pymodule) { // for MjWrapper types and therefore generates prettier docstrings. py::module::import("mujoco._structs"); - // Activation - Def(pymodule); - Def(pymodule); - // Virtual file system // Skipped entire section diff --git a/src/xml/xml_api.cc b/src/xml/xml_api.cc index 9ac6532b..39dce2ee 100644 --- a/src/xml/xml_api.cc +++ b/src/xml/xml_api.cc @@ -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) { diff --git a/src/xml/xml_api.h b/src/xml/xml_api.h index 8d106b5d..683e36c1 100644 --- a/src/xml/xml_api.h +++ b/src/xml/xml_api.h @@ -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 diff --git a/unity/Runtime/Bindings/MjBindings.cs b/unity/Runtime/Bindings/MjBindings.cs index 7265c834..8c1d6160 100644 --- a/unity/Runtime/Bindings/MjBindings.cs +++ b/unity/Runtime/Bindings/MjBindings.cs @@ -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);