MuJoCo   advanced physics simulation

MuJoCo Pro

VersionDateChange list
1.408/22/2016 OpenGL rendering. While the underlying renderer is the same, it now works in more scenarios, and the way the user interacts with it is streamlined and enhanced. Headless rendering (on Linux) and offscreen rendering are now supported systematically. The full list of changes is too long to show here; it is best to examine the documentation and code samples.
  • On Linux, libmujoco no longer links libGL and libGLEW. Instead the user is expected to link the versions of these libraries for the desired rendering scenario. This makes it possible to use X11, EGL, OSMESA or other GLEW-supported mechanisms for context creation. It is also possible to use the new vendor-independent libOpenGL which does not depend on X11 (replacing libGL which does).
  • All GLU functionality is now replaced with native code. This was needed because libGLU depends on X11 which may not be available in headless rendering.
  • Multi-sample anti-aliasing is now supported more systematically, including in offscreen rendering. The new model attribute mjModel.vis.quality.offsamples specifies the number of samples for the offscreen buffer. All read pixel, write pixel and blit operations are aware of the existence of multi-sample buffers, and use intermediate resolve buffers as needed.
  • There is now an explicit notion of active buffer (window or offscreen) which is set via the new function mjr_setBuffer. All subsequent rendering is directed to the active buffer. All functions work with both the window and offscreen buffers, including text and overlays (which could only be rendered to the window before). Single-buffered window rendering is also detected and handled automatically.
  • mjr_makeContext now checks the capability of the window framebuffer (including quad-buffering, double-buffering, multi-sampling) and records it in mjrContext. Subsequent operations automatically take into account these capabilities, so for example user code no longer needs to keep track of whether quad-buffered stereo is available.
  • Side-by-side stereo mode is now supported, in addition to the previously available quad-buffered stereo mode. This is needed for VR devices.
  • All rendering features now work on all platforms. Previously our internal function availability check was limited to the core OpenGL specification, and so we required 3.2 compatibility context in order to enable all rendering features. We realized however that the functionality we are using is contained within OpenGL 1.5 plus the ARB_framebuffer_object extension, which is more widely supported by existing drivers.
  • The option to flip the left and right views in stereo mode was removed, since modern hardware does not suffer from flipping.
  • The renderer now uses GLEW 2.0.0 (which is essential for headless rendering) and the code samples use GLFW 3.2. Precompiled versions of these new libraries are included in the software distribution.
  • The Intel Ubuntu driver was causing artifacts in cube texture mapping. We traced this to mipmap texture generation, and side-stepped it by using a different method (even though the old method should have worked according to the OpenGL specification, as it does on every other platform).
  • The OSX driver was mysteriously returning only the left half of the depth map for multi-sampled windows. This is now fixed (we are not quite sure which change fixed it).
Abstract visualization and mouse interaction. The abstract visualization layer was redesigned so as to streamline it, add support for VR devices, and make the mouse interaction more intuitive. Similar to above, the full list of changes is too long to show here, so look at the documentation and code samples.
  • The new data structures mjvScene and mjvPerturb encapsulate multiple objects that previously had to be maintained by user code. The scene is the final result of the abstract visualization stage. It is updated with a single call: mjv_updateScene(). Then it takes one more call to render it: mjr_render().
  • The abstract mjvCamera now has cleaner support for free cameras, tracking cameras and model-defined cameras. The low-level mjvCameraPose is removed. Instead we now have a new mjvGLCamera which is embedded in mjvScene, and corresponds directly to an OpenGL camera - one for each eye. The user can omit mjvCamera altogether and specify OpenGL cameras directly, so as to implement head tracking and oblique projections needed for VR headsets.
  • We now make a distinction between model space and room space. The latter is needed because new VR headsets have physical presence, so we need to position the model relative to the room. This is done by defining model translation, rotation and scaling within mjvScene, and controlling them interactively via the new function mjv_moveModel(). When mjvCamera is used to update the OpenGL cameras, this transformation is disabled and the camera simply lives in the model space as before.
  • A new labeling mode was added, allowing the magnitude of all contact forces to be printed at the base of the corresponding force arrows. The arrows themselves must be enabled for these labels to show up.
  • Translational perturbations are now more consistent. The mouse cursor and the end of the string pulling the object are still dislocated, because the translation is happening in a model-aligned rather than a screen-aligned plane. But now returning the mouse to the same place will also return the end of the string to the same place. The other end of the string is now anchored to the inertial body frame and not the regular body frame (the latter usually coincides with the joint).
  • The default strength of the rotational perturbation is increased by default, and a new model attribute is added so the user can further adjust it. The orientation difference between the selected object and the perturbation reference is now limited to 90 deg. This makes the rotational perturbation a lot more usable. In pose editing mode, the rotation now takes place around the selected object and not the root of the kinematic subtree as before.
