Merge branch 'main' of https://github.com/google-deepmind/mujoco into feature/unity-hmap-dyn

Merge with main to keep branch up to date
This commit is contained in:
Bálint Hodossy
2023-12-21 11:45:49 +00:00
81 changed files with 1563 additions and 706 deletions
@@ -37,7 +37,7 @@ public class MujocoBinaryRetriever {
if (AssetDatabase.LoadMainAssetAtPath(mujocoPath + "/mujoco.dylib") == null) {
File.Copy(
"/Applications/MuJoCo.app/Contents/Frameworks" +
"/mujoco.framework/Versions/Current/libmujoco.3.0.2.dylib",
"/mujoco.framework/Versions/Current/libmujoco.3.1.2.dylib",
mujocoPath + "/mujoco.dylib");
AssetDatabase.Refresh();
}
@@ -45,7 +45,7 @@ public class MujocoBinaryRetriever {
if (AssetDatabase.LoadMainAssetAtPath(mujocoPath + "/libmujoco.so") == null) {
File.Copy(
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) +
"/.mujoco/mujoco-3.0.2/lib/libmujoco.so.3.0.2",
"/.mujoco/mujoco-3.1.2/lib/libmujoco.so.3.1.2",
mujocoPath + "/libmujoco.so");
AssetDatabase.Refresh();
}
+6 -4
View File
@@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#if UNITY_EDITOR
using System;
using UnityEditor;
using UnityEngine;
@@ -23,7 +22,7 @@ namespace Mujoco {
// and left mouse drag will apply a force on the body. Holding shift down will change the applied
// force direction between World XZ plane and Y[camera-up].
[CustomEditor(typeof(MjBody))]
[CustomEditor(typeof(MjComponent), true)]
public class MjMouseSpring : Editor {
private bool _lastShiftKeyState = false;
@@ -102,7 +101,11 @@ namespace Mujoco {
return;
}
MjBody body = target as MjBody;
var targetObject = target as MjComponent;
MjBody body = targetObject.GetComponentInParent<MjBody>();
if(!body)
return;
Vector3 bodyPosition =
body != null ? body.transform.position : Vector3.zero;
var scene = MjScene.Instance;
@@ -188,4 +191,3 @@ namespace Mujoco {
}
}
}
#endif
@@ -22,7 +22,7 @@ namespace Mujoco {
[CustomEditor(typeof(MjShapeComponent), true)]
[CanEditMultipleObjects]
public class MjShapeComponentEditor : Editor {
public class MjShapeComponentEditor : MjMouseSpring {
public override void OnInspectorGUI() {
+10 -5
View File
@@ -108,7 +108,7 @@ public const int mjMAXLINEPNT = 1000;
public const int mjMAXPLANEGRID = 200;
public const bool THIRD_PARTY_MUJOCO_MJXMACRO_H_ = true;
public const bool THIRD_PARTY_MUJOCO_MUJOCO_H_ = true;
public const int mjVERSION_HEADER = 302;
public const int mjVERSION_HEADER = 312;
// ------------------------------------Enums------------------------------------
@@ -191,10 +191,11 @@ public enum mjtGeom : int{
mjGEOM_ARROW1 = 101,
mjGEOM_ARROW2 = 102,
mjGEOM_LINE = 103,
mjGEOM_FLEX = 104,
mjGEOM_SKIN = 105,
mjGEOM_LABEL = 106,
mjGEOM_TRIANGLE = 107,
mjGEOM_LINEBOX = 104,
mjGEOM_FLEX = 105,
mjGEOM_SKIN = 106,
mjGEOM_LABEL = 107,
mjGEOM_TRIANGLE = 108,
mjGEOM_NONE = 1001,
}
public enum mjtCamLight : int{
@@ -301,6 +302,7 @@ public enum mjtObj : int{
mjOBJ_TUPLE = 23,
mjOBJ_KEY = 24,
mjOBJ_PLUGIN = 25,
mjNOBJECT = 26,
}
public enum mjtConstraint : int{
mjCNSTR_EQUALITY = 0,
@@ -6093,6 +6095,7 @@ public unsafe struct model {
public int nnames;
public int npaths;
public int nsensordata;
public int narena;
public mjOption_ opt;
public mjVisual_ vis;
public mjStatistic_ stat;
@@ -6285,6 +6288,7 @@ public unsafe struct data {
public int* wrap_obj;
public double* ten_length;
public double* wrap_xpos;
public double* bvh_aabb_dyn;
public byte* bvh_active;
public int* island_dofadr;
public int* island_dofind;
@@ -6294,6 +6298,7 @@ public unsafe struct data {
public double* flexvert_xpos;
public mjContact_* contact;
public double* efc_force;
public void* arena;
}
[StructLayout(LayoutKind.Sequential)]
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "org.mujoco",
"displayName": "MuJoCo",
"version": "3.0.2",
"version": "3.1.2",
"description": "MuJoCo importer and runtime plug-in",
"dependencies": {},
"author": {