Sensors and energy. The sensor simulation and energy computation were redesigned to follow the same stage-wise approach as the main physics computation. Sensor noise, new sensor types and custom sensors were added.
  • In addition to sensors that correspond to existing measurement devices, we extended the notion of sensor to include any quantity of interest, so that mjData.sensordata can represent all relevant state-control features for optimization algorithms. This includes new sensor types: the position, velocity and acceleration (both linear and angular) of every MuJoCo object that has a spatial frame (body, site, geom, camera), as well as subtree-related sensors. Custom sensors are now also allowed. The new callback mjcb_sensor is expected to fill in the corresponding fields of mjData.sensordata.
  • The functions mj_sensor() and mj_enregy() were separated into mj_sensorPos(), mj_sensorVel(), mj_sensorAcc() and similarly for energy. Each function performs the computations at the corresponding stage, so that for example position and velocity-dependent sensors will be computed before the control callback is called. Importantly, these functions are now called automatically from within the physics pipeline and no longer need to be called by the user (although we still expose them).
  • The sensor specification now includes a noise term. This is the standard deviation of zero-mean Gaussian noise that can be added to the simulated sensor reading. Even if this setting is non-zero, noise is not generated by default, but only if the new enable flag "sensornoise" is set. This is because state estimators need to know what the noise amplitude is, but do not normally need to generate noisy sensor readings.
  • Sensor scaling was removed. It no longer makes sense when we have so many spatial frames as sensors.
  • The order of kinetic and potential energy in was swapped to match the computation states (position, then velocity).
  • The enums mjtStage and mjtDataType were added to specify the stage arguments of functions, and to handle spatial frame sensors that can be attached to objects with different MuJoCo type.
  • The "skip" versions of mj_forward() and mj_inverse() now have an additional flag to skip the (now automated) computation of sensors and energy.
XML and mjModel changes.
  • A new MuJoCo model element was added: a tuple. This is a user-defined list of MuJoCo objects, each with an optional scalar parameter. In the XML, the list is created by referencing the types and names of the desired objects. This can be helpful in user computations that operate on groups of objects - for example custom contact processing that needs a predefined pair of geoms or bodies.
  • The XML specification of joints now allows a new "springdamper" attribute. It has the same format as solref: time constant and damping ratio. When specified, the compiler will automatically compute the stiffness and damping coefficients of the joint, by taking into account the joint inertia in the model reference configuration. Only the stiffness and damping coefficients are stored in mjModel, as before.
  • The mass of the kinematic subtree rooted at each body is now precomputed by the compiler and stored in the new field mjModel.body_subtreemass.
  • The field mjMode.text_size was added, to match the other custom elements. Previously we relied on the 0-terminated strings to extract this information.
  • The enable flag "solverstat" was renamed to "fwdinv". It now enables the automated comparison of the forward and inverse dynamics, whose outcome is written in the renamed field mjData.solver_fwdinv.
mjData changes.
  • Added diagnostic fields maxuse_con and maxuse_efc, in addition to the now-renamed maxuse_stack. These fields are updated internally and contain the maximum stack allocation, maximum number of contacts and maximum number of scalar constraints since the last reset. They can be used to adjust the corresponding static allocations in the XML.
  • Added fields subtree_linvel and subtree_angmom, computed by mj_sensorVel(). These are the linear velocity and angular momentum of the kinematic subtree rooted at each body. They correspond to new sensor types. The existing field com_subtree was renamed to subtree_com to match the new convention.
  • All solver-related diagnostic fields now start with the prefix "solver_".
  • The array solver_trace is now populated automatically by all solvers. This is the norm of the residual gradient at each iteration of the algorithm. Note that this quantity does not have to decrease monotonically.
  • Removed the field mocaptime. This is now internal to MuJoCo HAPTIX because it does not make sense in the generic simulator.
  • Removed the sensor and energy timers (since these computations are too fast to be of interest in timing), and added a timer for inverse dynamics.
  • The field timer_ncall is now int instead of mjtNum.
API changes.
  • The default callback setting is now a NULL pointer, instead of requiring a dummy function that does nothing. The user can still provide dummy functions of course.
  • The callbacks mjcb_endstep and mjcb_magnetic were removed (the latter is superseded by the general mjcb_sensor).
  • The functions mj_objectVelocity and mj_objectAcceleration now support cameras in addition to geoms, bodies and sites. There is also the new object type mjOBJ_XBODY which refers to the regular frame of the body, as opposed to mjOBJ_BODY which refers to the inertial frame.
  • Added a utility function mju_standardNormal() which generates zero-mean unit-variance Gaussian random numbers. This is done by generating numbers with rand() and transforming them; so the user can seed this by seeding rand(). This new function is used to generate sensor noise when enabled.
  • Added pose transformation functions mju_poseXXX. A pose is a translation plus a rotation, in the sense of OpenGL, but using quaternions instead of 3-by-3 matrices.
  • Added the function mj_resetDataKeyframe(). This does a reset and then sets the state from the specified keyframe.
  • The internal function mj_addContact() is now exposed. This allows the user to replace MuJoCo's pair-wise collision detection functions with a library of their choice.
  • The function mju_mat2quat() and its analog used by the compiler now support all cases of the conversion. Previously it would generate an error if the trace of the matrix was negative.
  • Renamed mju_quatVec2Z() to mju_quatZ2Vec(), reversing a previous name change that was in fact inaccurate.
  • Several functions declared in mujoco.h were not exposed by the library; now fixed.
  • Added enums mjtFont, mjtFontScale, mjtFramebuffer. These are needed to specify arguments of new functions, and avoid unnamed integer flags previously used in existing functions.
  • Added text strings for frame and labeling modes. This is now used in simulate.cpp to show the name of the selected mode instead of showing a number.
Miscellaneous bug fixes.
  • Site actuator transmissions now work correctly in local coordinates.
  • Camera targeting now works correctly.
  • The value of mjMAXCONPAIR was increased to 16. This is the maximum number of contact points between two geoms that any collision function is allowed to return. It turn out that the box-box collider can return more contacts than the previous limit of 8 (causing a crash), and custom collision functions may also want to return more contacts.
  • The s_solref and s_solimp fields of mjOption were not previously written to the XML when saving. Now fixed.
Code samples.
  • Simulate.cpp was enhanced in several ways; see documentation and code.
  • A new sample derivative.cpp was added. It illustrates how to use multi-threaded computation for finite-difference approximations, re-using as many results as possible and utilizing solver warm-starts properly.
  • A new sample record.cpp was added. It illustrates offscreen rendering and saving to a raw file, which can then be compressed/converted to a video file with a tool such as ffmpeg. The sample illustrates this in three ways: using an invisible window, using EGL to create a context without X11, and using OSMESA (the last two are Linux-specific). In all cases, it creates an offscreen buffer for rendering and does not rely on the window buffer even if available.
Documentation changes. In addition to being updated, the online documentation was reorganized as follows:
  • The Overview chapter was split into Overview and Computation.
  • The MuJoCo Pro chapter was split into Programming and Reference.
  • The Tutorial chapter (which was not really a tutorial anyway) was converted into a new "Clarification" section at the end of the new Overview chapter.
  • The Table of Contents did not seem useful and was removed. Use the links in the left panel instead.
  • Added support for 3D magnetometers. This includes the new sensor type 'magnetometer', the new field 'magnetic' in mjOption specifying the global magnetic flux, and the new callback mjcb_magnetic allowing custom magnetic field models to be implemented (e.g. dipoles).
  • Added actuator transmission type 'jointinparent'. For free and ball joints, this causes the rotation to be specified in the parent frame, as opposed to the child frame which is what 'joint' does. For hinge and slide joints there is no difference between 'jointinparent' and 'joint'.
  • All actuator-related callbacks now take mjModel, mjData and the actuator id as arguments, allowing the callback to access all model parameters.
  • The camera and light tracking modes have been renamed to make their meaning more clear. Now they are: 'fixed', 'track', 'trackcom', 'targetbody', 'targetbodycom'. Only the latter two modes use the 'target' attribute.
  • The solver warmstart mechanism was modified. Instead of computing constraint signatures and trying to match them between time steps, it now uses qacc from the previous time step and applies inverse dynamics to warm-start the constraint forces. The mjData field efc_signature is removed. The new mechanism leads to slightly faster convergence, and also consistent among all solvers.
  • The construction of contact impedance for pyramidal friction cones was modified to better match the underlying elliptic cone model, and also to take into account the parameter 'impratio'. The pyramidal and elliptic models now have matching impedance in friction dimensions. It is not possible to match both friction and normal dimensions, for mathematical reasons which will be explained elsewhere.
  • Ball joint limits were problematic - now fixed. The new model imposes a limit on the overall amount of rotation. Only the second range parameter is used to specify the limit. The first range parameter should be zero (now enforced by the compiler).
  • The API function mj_camlight was added, to compute the pose of the cameras and lights. Internally it is called after mj_comPos. This fixed a bug with jumping lights and cameras at initialization.
  • user_XXX default settings are now properly instantiated in all model elements. Previously they were ignored.
  • The activation mechanism was upgraded in support of the new 30-day free trial license which can be obtained online. This license is hardware-locked to a specific Computer id.
  • New mechanism for exchanging electronic certificates, allowing user code to demonstrate to a remote server that the user has a valid MuJoCo Pro license. This will be used in future online services. The new API functions are mj_certQuestion, mj_certAnswer, mj_certCheck.
  • Cycling over frame rendering and label rendering modes added to simulate.cpp. The new shortcuts are F6 and F7.
  • Drag-and-drop of urdf models supported in simulate.cpp. Help text in compile.cpp corrected to say 'compile' instead of 'convert'; the latter is a built-in Windows function.
  • The software distribution now has a directory structure: bin, doc, include, model, sample.
  • The software version number is now incorporated in the name of the library: mujoco130.dll instead of mujoco.dll. The symbol mjVERSION_HEADER is defined in mujoco.h, allowing comparison of the header and library version:
    if( mjHEADER_VERSION==mj_version() ) ...
    The version numbers are now integers: 130 instead of 1.30, to avoid floating-point comparison complications. This is part of a transition to a new distribution model where multiple software versions will be available for download, facilitating use of older versions while helping avoid version conflicts.
  • A new code sample compile.cpp was added. It acts as a command-line compiler for model conversion. All possible conversions are exposed.
  • Hardware locking for Trial licenses was implemented. We can now generate personal trial activation keys. Previously trials were limited to institutions because locking to a specific machine was not supported.
  • The activation mechanism was upgraded to make sure that each activation key can unlock software versions that are released roughly one year before to one year after the key is issued. This is another part of the transition to facilitating use of older versions.
  • We now use the Clang compiler on OSX, because the necessary runtime libraries are pre-installed and up to date (unlike GCC which has limited support on OSX). We still use GCC on Linux, and Visual Studio on Windows.
  • mj_loadXML now supports URDF model files in addition to MJCF model files. The file extension can be either '.urdf' or '.xml', however the file format is determined by the top-level element ('robot' or 'mujoco') rather than the file extension. Note that mj_saveXML still saves in MJCF even if the model was loaded from URDF.
  • mj_loadXML now has the additional argument 'xmlstring'. If this argument is not NULL, the model is loaded from the specified memory string and the 'filename' argument is ignored.
  • A new sparse solver was added, based on preconditioned conjugate gradient descent. It supports both pyramidal and elliptic friction cones ('CG' and 'CGelliptic'). This solver is experimental for now, but shows a lot of promise. The keywords for the remaining solvers were adjusted.
  • A new 'tolerance' parameter was added to mjOption and affects all solvers. It causes early termination when the relative norm of the residual gradient (of the quantity being minimized by the solver) falls below this parameter. The 'iterations' parameter now corresponds to the maximum number of iterations and is rarely reached. This new mechanism yields a substantial increase in average simulation speed.
  • The 'solverstat' field of mjData now contains the number of iterations, residual gradient norm at termination, and comparisons between forward and inverse dynamics when the 'solverstat' enable flag is set. These numbers are now printed in the info text in simulate.cpp.
  • A new 'impratio' parameter was added to mjOption. It determines the ratio of constraint impedance in frictional vs. normal contact dimensions. Increasing this parameter above its default value of 1 makes contact friction 'harder' than contact normal forces.
  • A safety feature was added, internally setting solref[0] = max(solref[0], 2*timestep). It prevents integrator instabilities that were previously caused when the constraint recovery time constant solref[0] was small relative to the simulation time step. This new mechanism can be disabled with the 'saferef' disable flag.
  • New sensor types were added: 'sitepos' and 'sitequat'. They can be used to model the output of motion capture markers. The output of 'sitepos' is a 3D position and can be scaled (like all other sensors). The output of 'sitequat' is a 4D quaternion and cannot be scaled.
  • The simulation of touch sensors was improved in situations where softness causes the contact point to penetrate so much that it moves out of the touch sensor zone. The contact point is now projected on the sensor zone, and this artifact is avoided.
  • New actuator transmissions were added, allowing actuation of ball joints, free joints and sites. The 'gear' parameter was generalized, so as to specify a 3D rotation axis for ball joints and a 6D wrench axis for free joints and sites. This allows modeling of jet engines, propellers, and other more complex transmission mechanisms.
  • The tolerance and iteration parameters of the MPR algorithm for mesh collisions were exposed as new fields of mjOption. Previously they were fixed internally. Adjusting these parameters may be needed for geoms with large aspect ratios.
  • Cameras and lights are no longer limited to being fixed to their parent body. Four new modes are implemented: 'trackbody', 'trackcom', 'targetbody' and 'targetcom', together with a 'target' parameter for specifying the target body. Tracking refers to keeping global orientation fixed while maintaining fixed global offset from the parent body (or center of mass of the kinematic subtree starting at the parent body). Targeting refers to rotating the camera/light to point at the target body, while moving with the parent body.
  • Cameras and lights can now be visualized, similar to joints and other decor elements. The new keyboard shortcuts are 'Q' and 'Z'. Camera and light frames can also be visualized. The constants mjFRAME_CAMERA and mjFRAME_LIGHT were added, and the new constant mjNFRAME is the number of frame types that can be visualized.
  • The attribute 'texscale' was renamed to 'texrepeat', and now correctly specifies the number of times the texture is repeated over the (z-facing side of the) object. If 'texuniform' is true, 'texrepeat' specifies how many times the texture is repeated over one spatial unit, independent of the object size. The center of the texture now always coincides with the center of the object, regardless of the number of repetitions.
  • The API functions mjr_uploadMesh and mjr_uploadHField were added. They can be used to modify a mesh or height field in mjModel and re-upload it to the GPU at runtime, without re-creating the custom rendering context. Previously this was only possible for textures via mjr_uploadTexture.
  • The API function mjr_lines was added, allowing 2D plots to be rendered in a user-specified viewport over the 3D rendering.
  • The 'flg_init' argument of mjr_rectangle was removed. Now the 2D rendering options are initialized internally for every call.
  • Added functions mj_resetDataDebug, mjr_getError, mju_sqrMatTD; renamed mju_quatZ2Vec to mju_quatVec2Z.
  • Changed all enum-type arguments in mujoco.h from mjtXXX to int. This is because enums do not have a well-defined integer type and different compilers can in principle implement them with different number of bits.
  • When possible, moved the mjNXXX size-related constants into the corresponding enum definitions (as the last item) so that their values are automatically adjusted when changes are made.
  • Added the length of the error string buffer as argument to all API functions that expect this buffer.
  • For consistency with the new error string arguments, the order of the 'szbuffer' and 'buffer' arguments to mj_loadModel and mj_saveModels was reversed.
  • mju_error now writes the error messages at the end of MUJOCO_LOG.TXT even if a user error handler is installed.
  • Error and warning messages are now more informative. In particular, warnings now contain the index of the offending DOF or the size of the insufficient buffer. A new field 'warning_info' is added to mjData, which contains this new information.
  • The total mass of all bodies in the model is now included when the model is saved as plain text file. This can be useful for deciding whether to scale the body masses.
  • A number of bugs were fixed, including incorrect rendering of frictionless contact forces, margin handling in broadphase collisions, writing of default sizes in XML, random texture generation, 2D texture mapping.
  • The Overview and MJCF Models chapters in the documentation are now complete and up to date, and correspond to the latest version of the software. We will keep them up to date with future releases.
  • A new code sample was added: test.cpp. It is a command-line tool that simulates a model for specified duration and print various statistics. It also performs end-to-end unit testing of the parser and compiler; if you see discrepancies greater than 1e-4 please let us know.
  • The libglfw.3.dylib library on OSX can now be used from the executable directory (we got rid of the absolute paths that are normally embedded in dynamic libraries on OSX).
  • Joint and tendon equality constraints are now 4th-order polynomials instead of 3rd-order. The length of the coefficient vector "polycoef" is now enforced by the parser.
  • Rotational torques due to material density are now included in the passive forces.
  • A number of defaults were adjusted; see MJCF Models chapter for current values. These are njmax, nconmax, nstack, coordinate, camera ipd, various colors, joint pos and axis, geom and site type, geom and site size, tendon width, solimp.
  • The IMU sensor was split into accelerometer and gyro. Similarly, the FT sensor was split into force and torque. The latter are now defined through a site rather than a body. The outputs of all sensors can now be scaled (so as to change units).
  • The XML element "flags" was renamed to "flag" to make it consistent with our naming convention. The attribute "tau" of element "cylinder" was renamed to "timeconst". Internally, the mjModel field "actuator_trnprm" was split into "actuator_gear" and "actuator_cranklength". The visual fields "near" and "far" were renamed to "znear" and "zfar" to avoid name conflicts on Windows.
  • The number of keyframes allocated in the model is now the maximum of the number of explicitly defined keyframes, and the "key" attribute of "size".
  • Some changes were made in the rendering: skyboxes are now rendered as solid even in wireframe mode, only the first reflective surface is now rendered as such (to avoid artifacts due to the lack of ray-tracing), local rgba specifications now override material properties.
  • Several parsing and compilation rules were changed, to improve the logic and internal consistency. We do not list them here but the changes will be obvious if an older model fails to load.
  • Multiple bugs were fixed.
  • MuJoCo Pro now has a built-in activation manager and requires an activation key. This is a plain text file which will be sent to licensed users. Add "mj_activate(filename);" before calling any other MuJoCo functions. At the end call "mj_deactivate();" to free the memory allocated for activation data. See updated simulate.cpp for an example.
  • mjfCallback was renamed mjfGeneric, because many of the generic MuJoCo functions have the same format.
  • Plane geoms are no longer allowed in sites.
  • The software distribution now includes the OSX version, in addition to the Windows and Linux versions.
  • The texture mapping mechanism is substantially extended and improved. This includes procedural textures, explicit control over 2d vs cube textures, loading of cube textures from separate as well as composite PNG files, mip-mapping, additional scaling options, built-in mesh generation that results in better texture mapping.
  • A number of rendering artifacts were fixed. This includes shadow artifacts on transparent surfaces (which are no longer shaded) as well as glowing objects (as in the the selected object), and issues with directional lights.
  • Added support for fog as well as more systematic skybox rendering. Note that fog usually hides the skybox so there is no point enabling both. By default fog is disabled and skybox is enabled.
  • Added a "statistic" element to the XML, allowing override of the default model statistics - which in turn affect the scaling of various visual elements.
  • Several changes were made to the XML convention in an effort to streamline and finalize it. The material default rgba is now (1,1,1,1) which is suitable for texture mapping. The compiler option "strippath" is now disabled by default. The type of geoms and sites is now required. Plane and hfield geoms are now only allowed in the world body. Positive mass and inertia are no longer required for bodies welded to the world. The experimental CIO mechanism was removed (it will be replaced with a more general mechanism later).
  • The top-level body is now called "worldbody". All bodies under it are still called "body".
  • Several XML elements and attributes were renamed: ft to forcetorque, act-motor to motor (and similarly for the other actuator defaults), islimited to limited, disable flag friction to frictionloss. The makeactuator and actuatorclass atributes of tendons were removed (they were not being used).
  • Moved the call to mj_warning after the call to mj_checkXXX, so that if the simulation becomes unstable and is reset, the warning will not be cleared by the reset function.
  • Added fields to mjxmacro.h to facilitate development of MEX and other wrappers.
  • Tabs in header files were replaced with 4 spaces.
  • Fixed parsing bug in geom and site sizes. Now a geom or site-specific size definition fully overrides the default definition, even if the default has longer array size.
  • Constraint solver parameters have been redefined and scaled better. Instead of solprm we now have solref and solimp, as well as solmix for geoms.
  • Added callbacks mjcb_sol_ref and mjcb_sol_imp which can override the default interpretation of the new solref and solimp parameters, and thereby modify the behavior of the constraint model.
  • Added "Solverstat" option which runs inverse dynamics after forward dynamics in mj_step, and compares the results. This can be used to monitor solver convergence.
  • Added specialized collision functions (courtesy of Svet Kolev) for box-sphere, box-capsule and box-box. The latter allows more stable box stacking, at the expense of generating extra contacts. Use the new "Boxconvex" option to revert to the convex box-box collider which returns a single contact.
  • Geoms, sites and tendons can now be made invisible by setting alpha=0; previously this made the object invisible but did not remove its reflection.
  • Additional contact pruning and code refinements made the solver faster, up to 30% for large models.
  • Constraints that do not affect any DOFs are now filtered out. This avoids solving for constraint forces that cannot affect the simulation (e.g. length limits on tendons connecting stationary bodies).
  • Local coordinates are now the default in the XML. Use coordinate="global" in the compiler section to define models in global coordinates.
  • xfrc_applied now contains force followed by torque for each body; previously it was the other way around.
  • mj_step no longer clears xfrc_applied, meaning that xfrc_applied can now be used as persistent user input, just like ctrl and qfrc_applied.
  • mj_sensor and mj_energy are now called outside mj_forward and mj_inverse, so user code should call them directly if needed for custom computations. mj_sensor now calls mj_rnePostConstraint to compute cacc, cfrc_int, cfrc_ext - which are features that are not needed in the main computation. Apart from the semantic improvement, this makes the RK4 integrator generate correct sensor readings.
  • XML files can now have repeated sections, allowing model files to be merged using the include element.
  • All fields of mjVisual (i.e. the visualization options which are part of mjModel) are now exposed in the XML.
  • The XML keywords for setting option bitflags are now enable/disable instead of true/false.
  • mj_loadXML and mj_saveXML are now protected by an internal mutex and are thread-safe.
  • Abstract visualization objects (geoms and lights) organized into new structure mjvObjects.
  • New fields in mjVisual to control the near and far clipping planes and size of the offscreen rendering buffer.
  • Functions for extended access to the OpenGL buffers, including depth map rendering as illustrated in the updated simulate.cpp.
  • Bug fixes in the processing of size parameters of height fields and sites. Height field sizes are now defined in the asset section and not in the referencing geom, and include a new "base" size parameter.
  • Height fields can now be loaded from PNG files in addition to the custom format. For collision purposes they are treated as a union of prisms, including the bottom part of the prisms.
  • Planes and boxes are now rendered as multiple quads, improving lighting calculations and wireframe rendering.
  • The positive Z axis of boxes can now be made reflective by using a reflective material. Note however that each reflective surface adds an entire rendering pass - so use reflective materials only when needed.
  • 2D texture mapping is now allowed for planes and heightfields, in addition to cube texture mapping for all other shapes. A new "texscale" field in material determines the 2D texture scaling. The first texture loaded can be used as a skybox.
  • Fixed bug in IMU simulation. The acceleration component was previously missing a term quadratic in the angular velocity.
  • The inertial element now requires the pos attribute.
  • Renamed efc_A, fc_A, e_Achol to efc_AR, fc_AR, e_ARchol respectively, because these matrices have the R matrix added to them.
1.017/20/2015First official release.


VersionDateChange list
1.408/22/2016 DARPA HAPTIX TEAMS: The models used in the Bake-off behave the same as before, so it it safe to upgrade. This version adds convenience features, as well as new modeling, simulation and visualization features which the Bake-off models do not depend on. Even if you choose not to upgrade, you can still take advantage of the new playlog.exe utility described below.
  • A command-line utility playlog.exe was added to the program directory. This is a standalone player for log files. It does not require MATLAB or MuJoCo HAPTIX. See updated documentation.
  • Automatically-generated log file names now contain the name of the MuJoCo model (which may be different from the model file name) with the suffix '_XXX.mjl' where XXX are increasing integers. There is no longer need to delete log files and open room for new ones. The log file format is the same as before, and both the old MATLAB player and the new standalone player can play them.
  • Stereoscopic visualization with head tracking now works properly in windowed mode (before it only worked in full-screen mode). When moving the window around the screen, and model behaves as if it is glued to the screen and is being viewed through a moving aperture.
  • The maximum number of geoms that can be rendered per frame was increased from 1000 to 5000. This is the size of a preallocated buffer which now allows larger models to be rendered.
  • When the option 'fwdinv' is enabled in a given model, the info text now shows the difference between the outputs of the forward and inverse dynamics, in log10 units. Small numbers indicate good solver convergence.
  • The sensor model description available in mjInfo over the socket API now contains new information: data type, object type and sensor noise. See updated engine documentation for details.
  • Mouse perturbations have been fine-tuned and work more consistently. Rotational perturbations with the mouse are now stronger and more useful.
  • New items were added in the Options and Render dialogs to match changes in the engine. This includes contact force labeling: the magnitude of each contact force can now be printed at the base of each arrow (assuming arrow visualization is enabled).
  • Multiple engine-level changes were made, see MuJoCo Pro changelist.
  • File Open dialog and drag-and-drop functionality now support urdf models (which can have extension .xml or .urdf).
  • New items added in the Options dialog to match changes in the engine.
  • Multiple engine-level changes, see MuJoCo Pro changelist.
  • Added data recording capability. Pressing the new Record button on the Toolbar will create a new log file in the datalog directory, and start recording data until the button is pressed again or the model is re-loaded. For each timestep, the data contains the simulation time, joint positions, velocities, mocap data, controls, and simulated sensor data. The data file is in a custom binary format.
  • A new option was added in the Sim dialog, specifying how often data is saved to the log file. The default setting of 1 means that each timestep is saved. Larger values correspond to sub-sampling.
  • New MATLAB functions readlog.m and playlog.m were added in the apimex directory. They can be used to load the custom binary log file in the MATLAB workspace, and then play the animation. Playback is implemented over the socket interface, using the simulator (in paused mode) for rendering.
  • The effective API update rate now corresponds to the setting of 'apirate' in mjOption. Previously it was 1 msec longer than specified.
  • The new fields of mjOpion were added to the corresponding dialog. See MuJoCo Pro change list for details.
  • The contact forces transmitted over the socket interface now correctly take into account the type of friction cone (pyramidal vs elliptic).
  • Changing the fields of the Option dialog while the simulation is paused now triggers an update, so that the rendering matches the modified options.
  • Zooming during a mouse perturbation used to cause an error; now fixed.
  • The info text in the lower-left corner is extended with new fields.
  • Keyboard shortcuts 'Q' and 'Z' for rendering of cameras and lights were added.
  • The built-in help was updated with the new controls and shortcuts, and some missing information was added.
  • Numerous improvements were made on the engine level; see MuJoCo Pro change list.
  • Added support for velocity servos in the simple API, through the hxCommand fields ref_vel and gain_vel. See updated documentation.
  • Added Print Data menu item in the file menu. It prints the entire workspace in the file MJDATA.TXT which can be used for model debugging.
  • Relaxed the model requirements for using the simple API. Instead of generating size-related errors, the API now returns whatever data it can.
  • Fixed bug in model loading, which was causing controls from the previous model to be applied to the new model.
  • Previous MPL models will not load in this version, due to changes in the XML format. Use the updated MPL model collection included in the software distribution.
  • Multiple improvements and bug fixes in the physics engine, visualizer, XML format and online documentation; see MuJoCo Pro release notes.
  • Added support for Motive 1.8.0 in addition to 1.7.2 (and hopefully everything in between). Note that earlier versions of MuJoCo HAPTIX do not work with Motive 1.8.0 due to changes in the Motive DLL.
  • The MEX file is now linked with the Visual Studio static libraries, so that a redistributable does not need to be installed on systems without Visual Studio. This issue was fixed in version 1.01 but was accidentally broken again in 1.10. Now it is fixed again, and should remain fixed. The MEX is compiled with MATLAB R2015b.
  • Additional MPL scenes were added to the model library. All scenes now have improved visualization, taking advantage of new rendering features.
  • Improved the formatting in the XML schema summary shown in the help dialog.
  • Added dialog options for new engine features.
  • Fixed a bug in zooming while in headtracking mode - which previously made it possible to reverse the image.
  • Multiple engine-level improvements and bug-fixes; see above. Note that some of the engine changes affect the XML model format. See new model library.
  • More flexible XML include mechanism now allows robot models to be included in scenes; see new collection of scenes.
  • Extended API calls for controlling appearance: mj_get_rgba, mj_set_rgba. These supersede mj_rgba.
  • New API calls for extended access to individual bodies: mj_get_onebody, mj_set_onebody.
  • New API calls for access to applied forces: mj_get_applied, mj_set_applied.
  • More intuitive breakdown of generalized forces in mj_get_force.
  • The GUI now remains responsive even if the model cannot be simulated in realtime.
  • Removed the desired realtime factor setting; it is now always 1.
  • Changes in the Physics Settings dialog reflecting new solver parameterization and optional features.
  • New button in Slider Control dialog which sets all controls to 0.
  • Enabling the new optional features Solverstat and Energy displays the corresponding data in the Info box.
  • Bug fixes in mj_equality.m.
  • Improvements and bug fixes in the physics engine, visualizer and XML format; see MuJoCo Pro release notes.
  • Bug fixes in mj_get_mocap and mj_set_mocap.
  • New Native API providing more complete access to the simulator. This can be mixed with the older Simple API which is still available.
  • Left and right-handed MPL models, and scenes corresponding to a subset of the SHAP suite. Edit the "include" element in MPL.xml to change the scene. See manipulation.mp4.
  • Documentation of MuJoCo Sim and MuJoCo HAPTIX has been merged. To run MuJoCo HAPTIX in "Sim" mode, i.e. without motion capture, call it with the command-line argument -nomocap.
  • Visual Studio runtime library statically linked in mex, so that MATLAB users without a Visual Studio installation no longer have to install the redistributable.
  • Various engine-level improvements and bug fixes, including the timing bug observed after long simulation.
0.983/4/2015First official release.