diff --git a/config/cabin_robot.xml b/config/cabin_robot.xml
index 9626b78a..e1ae7e45 100644
--- a/config/cabin_robot.xml
+++ b/config/cabin_robot.xml
@@ -32,47 +32,44 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
diff --git a/data/planner/traj.csv b/data/planner/traj.csv
index 69ca8650..9a6f834b 100644
--- a/data/planner/traj.csv
+++ b/data/planner/traj.csv
@@ -1,134 +1,110 @@
t,q1,qd1,qdd1
0.0000000000,0.0000000000,0.0000000000,0.0000000000
-0.0100000000,0.0000406839,0.0150597278,2.9544225473
-0.0200000000,0.0003318988,0.0434389689,2.8328411544
-0.0300000000,0.0009089804,0.0721925912,2.9085974602
-0.0400000000,0.0017753841,0.1011555878,2.9788370387
-0.0500000000,0.0029332621,0.1304223336,2.8974621431
-0.0600000000,0.0043835776,0.1596780532,2.9849342393
-0.0700000000,0.0061276028,0.1891399125,2.9436385788
-0.0800000000,0.0081659118,0.2185494408,2.9100229391
-0.0900000000,0.0104989150,0.2480391312,2.9903919563
-0.1000000000,0.0131273068,0.2776386486,2.9710319107
-0.1100000000,0.0160514180,0.3072295680,2.9553609553
-0.1200000000,0.0192715028,0.3368228958,2.9429784390
-0.1300000000,0.0227878085,0.3664259693,2.9333976058
-0.1400000000,0.0266005752,0.3960787191,2.9965532367
-0.1500000000,0.0307100762,0.4257870931,2.9893875915
-0.1600000000,0.0351164853,0.4555002329,2.9835420444
-0.1700000000,0.0398199454,0.4852198851,2.9788128547
-0.1800000000,0.0448205874,0.5149470456,2.9750155809
-0.1900000000,0.0501185300,0.5446821560,2.9719877241
-0.2000000000,0.0557138798,0.5744252584,2.9695884669
-0.2100000000,0.0616067323,0.6041761124,2.9676970254
-0.2200000000,0.0677971720,0.6339342832,2.9662104321
-0.2300000000,0.0742852736,0.6636992056,2.9650411835
-0.2400000000,0.0810711022,0.6934702307,2.9641149689
-0.2500000000,0.0881547141,0.7232466591,2.9633685823
-0.2600000000,0.0955361574,0.7530277630,2.9627480494
-0.2700000000,0.1032154722,0.7828128015,2.9622069731
-0.2800000000,0.1111926914,0.8126010294,2.9617050786
-0.2900000000,0.1194678407,0.8423917022,2.9612069361
-0.3000000000,0.1280409386,0.8721840779,2.9606808319
-0.3100000000,0.1369119973,0.9019774156,2.9600977635
-0.3200000000,0.1460810222,0.9317709736,2.9594305320
-0.3300000000,0.1555480123,0.9615640043,2.9586529089
-0.3400000000,0.1653129605,0.9913614506,2.9994436646
-0.3500000000,0.1753758533,1.0211579226,2.9987759136
-0.3600000000,0.1857366703,1.0509520895,2.9980466764
-0.3700000000,0.1963953845,1.0807433647,2.9972296032
-0.3800000000,0.2073519622,1.1105311329,2.9962959464
-0.3900000000,0.2186063626,1.1403147437,2.9952138015
-0.4000000000,0.2301585380,1.1700935028,2.9939472846
-0.4100000000,0.2420084329,1.1998666617,2.9924556275
-0.4200000000,0.2541559844,1.2296334033,2.9906921714
-0.4300000000,0.2666011211,1.2593928252,2.9886032370
-0.4400000000,0.2793437633,1.2891439183,2.9861268471
-0.4500000000,0.2923838217,1.3188855399,2.9831912740
-0.4600000000,0.3057211976,1.3486163807,2.9797133785
-0.4700000000,0.3193557814,1.3783349239,2.9755967043
-0.4800000000,0.3332874520,1.4080393945,2.9707292859
-0.4900000000,0.3475160759,1.4377276969,2.9649811176
-0.5000000000,0.3620415055,1.4673973379,2.9582012286
-0.5100000000,0.3768520933,1.4935024462,2.3994624602
-0.5200000000,0.3918443109,1.5001292329,-0.0473926375
-0.5300000000,0.4068455345,1.5000904478,-0.0558181019
-0.5400000000,0.4218466876,1.5000544796,-0.0617672439
-0.5500000000,0.4368477831,1.5000228970,-0.0657945138
-0.5600000000,0.4518488328,1.5000034924,0.0646808468
-0.5700000000,0.4668498542,1.5000225620,0.0580673577
-0.5800000000,0.4818508530,1.5000357501,0.0528981018
-0.5900000000,0.4968518295,1.5000446841,0.0489129125
-0.6000000000,0.5118527850,1.5000505493,0.0458984781
-0.6100000000,0.5268537219,1.5000542156,0.0436792658
-0.6200000000,0.5418546430,1.5000563308,0.0421099146
-0.6300000000,0.5568555514,1.5000573907,0.0410687802
-0.6400000000,0.5718564501,1.5000577910,0.0404523670
-0.6500000000,0.5868573425,1.5000578650,0.0401704239
-0.6600000000,0.6018582318,1.5000579132,0.0401415090
-0.6700000000,0.6168591213,1.5000582237,0.0402888495
-0.6800000000,0.6318600142,1.5000590879,0.0405363350
-0.6900000000,0.6468609138,1.5000608096,0.0408044882
-0.7000000000,0.6618618236,1.5000637088,0.0410062532
-0.7100000000,0.6768627471,1.5000681192,0.0410424371
-0.7200000000,0.6918636881,1.5000743763,0.0407966178
-0.7300000000,0.7068646509,1.5000827939,0.0401293113
-0.7400000000,0.7218656402,1.5000936245,0.0388711525
-0.7500000000,0.7368666615,1.5001069976,0.0368147988
-0.7600000000,0.7518677212,1.5001228260,0.0337052009
-0.7700000000,0.7668688267,1.5001406711,0.0292278068
-0.7800000000,0.7818699858,1.5001595500,0.0229941581
-0.7900000000,0.7968712072,1.5001776641,0.0145242063
-0.8000000000,0.8118724982,1.5001920227,0.0032245014
-0.8100000000,0.8268408076,1.4875275785,-2.4236229211
-0.8200000000,0.8415850092,1.4600455429,-2.9763843157
-0.8300000000,0.8560369100,1.4303603856,-2.9821334464
-0.8400000000,0.8701919621,1.4006590026,-2.9869477296
-0.8500000000,0.8840500235,1.3709435235,-2.9909698326
-0.8600000000,0.8976109653,1.3412157309,-2.9943223520
-0.8700000000,0.9108746707,1.3114771308,-2.9971106438
-0.8800000000,0.9238410335,1.2817290081,-2.9994252697
-0.8900000000,0.9365099596,1.2519856123,-2.9516661304
-0.9000000000,0.9488813661,1.2222373806,-2.9548394352
-0.9100000000,0.9609551735,1.1924800852,-2.9575790728
-0.9200000000,0.9727313111,1.1627149317,-2.9599417699
-0.9300000000,0.9842097169,1.1329430086,-2.9619771266
-0.9400000000,0.9953903367,1.1031653091,-2.9637287294
-0.9500000000,1.0062731238,1.0733827485,-2.9652351488
-0.9600000000,1.0168580392,1.0435961801,-2.9665308469
-0.9700000000,1.0271450505,1.0138064072,-2.9676470105
-0.9800000000,1.0371341323,0.9840141940,-2.9686123313
-0.9900000000,1.0468252659,0.9542202743,-2.9694537486
-1.0000000000,1.0562184391,0.9244253592,-2.9701971713
-1.0100000000,1.0653136460,0.8946301430,-2.9708681970
-1.0200000000,1.0741108876,0.8648353085,-2.9714928442
-1.0300000000,1.0826101708,0.8350415301,-2.9720983147
-1.0400000000,1.0908115096,0.8052494763,-2.9727138063
-1.0500000000,1.0987149244,0.7754598102,-2.9733713929
-1.0600000000,1.1063204427,0.7456731880,-2.9741069935
-1.0700000000,1.1136280987,0.7158902540,-2.9749614500
-1.0800000000,1.1206379346,0.6861116337,-2.9759817342
-1.0900000000,1.1273500000,0.6563379202,-2.9772223010
-1.1000000000,1.1337643527,0.6265696561,-2.9787465964
-1.1100000000,1.1398810593,0.5968073062,-2.9806287192
-1.1200000000,1.1457001954,0.5670512198,-2.9829552013
-1.1300000000,1.1512218466,0.5373015791,-2.9858268288
-1.1400000000,1.1564461083,0.5075583300,-2.9893603321
-1.1500000000,1.1613730868,0.4778210896,-2.9936896219
-1.1600000000,1.1660028991,0.4480890268,-2.9989659697
-1.1700000000,1.1703356966,0.4184158210,-2.9408728463
-1.1800000000,1.1743716794,0.3887671793,-2.9472841555
-1.1900000000,1.1781110347,0.3591305176,-2.9556079643
-1.2000000000,1.1815539662,0.3295023791,-2.9662283169
-1.2100000000,1.1847006925,0.2998771665,-2.9795424021
-1.2200000000,1.1875514414,0.2702465011,-2.9958998774
-1.2300000000,1.1901065598,0.2407521222,-2.9205021381
-1.2400000000,1.1923666133,0.2112921989,-2.9478052207
-1.2500000000,1.1943319553,0.1817988988,-2.9816509494
-1.2600000000,1.1960030174,0.1524407057,-2.8915887933
-1.2700000000,1.1973809412,0.1231678311,-2.9572485748
-1.2800000000,1.1984662906,0.0939921512,-2.8580629729
-1.2900000000,1.1992609116,0.0648770893,-2.9932552277
-1.3000000000,1.1997676425,0.0364479401,-2.9790115923
-1.3100000000,1.1999870932,0.0078713741,-2.8408663580
-1.3175726744,1.2000000000,-0.0000000000,-0.0000000000
+0.0100000000,-0.0000159557,-0.0063777738,-1.9106392001
+0.0200000000,-0.0002496495,-0.0461350389,-4.8925174498
+0.0300000000,-0.0009799863,-0.1009783500,-5.7006022582
+0.0400000000,-0.0022807296,-0.1593365091,-5.9446327575
+0.0500000000,-0.0041699534,-0.2185817120,-5.9159701967
+0.0600000000,-0.0066533315,-0.2781414650,-5.9705725375
+0.0700000000,-0.0097336379,-0.3379378160,-5.9974845155
+0.0800000000,-0.0134121852,-0.3977883838,-5.9866809788
+0.0900000000,-0.0176896602,-0.4577119179,-5.9970097232
+0.1000000000,-0.0225665586,-0.5176710831,-5.9958021374
+0.1100000000,-0.0280431623,-0.5776536328,-5.9994155793
+0.1200000000,-0.0341196983,-0.6376542617,-5.9998355059
+0.1300000000,-0.0407961934,-0.6976428031,-5.9975948022
+0.1400000000,-0.0480724867,-0.7576129914,-5.9994877401
+0.1500000000,-0.0559484540,-0.8175781906,-5.9948813054
+0.1600000000,-0.0644239673,-0.8775223553,-5.9991411360
+0.1700000000,-0.0734989367,-0.9374685960,-5.9921968215
+0.1800000000,-0.0831732416,-0.9973926934,-5.9980487477
+0.1900000000,-0.0934468113,-1.0573180377,-5.9884990499
+0.2000000000,-0.1043195108,-1.1172260364,-5.9955305424
+0.2100000000,-0.1157912824,-1.1771239542,-5.9828859374
+0.2200000000,-0.1278619739,-1.2370190713,-5.9907608055
+0.2300000000,-0.1405315123,-1.2968780749,-5.9743209965
+0.2400000000,-0.1537997689,-1.3567629311,-5.9826547281
+0.2500000000,-0.1676665996,-1.4166118373,-5.9923074269
+0.2600000000,-0.1821319218,-1.4764412133,-5.9697616364
+0.2700000000,-0.1970596457,-1.5002473361,0.0171102264
+0.2800000000,-0.2120611169,-1.5001229872,-0.0936585266
+0.2900000000,-0.2270627160,-1.5001591883,0.0626046461
+0.3000000000,-0.2420638680,-1.5001494874,-0.0493634487
+0.3100000000,-0.2570652126,-1.5001168351,0.0601054870
+0.3200000000,-0.2720661740,-1.5001226497,-0.0429343553
+0.3300000000,-0.2870673191,-1.5001201883,0.0376000906
+0.3400000000,-0.3020681493,-1.5000681224,-0.0536751182
+0.3500000000,-0.3170691028,-1.5001264472,0.0082265532
+0.3600000000,-0.3320699393,-1.5000247482,0.0601852966
+0.3700000000,-0.3470706417,-1.5000970260,-0.0220756027
+0.3800000000,-0.3620714540,-1.5000937922,0.0202436733
+0.3900000000,-0.3770720959,-1.5000067263,-0.0509307278
+0.4000000000,-0.3920727217,-1.5000860034,-0.0153620262
+0.4100000000,-0.4070734099,-1.5000814991,0.0158196206
+0.4200000000,-0.4220739813,-1.5000096953,0.0433168602
+0.4300000000,-0.4370744971,-1.5000652115,-0.0197234398
+0.4400000000,-0.4520750926,-1.5000792039,0.0048924020
+0.4500000000,-0.4670756435,-1.5000418289,0.0272059475
+0.4600000000,-0.4820760839,-1.5000304960,-0.0291077061
+0.4700000000,-0.4970765865,-1.5000689907,-0.0084527266
+0.4800000000,-0.5120771137,-1.5000650107,0.0108023623
+0.4900000000,-0.5270775833,-1.5000230438,0.0289463322
+0.5000000000,-0.5420779858,-1.5000379628,-0.0229003696
+0.5100000000,-0.5570784597,-1.5000659848,-0.0053852033
+0.5200000000,-0.5720789504,-1.5000591832,0.0116064517
+0.5300000000,-0.5870793908,-1.5000189548,0.0282953124
+0.5400000000,-0.6020797808,-1.5000382186,-0.0217869758
+0.5500000000,-0.6170802457,-1.5000652898,-0.0051190608
+0.5600000000,-0.6320807334,-1.5000590120,0.0117371194
+0.5700000000,-0.6470811772,-1.5000183275,0.0289971921
+0.5800000000,-0.6620815779,-1.5000411362,-0.0221300068
+0.5900000000,-0.6770820652,-1.5000691816,-0.0043107723
+0.6000000000,-0.6920825806,-1.5000599565,0.0144703189
+0.6100000000,-0.7070830438,-1.5000094950,0.0344841461
+0.6200000000,-0.7220834921,-1.5000550755,-0.0204007575
+0.6300000000,-0.7370840458,-1.5000780803,0.0010977386
+0.6400000000,-0.7520846130,-1.5000518625,0.0246543532
+0.6500000000,-0.7670850940,-1.5000277946,-0.0362960678
+0.6600000000,-0.7820856746,-1.5000839673,-0.0101938888
+0.6700000000,-0.7970863370,-1.5000768918,0.0192059116
+0.6800000000,-0.8120869163,-1.5000079810,-0.0500617756
+0.6900000000,-0.8270875558,-1.5000937560,-0.0161395518
+0.7000000000,-0.8420883334,-1.5000899803,0.0230861013
+0.7100000000,-0.8570890000,-1.5000264122,-0.0561275847
+0.7200000000,-0.8720897997,-1.5001202617,-0.0085789842
+0.7300000000,-0.8870907129,-1.5000718602,0.0477346007
+0.7400000000,-0.9020914935,-1.5001047330,-0.0409993467
+0.7500000000,-0.9170925757,-1.5001292996,0.0312149063
+0.7600000000,-0.9320934962,-1.5000800883,-0.0699810062
+0.7700000000,-0.9470947367,-1.5001636089,0.0266269093
+0.7800000000,-0.9620958396,-1.5000957794,-0.0858124395
+0.7900000000,-0.9770973277,-1.5001775357,0.0497342643
+0.8000000000,-0.9920986393,-1.5001878235,-0.0674476188
+0.8100000000,-1.0071004195,-1.5000874072,0.1329867627
+0.8200000000,-1.0219392817,-1.4598649714,5.9855481837
+0.8300000000,-1.0362386361,-1.4000134628,5.9761092719
+0.8400000000,-1.0499395206,-1.3401551196,5.9954386163
+0.8500000000,-1.0630417494,-1.2802946681,5.9861781069
+0.8600000000,-1.0755452385,-1.2203987456,5.9782697343
+0.8700000000,-1.0874498709,-1.1605200735,5.9923908792
+0.8800000000,-1.0987555135,-1.1006126206,5.9851787314
+0.8900000000,-1.1094621009,-1.0407014354,5.9959626652
+0.9000000000,-1.1195694896,-0.9807796092,5.9898010161
+0.9100000000,-1.1290776208,-0.9208443071,5.9978168972
+0.9200000000,-1.1379863614,-0.8609046692,5.9930906392
+0.9300000000,-1.1462956389,-0.8009489668,5.9986985104
+0.9400000000,-1.1540053226,-0.7409868136,5.9960412019
+0.9500000000,-1.1611153106,-0.6810089169,5.9993530710
+0.9600000000,-1.1676254504,-0.6210160321,6.0002469001
+0.9700000000,-1.1735356080,-0.5610186206,5.9983480103
+0.9800000000,-1.1788458912,-0.5010412674,5.9984313020
+0.9900000000,-1.1835565264,-0.4410898752,5.9914009231
+1.0000000000,-1.1876678759,-0.3811931772,5.9988240228
+1.0100000000,-1.1911804273,-0.3213300729,5.9806076203
+1.0200000000,-1.1940950327,-0.2616201787,5.9451605548
+1.0300000000,-1.1964133597,-0.2020822778,5.9652439958
+1.0400000000,-1.1981383931,-0.1430012424,5.8369634669
+1.0500000000,-1.1992783791,-0.0854621410,5.4905248998
+1.0600000000,-1.1998598641,-0.0324705716,5.6308791939
+1.0700000000,-1.1999956445,-0.0024097970,0.9995966965
+1.0772269967,-1.2000000000,0.0000000000,0.0000000000
diff --git a/python/vision_servo/robot_warpper_test.py b/python/vision_servo/robot_warpper_test.py
index 90de3bb9..f4d26654 100644
--- a/python/vision_servo/robot_warpper_test.py
+++ b/python/vision_servo/robot_warpper_test.py
@@ -32,9 +32,10 @@ robot = Robot("/home/lgv/cmvr/cmvr-es/config/cabin_robot.xml", "hc01")
# js = robot.getJointQ('right')
# print(js)
# 控制左臂关节
+robot.calibrateZeroQ("R_WRIST_R")
robot.calibrateZeroQ("R_WRIST_Y")
-# robot.calibrateZeroQ("R_WRIST_R")
-time.sleep(3)
+time.sleep(1)
+print("--------------------------")
# robot.moveJ("right", [0.0, 0.0, 0.0, 0.0, 0.0,0.0, 0.0])
# # robot.moveJ("right", [-0.344938, 0.935147, 2.27031,1.68959, -2.32841,0.460145, 0.300996])
# robot.moveJ("right", [0.0, 0.0, 0.0, 0.0, 0.0,0.0, 0.0])
diff --git a/src/common/utils/math/support_functions.h b/src/common/utils/math/support_functions.h
index 0c3be07f..faaa6895 100644
--- a/src/common/utils/math/support_functions.h
+++ b/src/common/utils/math/support_functions.h
@@ -138,4 +138,66 @@ public:
Ti.block<3,1>(0,3) = -Rt * t;
return Ti;
}
+
+
+ static int calcLookahead(double qd_ref,
+ double qdd_ref,
+ double v_max,
+ double dt,
+ int n_min = 1,
+ int n_max = 5)
+ {
+ double v0 = std::abs(qd_ref);
+ double a = std::abs(qdd_ref);
+ double vmax = std::abs(v_max);
+
+ // 1) 已经在接近最大速度的匀速阶段:直接用 1 步
+ const double vel_sat_ratio = 0.95; // 95% vmax 就认为是全速段
+ if (v0 >= vel_sat_ratio * vmax) {
+ return 1;
+ }
+
+ // 2) 其他情况再用“加速 + 饱和”的那套公式
+ double s_target = vmax * dt;
+
+ if (v0 < 1e-6 && a < 1e-6) {
+ return n_min;
+ }
+
+ double tau = 0.0;
+
+ if (a < 1e-6) {
+ // 近似匀速:v0 * tau = s_target
+ tau = s_target / (v0 + 1e-6);
+ } else {
+ double A = 0.5 * a;
+ double B = v0;
+ double C = -s_target;
+
+ double disc = B * B - 4.0 * A * C;
+ if (disc < 0.0) disc = 0.0;
+ double sqrt_disc = std::sqrt(disc);
+
+ double tau_quad = (-B + sqrt_disc) / (2.0 * A);
+ double v_at_tau = v0 + a * tau_quad;
+
+ if (v_at_tau <= vmax + 1e-9) {
+ tau = tau_quad;
+ } else {
+ double t_sat = (vmax - v0) / a;
+ double s_sat = v0 * t_sat + 0.5 * a * t_sat * t_sat;
+
+ if (s_target <= s_sat) {
+ tau = std::min(tau_quad, t_sat);
+ } else {
+ tau = t_sat + (s_target - s_sat) / vmax;
+ }
+ }
+ }
+
+ int n = (int)std::ceil(tau / dt);
+ if (n < n_min) n = n_min;
+ if (n > n_max) n = n_max;
+ return n;
+ }
};
diff --git a/src/data_center/include/data_center.h b/src/data_center/include/data_center.h
index e17c1985..9375e932 100644
--- a/src/data_center/include/data_center.h
+++ b/src/data_center/include/data_center.h
@@ -21,11 +21,11 @@ namespace cmvr {
~DataCenter() {}
public:
- std::shared_ptr getMotorsInfo() const {
+ const MotorsInfo* getMotorsInfo() const {
return motors_info_;
}
private:
- std::shared_ptr motors_info_{nullptr};
+ MotorsInfo* motors_info_{nullptr};
};
}
diff --git a/src/data_center/include/motors_info.h b/src/data_center/include/motors_info.h
index d1aeb97a..56c2de04 100644
--- a/src/data_center/include/motors_info.h
+++ b/src/data_center/include/motors_info.h
@@ -31,9 +31,9 @@ namespace cmvr {
return &instance;
}
- void getJointsAngle(const std::vector &joints_name,std::unordered_map &joint_qs) const;
-
- void getJointsAngle(const std::vector &joints_name,std::vector &joint_qs) const;
+ bool getJointsQ(const std::vector &joints_name,std::unordered_map &joint_qs) const;
+ bool getJointsQ(const std::vector &joints_name,std::vector &joint_qs) const;
+ bool getJointsQ(std::unordered_map &joint_qs) const;
std::shared_ptr getMotorManager() const {
return motor_manager_;
diff --git a/src/data_center/src/data_center.cpp b/src/data_center/src/data_center.cpp
index c30dbba8..f5e532b2 100644
--- a/src/data_center/src/data_center.cpp
+++ b/src/data_center/src/data_center.cpp
@@ -8,6 +8,6 @@ using namespace cmvr;
DataCenter::DataCenter()
{
- motors_info_ = std::shared_ptr(MotorsInfo::getInstance());
+ motors_info_ = MotorsInfo::getInstance();
}
\ No newline at end of file
diff --git a/src/data_center/src/motors_info.cpp b/src/data_center/src/motors_info.cpp
index 051a5eda..4b6a087c 100644
--- a/src/data_center/src/motors_info.cpp
+++ b/src/data_center/src/motors_info.cpp
@@ -151,8 +151,9 @@ void MotorsInfo::init(const XmlNode &cfg) {
LOG(INFO) << "All enabled motors initialized successfully.";
}
-void MotorsInfo::getJointsAngle(const std::vector &joints_name,
+bool MotorsInfo::getJointsQ(const std::vector &joints_name,
std::unordered_map &joint_qs) const {
+ auto res{true};
joint_qs.clear();
for (auto &name: joints_name) {
auto motor = motor_manager_->getMotor(name);
@@ -160,11 +161,14 @@ void MotorsInfo::getJointsAngle(const std::vector &joints_name,
joint_qs.emplace(name, motor->getQ());
} else {
joint_qs.emplace(name, std::numeric_limits::quiet_NaN());
+ res = false;
}
}
+ return res;
}
-void MotorsInfo::getJointsAngle(const std::vector &joints_name, std::vector &joint_qs) const {
+bool MotorsInfo::getJointsQ(const std::vector &joints_name, std::vector &joint_qs) const {
+ auto res{true};
joint_qs.clear();
for (auto &name: joints_name) {
auto motor = motor_manager_->getMotor(name);
@@ -172,6 +176,20 @@ void MotorsInfo::getJointsAngle(const std::vector &joints_name, std
joint_qs.emplace_back(motor->getQ());
} else {
joint_qs.emplace_back(std::numeric_limits::quiet_NaN());
+ res = false;
}
}
+ return res;
}
+
+bool MotorsInfo::getJointsQ(std::unordered_map &joint_qs) const {
+ joint_qs.clear();
+ auto motors = motor_manager_->motorsMap();
+ for (auto &motor_pair: motors) {
+ auto motor = motor_pair.second;
+ joint_qs.emplace(motor->jointName(), motor->getQ());
+ }
+ return true;
+
+}
+
diff --git a/src/devices/motor/ti5_motor/canopen/protocol/ti5_motor_rpdo1.cpp b/src/devices/motor/ti5_motor/canopen/protocol/ti5_motor_rpdo1.cpp
index 88c655a2..f8c0ffaf 100644
--- a/src/devices/motor/ti5_motor/canopen/protocol/ti5_motor_rpdo1.cpp
+++ b/src/devices/motor/ti5_motor/canopen/protocol/ti5_motor_rpdo1.cpp
@@ -16,11 +16,11 @@ void Ti5MotorRPDO1::UpdateData(uint8_t *data) {
data[2] = target_pos_ >> 16 & 0xFF;
data[3] = target_pos_ >> 24 & 0xFF;
//
- // data[4] = ctrl_word_ & 0xFF;
- // data[5] = ctrl_word_ >> 8 & 0xFF;
+ data[4] = ctrl_word_ & 0xFF;
+ data[5] = ctrl_word_ >> 8 & 0xFF;
- data[4] = target_vel_ & 0xFF;
- data[5] = target_vel_ >> 8 & 0xFF;
- data[6] = target_vel_ >> 16 & 0xFF;
- data[7] = target_vel_ >> 24 & 0xFF;
+ // data[4] = target_vel_ & 0xFF;
+ // data[5] = target_vel_ >> 8 & 0xFF;
+ // data[6] = target_vel_ >> 16 & 0xFF;
+ // data[7] = target_vel_ >> 24 & 0xFF;
}
diff --git a/src/devices/motor/ti5_motor/canopen/protocol/ti5_motor_rpdo1.h b/src/devices/motor/ti5_motor/canopen/protocol/ti5_motor_rpdo1.h
index df943618..de387cc0 100644
--- a/src/devices/motor/ti5_motor/canopen/protocol/ti5_motor_rpdo1.h
+++ b/src/devices/motor/ti5_motor/canopen/protocol/ti5_motor_rpdo1.h
@@ -25,7 +25,7 @@ namespace cmvr {
void UpdateData(uint8_t *data) override;
int32_t GetLength() const override {
- return 0x08;
+ return 0x06;
}
uint32_t GetPeriod() const override {
diff --git a/src/devices/motor/ti5_motor/canopen/ti5_motor_canopen_protocol.cpp b/src/devices/motor/ti5_motor/canopen/ti5_motor_canopen_protocol.cpp
index e4b26f5e..82706b9c 100644
--- a/src/devices/motor/ti5_motor/canopen/ti5_motor_canopen_protocol.cpp
+++ b/src/devices/motor/ti5_motor/canopen/ti5_motor_canopen_protocol.cpp
@@ -331,7 +331,7 @@ void Ti5MotorCanopenProtocol::configRPDO1(uint8_t node_id, bool start) {
//6 : 映射控制字
seedSdoRequest(node_id, CS_WRITE_FOUR_BYTES, RPDO1_MAP_1600, SUB_INDEX_2,
- PROFILE_SPEED_6081 << 16 | SUB_INDEX_0 << 8 | 32);
+ CONTROL_WORD_6040 << 16 | SUB_INDEX_0 << 8 | 16);
if (start) {
diff --git a/src/devices/robot/humanoid_robot/src/humanoid_robot.cpp b/src/devices/robot/humanoid_robot/src/humanoid_robot.cpp
index 979f858a..5184a6a3 100644
--- a/src/devices/robot/humanoid_robot/src/humanoid_robot.cpp
+++ b/src/devices/robot/humanoid_robot/src/humanoid_robot.cpp
@@ -7,6 +7,7 @@
#include "motor/ti5_motor/ti5_motor.h"
#include "../../../../utils/base/include/abstract_interpolation.h"
#include "data_center/include/motors_info.h"
+#include "common/utils/math/support_functions.h"
using namespace std;
using namespace cmvr::device;
@@ -62,7 +63,7 @@ template
void HumanoidRobot::torqueOff() {
try {
for (const auto &pair: motor_manager_->motorsMap()) {
- if (pair.second->jointName() != "R_WRIST_R" && pair.second->jointName() != "WAIST_P")
+ if (pair.second->jointName() != "WAIST_Y" && pair.second->jointName() != "WAIST_P")
pair.second->torqueOff();
}
} catch (std::exception &e) {
@@ -219,23 +220,12 @@ template
void HumanoidRobot::moveJ(std::vector &cmd, double vel, double acc) {
if (cmd.empty()) return;
- LOG(INFO) << "vel " << vel << " acc" << acc << " " << cmd.size() << endl;
+ // 1. 读当前关节角
std::unordered_map cur_joints_angle;
cur_joints_angle.reserve(cmd.size());
-
- std::vector > motors;
- motors.reserve(cmd.size());
-
for (auto &jp: cmd) {
- auto motor = motor_manager_->getMotor(jp.joint_name);
- motors.push_back(motor);
- // 切 CSP
- if (motor->getMode() != msgs::RUN_MODE_CYCLIC_SYNC_POSITION) {
- motor->setMode(msgs::RUN_MODE_CYCLIC_SYNC_POSITION);
- }
- // 为 map 预填 key
- cur_joints_angle.emplace(jp.joint_name, 0.0);
+ cur_joints_angle.emplace(jp.joint_name, 0.0); // 预填 key
}
getJointQ(cur_joints_angle);
@@ -243,24 +233,27 @@ void HumanoidRobot::moveJ(std::vector &cmd, double vel, double
std::vector q_start, q_goal;
q_start.reserve(cmd.size());
q_goal.reserve(cmd.size());
+
for (auto &jp: cmd) {
auto it = cur_joints_angle.find(jp.joint_name);
if (it == cur_joints_angle.end()) {
LOG(ERROR) << "missing current angle for " << jp.joint_name;
return;
}
- q_start.push_back(it->second); // 当前读到的弧度
- q_goal.push_back(jp.rad); // 目标弧度
+ q_start.push_back(it->second);
+ q_goal.push_back(jp.rad);
+ }
+ if (q_start.size() != q_goal.size()) {
+ LOG(ERROR) << "q_start size != q_goal size";
+ return;
}
- if (q_start.size() != q_goal.size()) return;
-
+ // 2. 轨迹规划
TrajPtr traj;
joint_space_planner_->setPathType(PathType::Quintic);
joint_space_planner_->setSymmetricLimits(std::vector(cmd.size(), vel),
std::vector(cmd.size(), acc));
-
bool ok = joint_space_planner_->plan(q_start, q_goal, traj);
if (!ok) {
LOG(ERROR) << "planner plan() failed";
@@ -268,7 +261,7 @@ void HumanoidRobot::moveJ(std::vector &cmd, double vel, double
}
- // 10ms
+ // 3. 采样
const double dt = 0.001;
auto samples = joint_space_planner_->sampleTrajectory(traj, dt);
if (samples.size() < 2) {
@@ -276,37 +269,56 @@ void HumanoidRobot::moveJ(std::vector &cmd, double vel, double
return;
}
- const auto t0 = std::chrono::steady_clock::now();
- // k=0 开始
- size_t k = 0;
+ // 4. 切模式、设速度
+ std::vector > motors;
+ motors.reserve(cmd.size());
+ for (auto &jp: cmd) {
+ auto motor = motor_manager_->getMotor(jp.joint_name);
+ if (!motor) {
+ LOG(ERROR) << "getMotor failed for " << jp.joint_name;
+ return;
+ }
+ if (motor->getMode() != msgs::RUN_MODE_CYCLIC_SYNC_POSITION) {
+ motor->setMode(msgs::RUN_MODE_CYCLIC_SYNC_POSITION);
+ }
+ motor->setQd(vel);
+ motors.push_back(motor);
+ }
+
+
+ // 5. 下发命令
+ const auto t0 = std::chrono::steady_clock::now();
+ size_t k = 1;
const size_t K = samples.size();
+
while (k < K) {
- // // ——根据墙钟计算“应当在的拍次”,用于追赶——
- // auto now = std::chrono::steady_clock::now();
- // double elapsed = std::chrono::duration(now - t0).count();
- // size_t k_should = static_cast(std::floor(elapsed / dt)); // 向下取整更保守
- // if (k_should >= K) k_should = K - 1;
- // if (k < k_should) k = k_should; // 追赶,避免越拖越晚
-
- // ——下发第 k 个采样点——
const auto &s = samples[k];
-
for (size_t i = 0; i < motors.size(); ++i) {
- // motors[i]->setQd(s.qd[i]);
- // motors[i]->setQ(s.q[i]);
- motors[i]->set(s.q[i],s.qd[i]);
+ motors[i]->setQ(s.q[i]);
}
++k;
- if (k <= K) {
+ if (k < K) {
auto next_t = t0 + std::chrono::duration(k * dt);
std::this_thread::sleep_until(next_t);
}
}
+
+ // 6 输出误差
+ getJointQ(cur_joints_angle);
+ for (auto &jp: cmd) {
+ auto it = cur_joints_angle.find(jp.joint_name);
+ if (it == cur_joints_angle.end()) {
+ LOG(ERROR) << "missing current angle for " << jp.joint_name;
+ return;
+ }
+ LOG(INFO) << jp.joint_name << " pos err = " << std::abs(it->second - jp.rad);
+ }
}
+
template
void HumanoidRobot::calibrateZeroQ(const std::string &joint_name) {
auto motor = motor_manager_->getMotor(joint_name);
diff --git a/src/ik_solver/ik_solver/include/ik_solver.h b/src/ik_solver/ik_solver/include/ik_solver.h
index 35c07673..ed0f5ce3 100644
--- a/src/ik_solver/ik_solver/include/ik_solver.h
+++ b/src/ik_solver/ik_solver/include/ik_solver.h
@@ -28,6 +28,31 @@ namespace cmvr {
return false;
};
+ // 1:单次求解,即moveJ ,调用 ik 之前 一定要使用机械臂的真实关节角度 去更新
+ // moveJ()
+ // update_joints_state(械臂的真实关节角度)
+ // ik()
+ // 2 : 多次求解,即moveL ,
+ // moveL(){
+ // update_joints_state(械臂的真实关节角度)
+ // for(i = 0 , i ++)
+ // ik()
+ // update_joints_state(使用ik的值)
+ void update_joints_state(std::vector cur_joints_angle) {
+ cur_joints_angle_ = std::move(cur_joints_angle);
+ }
+
+
+ protected:
+ //机械臂末端工具坐标系相对于末端法兰的变换矩阵
+ Eigen::Matrix4d T_tool_flange_{};
+
+ // 机械臂基座相对于机器人基座的变换矩阵
+ Eigen::Matrix4d T_arm_robot_{};
+
+ // 上次调用ik 时计算的结果
+ std::vector cur_joints_angle_{};
+
// 设置 机械臂末端工具坐标系相对于末端法兰的变换矩阵
void setTcpTransform(const Eigen::Matrix4d& T_tool_flange) {
T_tool_flange_ = T_tool_flange;
@@ -39,11 +64,5 @@ namespace cmvr {
T_arm_robot_ = T_arm_robot;
}
- protected:
- //机械臂末端工具坐标系相对于末端法兰的变换矩阵
- Eigen::Matrix4d T_tool_flange_{};
-
- // 机械臂基座相对于机器人基座的变换矩阵
- Eigen::Matrix4d T_arm_robot_{};
};
}
diff --git a/src/ik_solver/ik_solver/include/ik_solver_creator.h b/src/ik_solver/ik_solver/include/ik_solver_creator.h
index 863b8dc0..d2bf3f59 100644
--- a/src/ik_solver/ik_solver/include/ik_solver_creator.h
+++ b/src/ik_solver/ik_solver/include/ik_solver_creator.h
@@ -6,7 +6,7 @@
#include
#include
-#include "ik_solver.h"
+#include "ik_solver/ik_solver/include/ik_solver.h"
namespace cmvr
{
diff --git a/src/ik_solver/ik_solver/src/ik_solver_creator.cpp b/src/ik_solver/ik_solver/src/ik_solver_creator.cpp
index 599ad9cb..e53991ca 100644
--- a/src/ik_solver/ik_solver/src/ik_solver_creator.cpp
+++ b/src/ik_solver/ik_solver/src/ik_solver_creator.cpp
@@ -4,6 +4,7 @@
#include "ik_solver/include/ik_solver_creator.h"
+#include "ik_solver/opt_psi_limit_bias_solver/include/opt_psi_limit_bias_solver.h"
namespace cmvr
{
std::unordered_map>
@@ -31,7 +32,7 @@ namespace cmvr
case IK_SOLVER_UNKNOWN:
return nullptr;
case OPT_PSI_LIMIT_BIAS_SRS:
- // return std::make_shared();
+ return std::make_shared();
default:
return nullptr;
}
diff --git a/src/ik_solver/opt_psi_limit_bias_solver/include/opt_psi_limit_bias_solver.h b/src/ik_solver/opt_psi_limit_bias_solver/include/opt_psi_limit_bias_solver.h
index 13a5139b..f39d4113 100644
--- a/src/ik_solver/opt_psi_limit_bias_solver/include/opt_psi_limit_bias_solver.h
+++ b/src/ik_solver/opt_psi_limit_bias_solver/include/opt_psi_limit_bias_solver.h
@@ -19,13 +19,8 @@ namespace cmvr{
bool init() override;
bool ik(const Eigen::Matrix4d &target_pose, std::vector &joints_angle) override;
-
bool fk(const std::vector &joints_angle, Eigen::Matrix4d &cur_pose, bool robot_base = false) override;
- // 机械臂运动完成后一定要调用一下此接口
- void update_joints_state(std::vector cur_joints_angle) {
- cur_joints_angle_ = std::move(cur_joints_angle);
- }
private:
std::shared_ptr bias_srs_ik_solver_{nullptr};
std::shared_ptr joints_limit_analyzer_{nullptr};
@@ -36,9 +31,6 @@ namespace cmvr{
bool valid{false};
}prev_opt_psi_;
-
- // todo :: 后续添加到 data_center
- std::vector cur_joints_angle_{};
};
}
diff --git a/src/ik_solver/opt_psi_limit_bias_solver/src/opt_psi_limit_bias_solver.cpp b/src/ik_solver/opt_psi_limit_bias_solver/src/opt_psi_limit_bias_solver.cpp
index 4a4e79aa..a62aa3ac 100644
--- a/src/ik_solver/opt_psi_limit_bias_solver/src/opt_psi_limit_bias_solver.cpp
+++ b/src/ik_solver/opt_psi_limit_bias_solver/src/opt_psi_limit_bias_solver.cpp
@@ -91,6 +91,14 @@ bool OptPsiLimitBiasSolver::ik(const Eigen::Matrix4d &target_pose, std::vectorinverse_kinematics(target_cal_pose, best_psi);
+
+ // 5: 验证有没有超出限制
+ for (int i = 0; i < joints_angle.size(); ++i) {
+ if ((joints_angle[i] > joints_limits[i].second) || (joints_angle[i] < joints_limits[i].first)) {
+ return false;
+ }
+ }
+
return true;
}
diff --git a/src/ik_solver/opt_psi_limit_bias_solver/src/srs_ik_test.cpp b/src/ik_solver/opt_psi_limit_bias_solver/src/srs_ik_test.cpp
index 27950f3f..af1a8b6c 100644
--- a/src/ik_solver/opt_psi_limit_bias_solver/src/srs_ik_test.cpp
+++ b/src/ik_solver/opt_psi_limit_bias_solver/src/srs_ik_test.cpp
@@ -360,6 +360,7 @@ TEST(SRS_IK_TEST, TR_TEST) {
0.0, 0.0, 0.0, 1.0;
std::vector joint_angles = {0.00203898, 1.34062, 0.0, 0.522261, 0.0, -0.000210733, -0.0942364};
+ std::vector last_joint_angles = {0.00203898, 1.34062, 0.111, 0.622261, 0.256, -0.0210733, 1.00};
@@ -368,6 +369,17 @@ TEST(SRS_IK_TEST, TR_TEST) {
solver.fk(joint_angles,pose,true);
cout << "Target Pose (FK from seed joints):\n" << pose << endl;
- // solver.ik(T,joint_angles);
+
+
+ solver.update_joints_state(last_joint_angles);
+ solver.ik(pose,joint_angles);
+
+ for (double joint_angle: joint_angles) {
+ cout << joint_angle << endl;
+ }
+
+ solver.fk(joint_angles,pose,true);
+ cout << "Target Pose (FK from seed joints):\n" << pose << endl;
+
}
\ No newline at end of file
diff --git a/src/planner/joint_space_planner/src/joint_space_planner_test.cpp b/src/planner/joint_space_planner/src/joint_space_planner_test.cpp
index ada59881..497c79e0 100644
--- a/src/planner/joint_space_planner/src/joint_space_planner_test.cpp
+++ b/src/planner/joint_space_planner/src/joint_space_planner_test.cpp
@@ -5,21 +5,58 @@
#include "gtest/gtest.h"
#include "planner/joint_space_planner/include/toppra_bspline.h"
#include "planner/joint_space_planner/include/joint_space_planner_creator.h"
+#include "common/utils/math/support_functions.h"
+#include
using namespace cmvr;
TEST(JOINT_SPACE_PLANNER_TEST,TOPPRA_TEST) {
auto planner = JointSpacePlannerCreator::create(JointSpacePlannerType::TOPPRA_BSPLINE);
- planner->setPathType(PathType::Quintic);
+ planner->setPathType(PathType::CubicHermite);
planner->setSymmetricLimits(std::vector(1, 1.5),
- std::vector(1, 3.0));
+ std::vector(1, 6.0));
TrajPtr traj;
std::vector q0{0.0};
- std::vector q1{1.2};
+ std::vector q1{-1.2};
if (!planner->plan(q0, q1, traj)) { std::cerr << "plan failed\n"; }
// 2) 采样 0.01 s
- auto samples = planner->sampleTrajectory(traj, 0.01);
+ double dt = 0.01;
+ auto samples = planner->sampleTrajectory(traj, dt);
+
+
+ const auto t0 = std::chrono::steady_clock::now();
+ size_t k = 1;
+ const size_t K = samples.size();
+
+ const int lookahead_steps = 1; // 看前 1 个点,或者直接设 0 就是你的原版
+
+ while (k < K) {
+ const auto &s_now = samples[k];
+
+ int global_lookahead = 1;
+ for (size_t i = 0; i < q0.size(); ++i) {
+ int la_i = SupportFunctions::calcLookahead(
+ s_now.qd[i],
+ s_now.qdd[i],
+ 1.5,
+ dt,1,10);
+ global_lookahead = std::max(global_lookahead, la_i);
+ }
+
+ size_t k_la = std::min(k + (size_t) global_lookahead, K - 1);
+ const auto &s_cmd = samples[k];
+
+ std::cout << s_cmd.q << std::endl;
+
+
+
+ ++k;
+ if (k < K) {
+ auto next_t = t0 + std::chrono::duration(k * dt);
+ std::this_thread::sleep_until(next_t);
+ }
+ }
// 3) 写 CSV
if (!planner->writeTrajectoryCsv("/home/lgv/cmvr/cmvr-es/data/planner/traj.csv", samples)) {
diff --git a/third_party/mujoco/3.3.7/MUJOCO_LOG.TXT b/third_party/mujoco/3.3.7/MUJOCO_LOG.TXT
new file mode 100644
index 00000000..d6b3e4b6
--- /dev/null
+++ b/third_party/mujoco/3.3.7/MUJOCO_LOG.TXT
@@ -0,0 +1,3 @@
+Wed Nov 19 10:46:50 2025
+ERROR: could not initialize GLFW
+
diff --git a/third_party/mujoco/3.3.7/THIRD_PARTY_NOTICES b/third_party/mujoco/3.3.7/THIRD_PARTY_NOTICES
new file mode 100644
index 00000000..d5cafcac
--- /dev/null
+++ b/third_party/mujoco/3.3.7/THIRD_PARTY_NOTICES
@@ -0,0 +1,630 @@
+MuJoCo version 3.3.7 incorporates the following open-source libraries:
+
+ - libccd
+ - Collisions
+ - TinyXML2
+ - LodePNG
+ - Qhull
+ - GLAD
+ - GLFW
+ - TinyObjLoader
+ - MarchingCubeCpp
+ - {fmt}
+ - OpenGL Mathematics
+ - TriangleMeshDistance
+
+MuJoCo was built for GNU/Linux using LLVM/Clang.
+LLVM/Clang incorporates portions of its standard headers and runtime libraries
+in the resulting MuJoCo binary.
+
+Third-party copyright and license information is included below.
+
+
+
+========================= LIBCCD =============================================
+
+Copyright (c)2010-2012 Daniel Fiser ,
+Intelligent and Mobile Robotics Group, Department of Cybernetics,
+Faculty of Electrical Engineering, Czech Technical University in Prague.
+All rights reserved.
+
+
+This work was supported by SYMBRION and REPLICATOR projects.
+The SYMBRION project is funded by European Commission within the work
+"Future and Emergent Technologies Proactive" under grant agreement no.
+216342.
+The REPLICATOR project is funded within the work programme "Cognitive
+Systems, Interaction, Robotics" under grant agreement no. 216240.
+http://www.symbrion.eu/
+http://www.replicators.eu/
+
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ - Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ - Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+
+========================= COLLISIONS =========================================
+
+Copyright (c) 2015 Svetoslav Kolev
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+
+========================= TINYXML2 ===========================================
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any
+damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any
+purpose, including commercial applications, and to alter it and
+redistribute it freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must
+not claim that you wrote the original software. If you use this
+software in a product, an acknowledgment in the product documentation
+would be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and
+must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+distribution.
+
+
+
+========================= LODEPNG ============================================
+
+Copyright (c) 2005-2018 Lode Vandevenne
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+
+ 3. This notice may not be removed or altered from any source
+ distribution.
+
+
+
+========================= QHULL ==============================================
+
+ Qhull, Copyright (c) 1993-2020
+
+ C.B. Barber
+ Arlington, MA
+
+ and
+
+ The National Science and Technology Research Center for
+ Computation and Visualization of Geometric Structures
+ (The Geometry Center)
+ University of Minnesota
+
+ email: qhull@qhull.org
+
+This software includes Qhull from C.B. Barber and The Geometry Center.
+Files derived from Qhull 1.0 are copyrighted by the Geometry Center. The
+remaining files are copyrighted by C.B. Barber. Qhull is free software
+and may be obtained via http from www.qhull.org. It may be freely copied,
+modified, and redistributed under the following conditions:
+
+1. All copyright notices must remain intact in all files.
+
+2. A copy of this text file must be distributed along with any copies
+ of Qhull that you redistribute; this includes copies that you have
+ modified, or copies of programs or other software products that
+ include Qhull.
+
+3. If you modify Qhull, you must include a notice giving the
+ name of the person performing the modification, the date of
+ modification, and the reason for such modification.
+
+4. When distributing modified versions of Qhull, or other software
+ products that include Qhull, you must provide notice that the original
+ source code may be obtained as noted above.
+
+5. There is no warranty or other guarantee of fitness for Qhull, it is
+ provided solely "as is". Bug reports or fixes may be sent to
+ qhull_bug@qhull.org; the authors may or may not act on them as
+ they desire.
+
+
+
+========================= GLAD ===============================================
+
+The glad generated code itself is CC0. The source files for the generated code
+are under various licenses from Khronos.
+
+--------------------------------------------------------------------------------
+
+Copyright 2013-2020 The Khronos Group Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and/or associated documentation files (the
+"Materials"), to deal in the Materials without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Materials, and to
+permit persons to whom the Materials are furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Materials.
+
+THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+
+
+
+========================= GLFW ===============================================
+
+Copyright (c) 2002-2006 Marcus Geelnard
+
+Copyright (c) 2006-2019 Camilla Löwy
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would
+ be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and must not
+ be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+ distribution.
+
+
+
+========================= TINYOBJLOADER ========================================
+
+The MIT License (MIT)
+
+Copyright (c) 2012-2019 Syoyo Fujita and many contributors.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+
+========================= MARCHINGCUBECPP ======================================
+
+The MIT License (MIT)
+
+Copyright (c) 2020 Axel Paris
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+
+========================= FMT ==================================================
+
+Copyright (c) 2012 - present, Victor Zverovich and {fmt} contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+--- Optional exception to the license ---
+
+As an exception, if, as a result of your compiling your source code, portions
+of this Software are embedded into a machine-executable object form of such
+source code, you may redistribute such embedded portions in such object form
+without including the above copyright and permission notices.
+
+
+
+========================= TRIANGLEMESHDISTANCE =================================
+
+MIT License
+
+Copyright (c) 2021 Jose Antonio Fernandez Fernandez
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+
+================================================================================
+The LLVM Project is under the Apache License v2.0 with LLVM Exceptions:
+================================================================================
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+---- LLVM Exceptions to the Apache 2.0 License ----
+
+As an exception, if, as a result of your compiling your source code, portions
+of this Software are embedded into an Object form of such source code, you
+may redistribute such embedded portions in such Object form without complying
+with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
+
+In addition, if you combine or link compiled forms of this Software with
+software that is licensed under the GPLv2 ("Combined Software") and if a
+court of competent jurisdiction determines that the patent provision (Section
+3), the indemnity provision (Section 9) or other Section of the License
+conflicts with the conditions of the GPLv2, you may retroactively and
+prospectively choose to deem waived or otherwise exclude such Section(s) of
+the License, but only in their entirety and only with respect to the Combined
+Software.
+
+================================================================================
+Software from third parties included in the LLVM Project:
+================================================================================
+The LLVM Project contains third party software which is under different license
+terms. All such code will be identified clearly using at least one of two
+mechanisms:
+1) It will be in a separate directory tree with its own `LICENSE.txt` or
+ `LICENSE` file at the top containing the specific license and restrictions
+ which apply to that software, or
+2) It will contain specific license and restriction terms at the top of every
+ file.
+
+================================================================================
+Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy):
+================================================================================
+University of Illinois/NCSA
+Open Source License
+
+Copyright (c) 2003-2019 University of Illinois at Urbana-Champaign.
+All rights reserved.
+
+Developed by:
+
+ LLVM Team
+
+ University of Illinois at Urbana-Champaign
+
+ http://llvm.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal with
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimers.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimers in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the names of the LLVM Team, University of Illinois at
+ Urbana-Champaign, nor the names of its contributors may be used to
+ endorse or promote products derived from this Software without specific
+ prior written permission.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+SOFTWARE.
diff --git a/third_party/mujoco/3.3.7/bin/basic b/third_party/mujoco/3.3.7/bin/basic
new file mode 100755
index 00000000..94d4fbe9
Binary files /dev/null and b/third_party/mujoco/3.3.7/bin/basic differ
diff --git a/third_party/mujoco/3.3.7/bin/compile b/third_party/mujoco/3.3.7/bin/compile
new file mode 100755
index 00000000..17e4d7e4
Binary files /dev/null and b/third_party/mujoco/3.3.7/bin/compile differ
diff --git a/third_party/mujoco/3.3.7/bin/dependencies b/third_party/mujoco/3.3.7/bin/dependencies
new file mode 100755
index 00000000..801b7e0f
Binary files /dev/null and b/third_party/mujoco/3.3.7/bin/dependencies differ
diff --git a/third_party/mujoco/3.3.7/bin/mujoco_plugin/libactuator.so b/third_party/mujoco/3.3.7/bin/mujoco_plugin/libactuator.so
new file mode 100755
index 00000000..8121d536
Binary files /dev/null and b/third_party/mujoco/3.3.7/bin/mujoco_plugin/libactuator.so differ
diff --git a/third_party/mujoco/3.3.7/bin/mujoco_plugin/libelasticity.so b/third_party/mujoco/3.3.7/bin/mujoco_plugin/libelasticity.so
new file mode 100755
index 00000000..98535141
Binary files /dev/null and b/third_party/mujoco/3.3.7/bin/mujoco_plugin/libelasticity.so differ
diff --git a/third_party/mujoco/3.3.7/bin/mujoco_plugin/libsdf_plugin.so b/third_party/mujoco/3.3.7/bin/mujoco_plugin/libsdf_plugin.so
new file mode 100755
index 00000000..c437f1bd
Binary files /dev/null and b/third_party/mujoco/3.3.7/bin/mujoco_plugin/libsdf_plugin.so differ
diff --git a/third_party/mujoco/3.3.7/bin/mujoco_plugin/libsensor.so b/third_party/mujoco/3.3.7/bin/mujoco_plugin/libsensor.so
new file mode 100755
index 00000000..1a8ff8de
Binary files /dev/null and b/third_party/mujoco/3.3.7/bin/mujoco_plugin/libsensor.so differ
diff --git a/third_party/mujoco/3.3.7/bin/record b/third_party/mujoco/3.3.7/bin/record
new file mode 100755
index 00000000..30169319
Binary files /dev/null and b/third_party/mujoco/3.3.7/bin/record differ
diff --git a/third_party/mujoco/3.3.7/bin/simulate b/third_party/mujoco/3.3.7/bin/simulate
new file mode 100755
index 00000000..479f8ee9
Binary files /dev/null and b/third_party/mujoco/3.3.7/bin/simulate differ
diff --git a/third_party/mujoco/3.3.7/bin/testspeed b/third_party/mujoco/3.3.7/bin/testspeed
new file mode 100755
index 00000000..1e3a5a01
Binary files /dev/null and b/third_party/mujoco/3.3.7/bin/testspeed differ
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/layer_sink.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/layer_sink.h
new file mode 100644
index 00000000..34af9134
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/layer_sink.h
@@ -0,0 +1,41 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MUJOCO_SRC_EXPERIMENTAL_USD_LAYER_SINK_H_
+#define MUJOCO_SRC_EXPERIMENTAL_USD_LAYER_SINK_H_
+
+#include
+
+#include
+#include
+#include
+
+namespace mujoco {
+namespace usd {
+
+// A sink for writing pose data to an SDF layer.
+// Opinions will be authored on the edit target layer for the
+// passed stage argument.
+class LayerSink {
+ public:
+ explicit LayerSink(pxr::UsdStageRefPtr stage);
+ void Update(const mjData* const data, std::vector body_paths_);
+
+ private:
+ pxr::UsdStageRefPtr stage_;
+};
+} // namespace usd
+} // namespace mujoco
+
+#endif // MUJOCO_SRC_EXPERIMENTAL_USD_LAYER_SINK_H_
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/actuator.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/actuator.h
new file mode 100644
index 00000000..cb0069b9
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/actuator.h
@@ -0,0 +1,872 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MJCPHYSICS_GENERATED_ACTUATOR_H
+#define MJCPHYSICS_GENERATED_ACTUATOR_H
+
+/// \file mjcPhysics/actuator.h
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+PXR_NAMESPACE_OPEN_SCOPE
+
+class SdfAssetPath;
+
+// -------------------------------------------------------------------------- //
+// MJCACTUATOR //
+// -------------------------------------------------------------------------- //
+
+/// \class MjcPhysicsActuator
+///
+/// Known as actuator in MuJoCo, this prim represents force transmission to
+/// joints, bodies, or sites.
+///
+/// For any described attribute \em Fallback \em Value or \em Allowed \em Values
+/// below that are text/tokens, the actual token is published and defined in
+/// \ref MjcPhysicsTokens. So to set an attribute to the value "rightHanded",
+/// use MjcPhysicsTokens->rightHanded as the value.
+///
+class MjcPhysicsActuator : public UsdTyped {
+ public:
+ /// Compile time constant representing what kind of schema this class is.
+ ///
+ /// \sa UsdSchemaKind
+ static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
+
+ /// Construct a MjcPhysicsActuator on UsdPrim \p prim .
+ /// Equivalent to MjcPhysicsActuator::Get(prim.GetStage(), prim.GetPath())
+ /// for a \em valid \p prim, but will not immediately throw an error for
+ /// an invalid \p prim
+ explicit MjcPhysicsActuator(const UsdPrim& prim = UsdPrim())
+ : UsdTyped(prim) {}
+
+ /// Construct a MjcPhysicsActuator on the prim held by \p schemaObj .
+ /// Should be preferred over MjcPhysicsActuator(schemaObj.GetPrim()),
+ /// as it preserves SchemaBase state.
+ explicit MjcPhysicsActuator(const UsdSchemaBase& schemaObj)
+ : UsdTyped(schemaObj) {}
+
+ /// Destructor.
+ MJCPHYSICS_API
+ virtual ~MjcPhysicsActuator();
+
+ /// Return a vector of names of all pre-declared attributes for this schema
+ /// class and all its ancestor classes. Does not include attributes that
+ /// may be authored by custom/extended methods of the schemas involved.
+ MJCPHYSICS_API
+ static const TfTokenVector& GetSchemaAttributeNames(
+ bool includeInherited = true);
+
+ /// Return a MjcPhysicsActuator holding the prim adhering to this
+ /// schema at \p path on \p stage. If no prim exists at \p path on
+ /// \p stage, or if the prim at that path does not adhere to this schema,
+ /// return an invalid schema object. This is shorthand for the following:
+ ///
+ /// \code
+ /// MjcPhysicsActuator(stage->GetPrimAtPath(path));
+ /// \endcode
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsActuator Get(const UsdStagePtr& stage, const SdfPath& path);
+
+ /// Attempt to ensure a \a UsdPrim adhering to this schema at \p path
+ /// is defined (according to UsdPrim::IsDefined()) on this stage.
+ ///
+ /// If a prim adhering to this schema at \p path is already defined on this
+ /// stage, return that prim. Otherwise author an \a SdfPrimSpec with
+ /// \a specifier == \a SdfSpecifierDef and this schema's prim type name for
+ /// the prim at \p path at the current EditTarget. Author \a SdfPrimSpec s
+ /// with \p specifier == \a SdfSpecifierDef and empty typeName at the
+ /// current EditTarget for any nonexistent, or existing but not \a Defined
+ /// ancestors.
+ ///
+ /// The given \a path must be an absolute prim path that does not contain
+ /// any variant selections.
+ ///
+ /// If it is impossible to author any of the necessary PrimSpecs, (for
+ /// example, in case \a path cannot map to the current UsdEditTarget's
+ /// namespace) issue an error and return an invalid \a UsdPrim.
+ ///
+ /// Note that this method may return a defined prim whose typeName does not
+ /// specify this schema class, in case a stronger typeName opinion overrides
+ /// the opinion at the current EditTarget.
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsActuator Define(const UsdStagePtr& stage,
+ const SdfPath& path);
+
+ protected:
+ /// Returns the kind of schema this class belongs to.
+ ///
+ /// \sa UsdSchemaKind
+ MJCPHYSICS_API
+ UsdSchemaKind _GetSchemaKind() const override;
+
+ private:
+ // needs to invoke _GetStaticTfType.
+ friend class UsdSchemaRegistry;
+ MJCPHYSICS_API
+ static const TfType& _GetStaticTfType();
+
+ static bool _IsTypedSchema();
+
+ // override SchemaBase virtuals.
+ MJCPHYSICS_API
+ const TfType& _GetTfType() const override;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // GROUP
+ // --------------------------------------------------------------------- //
+ /// Integer MuJoCo group to which the transmission belongs.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:group = 0` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetGroupAttr() const;
+
+ /// See GetGroupAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateGroupAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCCTRLLIMITED
+ // --------------------------------------------------------------------- //
+ /// If true, the control input to this actuator is automatically clamped to
+ /// ctrlrange at runtime. If false, control input clamping is disabled. If
+ /// 'auto' and autolimits is set in compiler, control clamping will
+ /// automatically be set to true if ctrlrange is defined without explicitly
+ /// setting this attribute to 'true'. Note that control input clamping can
+ /// also be globally disabled with the clampctrl attribute of option/flag.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform token mjc:ctrlLimited = "auto"` |
+ /// | C++ Type | TfToken |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ /// | \ref MjcPhysicsTokens "Allowed Values" | false, true, auto |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcCtrlLimitedAttr() const;
+
+ /// See GetMjcCtrlLimitedAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcCtrlLimitedAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCFORCELIMITED
+ // --------------------------------------------------------------------- //
+ /// If true, the force output of this actuator is automatically clamped to
+ /// forcerange at runtime. If false, force clamping is disabled. If 'auto' and
+ /// autolimits is set in compiler, force clamping will automatically be set to
+ /// true if forcerange is defined without explicitly setting this attribute to
+ /// 'true'.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform token mjc:forceLimited = "auto"` |
+ /// | C++ Type | TfToken |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ /// | \ref MjcPhysicsTokens "Allowed Values" | false, true, auto |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcForceLimitedAttr() const;
+
+ /// See GetMjcForceLimitedAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcForceLimitedAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCACTLIMITED
+ // --------------------------------------------------------------------- //
+ /// If true, the internal state (activation) associated with this actuator is
+ /// automatically clamped to actrange at runtime. If false, activation
+ /// clamping is disabled. If 'auto' and autolimits is set in compiler,
+ /// activation clamping will automatically be set to true if actrange is
+ /// defined without explicitly setting this attribute to 'true'. See the
+ /// Activation clamping section for more details.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform token mjc:actLimited = "auto"` |
+ /// | C++ Type | TfToken |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ /// | \ref MjcPhysicsTokens "Allowed Values" | false, true, auto |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcActLimitedAttr() const;
+
+ /// See GetMjcActLimitedAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcActLimitedAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCCTRLRANGEMIN
+ // --------------------------------------------------------------------- //
+ /// Minimum range for clamping the control input. The first value must be
+ /// smaller than the second value. Setting this attribute without specifying
+ /// ctrllimited is an error if autolimits is 'false' in compiler.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:ctrlRange:min = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcCtrlRangeMinAttr() const;
+
+ /// See GetMjcCtrlRangeMinAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcCtrlRangeMinAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCCTRLRANGEMAX
+ // --------------------------------------------------------------------- //
+ /// Maximum range for clamping the control input. The first value must be
+ /// smaller than the second value. Setting this attribute without specifying
+ /// ctrllimited is an error if autolimits is 'false' in compiler.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:ctrlRange:max = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcCtrlRangeMaxAttr() const;
+
+ /// See GetMjcCtrlRangeMaxAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcCtrlRangeMaxAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCFORCERANGEMIN
+ // --------------------------------------------------------------------- //
+ /// Minimum range for clamping the force output. The first value must be no
+ /// greater than the second value. Setting this attribute without specifying
+ /// forcelimited is an error if autolimits is 'false' in compiler.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:forceRange:min = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcForceRangeMinAttr() const;
+
+ /// See GetMjcForceRangeMinAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcForceRangeMinAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCFORCERANGEMAX
+ // --------------------------------------------------------------------- //
+ /// Maximum range for clamping the force output. The first value must be no
+ /// greater than the second value. Setting this attribute without specifying
+ /// forcelimited is an error if autolimits is 'false' in compiler.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:forceRange:max = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcForceRangeMaxAttr() const;
+
+ /// See GetMjcForceRangeMaxAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcForceRangeMaxAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCACTRANGEMIN
+ // --------------------------------------------------------------------- //
+ /// Minimum range for clamping the activation state. The first value must be
+ /// no greater than the second value. See the Activation clamping section for
+ /// more details. Setting this attribute without specifying actlimited is an
+ /// error if autolimits is 'false' in compiler.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:actRange:min = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcActRangeMinAttr() const;
+
+ /// See GetMjcActRangeMinAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcActRangeMinAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCACTRANGEMAX
+ // --------------------------------------------------------------------- //
+ /// Maximum range for clamping the activation state. The first value must be
+ /// no greater than the second value. See the Activation clamping section for
+ /// more details. Setting this attribute without specifying actlimited is an
+ /// error if autolimits is 'false' in compiler.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:actRange:max = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcActRangeMaxAttr() const;
+
+ /// See GetMjcActRangeMaxAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcActRangeMaxAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCLENGTHRANGEMIN
+ // --------------------------------------------------------------------- //
+ /// Minimum range of feasible lengths of the actuator's transmission.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:lengthRange:min = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcLengthRangeMinAttr() const;
+
+ /// See GetMjcLengthRangeMinAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcLengthRangeMinAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCLENGTHRANGEMAX
+ // --------------------------------------------------------------------- //
+ /// Maximum range of feasible lengths of the actuator's transmission.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:lengthRange:max = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcLengthRangeMaxAttr() const;
+
+ /// See GetMjcLengthRangeMaxAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcLengthRangeMaxAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCGEAR
+ // --------------------------------------------------------------------- //
+ /// This attribute scales the length (and consequently moment arms, velocity
+ /// and force) of the actuator, for all transmission types. It is different
+ /// from the gain in the force generation mechanism, because the gain only
+ /// scales the force output and does not affect the length, moment arms and
+ /// velocity. For actuators with scalar transmission, only the first element
+ /// of this vector is used. The remaining elements are needed for joint,
+ /// jointinparent and site transmissions where this attribute is used to
+ /// specify 3D force and torque axes.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double[] mjc:gear = [1, 0, 0, 0, 0, 0]` |
+ /// | C++ Type | VtArray |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcGearAttr() const;
+
+ /// See GetMjcGearAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcGearAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCCRANKLENGTH
+ // --------------------------------------------------------------------- //
+ /// Used only for the slider-crank transmission type. Specifies the length of
+ /// the connecting rod. The compiler expects this value to be positive when a
+ /// slider-crank transmission is present.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:crankLength = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcCrankLengthAttr() const;
+
+ /// See GetMjcCrankLengthAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcCrankLengthAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCJOINTINPARENT
+ // --------------------------------------------------------------------- //
+ /// If true and applied to ball and free joints, the 3d rotation axis given by
+ /// gear is defined in the parent frame (which is the world frame for free
+ /// joints) rather than the child frame.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:jointInParent = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcJointInParentAttr() const;
+
+ /// See GetMjcJointInParentAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcJointInParentAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCACTDIM
+ // --------------------------------------------------------------------- //
+ /// Dimension of the activation state. The default value of -1 instructs the
+ /// compiler to set the dimension according to the dyntype. Values larger than
+ /// 1 are only allowed for user-defined activation dynamics, as native types
+ /// require dimensions of only 0 or 1. For activation dimensions bigger than
+ /// 1, the last element is used to generate force.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:actDim = -1` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcActDimAttr() const;
+
+ /// See GetMjcActDimAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcActDimAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCDYNTYPE
+ // --------------------------------------------------------------------- //
+ /// Activation dynamics type for the actuator. The available dynamics types
+ /// were already described in the Actuation model section.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform token mjc:dynType = "none"` |
+ /// | C++ Type | TfToken |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ /// | \ref MjcPhysicsTokens "Allowed Values" | none, integrator, filter,
+ /// filterexact, muscle, user |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcDynTypeAttr() const;
+
+ /// See GetMjcDynTypeAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcDynTypeAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCGAINTYPE
+ // --------------------------------------------------------------------- //
+ /// The gain and bias together determine the output of the force generation
+ /// mechanism, which is currently assumed to be affine.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform token mjc:gainType = "fixed"` |
+ /// | C++ Type | TfToken |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ /// | \ref MjcPhysicsTokens "Allowed Values" | fixed, affine, muscle, user |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcGainTypeAttr() const;
+
+ /// See GetMjcGainTypeAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcGainTypeAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCBIASTYPE
+ // --------------------------------------------------------------------- //
+ /// The gain and bias together determine the output of the force generation
+ /// mechanism, which is currently assumed to be affine.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform token mjc:biasType = "none"` |
+ /// | C++ Type | TfToken |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ /// | \ref MjcPhysicsTokens "Allowed Values" | none, affine, muscle, user |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcBiasTypeAttr() const;
+
+ /// See GetMjcBiasTypeAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcBiasTypeAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCDYNPRM
+ // --------------------------------------------------------------------- //
+ /// Activation dynamics parameters. The built-in activation types (except for
+ /// muscle) use only the first parameter, but we provide additional parameters
+ /// in case user callbacks implement a more elaborate model. The length of
+ /// this array is not enforced by the parser, so the user can enter as many
+ /// parameters as needed. These defaults are not compatible with muscle
+ /// actuators.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double[] mjc:dynPrm = [1, 0, 0, 0, 0, 0, 0, 0, 0,
+ /// 0]` | | C++ Type | VtArray | | \ref Usd_Datatypes "Usd Type" |
+ /// SdfValueTypeNames->DoubleArray | | \ref SdfVariability "Variability" |
+ /// SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcDynPrmAttr() const;
+
+ /// See GetMjcDynPrmAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcDynPrmAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCGAINPRM
+ // --------------------------------------------------------------------- //
+ /// Gain parameters. The built-in gain types (except for muscle) use only the
+ /// first parameter, but we provide additional parameters in case user
+ /// callbacks implement a more elaborate model. The length of this array is
+ /// not enforced by the parser, so the user can enter as many parameters as
+ /// needed. These defaults are not compatible with muscle actuators.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double[] mjc:gainPrm = [1, 0, 0, 0, 0, 0, 0, 0,
+ /// 0, 0]` | | C++ Type | VtArray | | \ref Usd_Datatypes "Usd Type" |
+ /// SdfValueTypeNames->DoubleArray | | \ref SdfVariability "Variability" |
+ /// SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcGainPrmAttr() const;
+
+ /// See GetMjcGainPrmAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcGainPrmAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCBIASPRM
+ // --------------------------------------------------------------------- //
+ /// Bias parameters. The affine bias type uses three parameters. The length of
+ /// this array is not enforced by the parser, so the user can enter as many
+ /// parameters as needed. These defaults are not compatible with muscle
+ /// actuators.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double[] mjc:biasPrm = [0, 0, 0, 0, 0, 0, 0, 0,
+ /// 0, 0]` | | C++ Type | VtArray | | \ref Usd_Datatypes "Usd Type" |
+ /// SdfValueTypeNames->DoubleArray | | \ref SdfVariability "Variability" |
+ /// SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcBiasPrmAttr() const;
+
+ /// See GetMjcBiasPrmAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcBiasPrmAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCACTEARLY
+ // --------------------------------------------------------------------- //
+ /// If true, force computation will use the next value of the activation
+ /// variable rather than the current one. Setting this flag reduces the delay
+ /// between the control and accelerations by one time-step.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:actEarly = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcActEarlyAttr() const;
+
+ /// See GetMjcActEarlyAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcActEarlyAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCINHERITRANGE
+ // --------------------------------------------------------------------- //
+ /// Automatically set the actuator’s ctrlrange to match the transmission
+ /// target’s range. The default value means disabled. A positive value X sets
+ /// the ctrlrange around the midpoint of the target range, scaled by X. For
+ /// example if the target joint has range of [0, 1], then a value of 1.0 will
+ /// set ctrlrange to [0, 1]; values of 0.8 and 1.2 will set the ctrlrange to
+ /// [0.1, 0.9] and [-0.1, 1.1], respectively. Values smaller than 1 are useful
+ /// for not hitting the limits; values larger than 1 are useful for
+ /// maintaining control authority at the limits (being able to push on them).
+ /// This attribute is exclusive with ctrlrange and available only for joint
+ /// and tendon transmissions which have range defined.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:inheritRange = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcInheritRangeAttr() const;
+
+ /// See GetMjcInheritRangeAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcInheritRangeAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCTARGET
+ // --------------------------------------------------------------------- //
+ /// Actuator transmission target.
+ ///
+ MJCPHYSICS_API
+ UsdRelationship GetMjcTargetRel() const;
+
+ /// See GetMjcTargetRel(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create
+ MJCPHYSICS_API
+ UsdRelationship CreateMjcTargetRel() const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCREFSITE
+ // --------------------------------------------------------------------- //
+ /// When applied to a site, measure the translation and rotation w.r.t the
+ /// frame of the refsite. In this case the actuator does have length and
+ /// position actuators can be used to directly control an end effector, see
+ /// refsite.xml example model. As above, the length is the dot product of the
+ /// gear vector and the frame difference. So gear='0 1 0 0 0 0' means
+ /// 'Y-offset of site in the refsite frame', while gear='0 0 0 0 0 1' means
+ /// rotation 'Z- rotation of site in the refsite frame'. It is recommended to
+ /// use a normalized gear vector with nonzeros in only the first 3 or the last
+ /// 3 elements of gear, so the actuator length will be in either length units
+ /// or radians, respectively. As with ball joints (see joint above), for
+ /// rotations which exceed a total angle of pi will wrap around, so tighter
+ /// limits are recommended.
+ ///
+ MJCPHYSICS_API
+ UsdRelationship GetMjcRefSiteRel() const;
+
+ /// See GetMjcRefSiteRel(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create
+ MJCPHYSICS_API
+ UsdRelationship CreateMjcRefSiteRel() const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCSLIDERSITE
+ // --------------------------------------------------------------------- //
+ /// Used only for the slider-crank transmission type. The target site is the
+ /// pin joining the slider and the connecting rod. The slider moves along the
+ /// z-axis of the slidersite frame. Therefore the site should be oriented as
+ /// needed when it is defined in the kinematic tree; its orientation cannot be
+ /// changed in the actuator definition.
+ ///
+ MJCPHYSICS_API
+ UsdRelationship GetMjcSliderSiteRel() const;
+
+ /// See GetMjcSliderSiteRel(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create
+ MJCPHYSICS_API
+ UsdRelationship CreateMjcSliderSiteRel() const;
+
+ public:
+ // ===================================================================== //
+ // Feel free to add custom code below this line, it will be preserved by
+ // the code generator.
+ //
+ // Just remember to:
+ // - Close the class declaration with };
+ // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
+ // - Close the include guard with #endif
+ // ===================================================================== //
+ // --(BEGIN CUSTOM CODE)--
+};
+
+PXR_NAMESPACE_CLOSE_SCOPE
+
+#endif
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/api.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/api.h
new file mode 100644
index 00000000..529c31f5
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/api.h
@@ -0,0 +1,42 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MJCPHYSICS_API_H
+#define MJCPHYSICS_API_H
+
+#include
+
+#if defined(PXR_STATIC)
+#define MJCPHYSICS_API
+#define MJCPHYSICS_API_TEMPLATE_CLASS(...)
+#define MJCPHYSICS_API_TEMPLATE_STRUCT(...)
+#define MJCPHYSICS_LOCAL
+#else
+#if defined(MJCPHYSICS_EXPORTS)
+#define MJCPHYSICS_API ARCH_EXPORT
+#define MJCPHYSICS_API_TEMPLATE_CLASS(...) \
+ ARCH_EXPORT_TEMPLATE(class, __VA_ARGS__)
+#define MJCPHYSICS_API_TEMPLATE_STRUCT(...) \
+ ARCH_EXPORT_TEMPLATE(struct, __VA_ARGS__)
+#else
+#define MJCPHYSICS_API ARCH_IMPORT
+#define MJCPHYSICS_API_TEMPLATE_CLASS(...) \
+ ARCH_IMPORT_TEMPLATE(class, __VA_ARGS__)
+#define MJCPHYSICS_API_TEMPLATE_STRUCT(...) \
+ ARCH_IMPORT_TEMPLATE(struct, __VA_ARGS__)
+#endif
+#define MJCPHYSICS_LOCAL ARCH_HIDDEN
+#endif
+
+#endif
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/collisionAPI.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/collisionAPI.h
new file mode 100644
index 00000000..1203ad5a
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/collisionAPI.h
@@ -0,0 +1,388 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MJCPHYSICS_GENERATED_COLLISIONAPI_H
+#define MJCPHYSICS_GENERATED_COLLISIONAPI_H
+
+/// \file mjcPhysics/collisionAPI.h
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+PXR_NAMESPACE_OPEN_SCOPE
+
+class SdfAssetPath;
+
+// -------------------------------------------------------------------------- //
+// MJCCOLLISIONAPI //
+// -------------------------------------------------------------------------- //
+
+/// \class MjcPhysicsCollisionAPI
+///
+/// API describing a MuJoCo collider.
+///
+class MjcPhysicsCollisionAPI : public UsdAPISchemaBase {
+ public:
+ /// Compile time constant representing what kind of schema this class is.
+ ///
+ /// \sa UsdSchemaKind
+ static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI;
+
+ /// Construct a MjcPhysicsCollisionAPI on UsdPrim \p prim .
+ /// Equivalent to MjcPhysicsCollisionAPI::Get(prim.GetStage(), prim.GetPath())
+ /// for a \em valid \p prim, but will not immediately throw an error for
+ /// an invalid \p prim
+ explicit MjcPhysicsCollisionAPI(const UsdPrim& prim = UsdPrim())
+ : UsdAPISchemaBase(prim) {}
+
+ /// Construct a MjcPhysicsCollisionAPI on the prim held by \p schemaObj .
+ /// Should be preferred over MjcPhysicsCollisionAPI(schemaObj.GetPrim()),
+ /// as it preserves SchemaBase state.
+ explicit MjcPhysicsCollisionAPI(const UsdSchemaBase& schemaObj)
+ : UsdAPISchemaBase(schemaObj) {}
+
+ /// Destructor.
+ MJCPHYSICS_API
+ virtual ~MjcPhysicsCollisionAPI();
+
+ /// Return a vector of names of all pre-declared attributes for this schema
+ /// class and all its ancestor classes. Does not include attributes that
+ /// may be authored by custom/extended methods of the schemas involved.
+ MJCPHYSICS_API
+ static const TfTokenVector& GetSchemaAttributeNames(
+ bool includeInherited = true);
+
+ /// Return a MjcPhysicsCollisionAPI holding the prim adhering to this
+ /// schema at \p path on \p stage. If no prim exists at \p path on
+ /// \p stage, or if the prim at that path does not adhere to this schema,
+ /// return an invalid schema object. This is shorthand for the following:
+ ///
+ /// \code
+ /// MjcPhysicsCollisionAPI(stage->GetPrimAtPath(path));
+ /// \endcode
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsCollisionAPI Get(const UsdStagePtr& stage,
+ const SdfPath& path);
+
+ /// Returns true if this single-apply API schema can be applied to
+ /// the given \p prim. If this schema can not be a applied to the prim,
+ /// this returns false and, if provided, populates \p whyNot with the
+ /// reason it can not be applied.
+ ///
+ /// Note that if CanApply returns false, that does not necessarily imply
+ /// that calling Apply will fail. Callers are expected to call CanApply
+ /// before calling Apply if they want to ensure that it is valid to
+ /// apply a schema.
+ ///
+ /// \sa UsdPrim::GetAppliedSchemas()
+ /// \sa UsdPrim::HasAPI()
+ /// \sa UsdPrim::CanApplyAPI()
+ /// \sa UsdPrim::ApplyAPI()
+ /// \sa UsdPrim::RemoveAPI()
+ ///
+ MJCPHYSICS_API
+ static bool CanApply(const UsdPrim& prim, std::string* whyNot = nullptr);
+
+ /// Applies this single-apply API schema to the given \p prim.
+ /// This information is stored by adding "MjcCollisionAPI" to the
+ /// token-valued, listOp metadata \em apiSchemas on the prim.
+ ///
+ /// \return A valid MjcPhysicsCollisionAPI object is returned upon success.
+ /// An invalid (or empty) MjcPhysicsCollisionAPI object is returned upon
+ /// failure. See \ref UsdPrim::ApplyAPI() for conditions
+ /// resulting in failure.
+ ///
+ /// \sa UsdPrim::GetAppliedSchemas()
+ /// \sa UsdPrim::HasAPI()
+ /// \sa UsdPrim::CanApplyAPI()
+ /// \sa UsdPrim::ApplyAPI()
+ /// \sa UsdPrim::RemoveAPI()
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsCollisionAPI Apply(const UsdPrim& prim);
+
+ protected:
+ /// Returns the kind of schema this class belongs to.
+ ///
+ /// \sa UsdSchemaKind
+ MJCPHYSICS_API
+ UsdSchemaKind _GetSchemaKind() const override;
+
+ private:
+ // needs to invoke _GetStaticTfType.
+ friend class UsdSchemaRegistry;
+ MJCPHYSICS_API
+ static const TfType& _GetStaticTfType();
+
+ static bool _IsTypedSchema();
+
+ // override SchemaBase virtuals.
+ MJCPHYSICS_API
+ const TfType& _GetTfType() const override;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // GROUP
+ // --------------------------------------------------------------------- //
+ /// Integer MuJoCo group to which the collider belongs.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:group = 0` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetGroupAttr() const;
+
+ /// See GetGroupAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateGroupAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // SHELLINERTIA
+ // --------------------------------------------------------------------- //
+ /// Enables handling of the inertia assuming mass is concentrated on the
+ /// surface.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:shellinertia = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetShellInertiaAttr() const;
+
+ /// See GetShellInertiaAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateShellInertiaAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // PRIORITY
+ // --------------------------------------------------------------------- //
+ /// Priority determining how the properties of two colliders are combined to
+ /// form the properties of the contact.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:priority = 0` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetPriorityAttr() const;
+
+ /// See GetPriorityAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreatePriorityAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // CONDIM
+ // --------------------------------------------------------------------- //
+ /// The dimensionality of the contact space for a dynamically generated
+ /// contact pair is set to the maximum of the condim values of the two
+ /// participating geoms.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:condim = 3` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetConDimAttr() const;
+
+ /// See GetConDimAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateConDimAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // SOLMIX
+ // --------------------------------------------------------------------- //
+ /// Specifies the weight used for averaging of contact parameters, and
+ /// interacts with the priority attribute.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:solmix = 1` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetSolMixAttr() const;
+
+ /// See GetSolMixAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateSolMixAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // SOLREF
+ // --------------------------------------------------------------------- //
+ /// Specifies the weight used for averaging of contact parameters, and
+ /// interacts with the priority attribute.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double[] mjc:solref = [0.02, 1]` |
+ /// | C++ Type | VtArray |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetSolRefAttr() const;
+
+ /// See GetSolRefAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateSolRefAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // SOLIMP
+ // --------------------------------------------------------------------- //
+ /// Specifies the weight used for averaging of contact parameters, and
+ /// interacts with the priority attribute.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double[] mjc:solimp = [0.9, 0.95, 0.001, 0.5, 2]`
+ /// | | C++ Type | VtArray | | \ref Usd_Datatypes "Usd Type" |
+ /// SdfValueTypeNames->DoubleArray | | \ref SdfVariability "Variability" |
+ /// SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetSolImpAttr() const;
+
+ /// See GetSolImpAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateSolImpAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MARGIN
+ // --------------------------------------------------------------------- //
+ /// Distance threshold below which contacts are detected and included in the
+ /// global array mjData.contact.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:margin = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMarginAttr() const;
+
+ /// See GetMarginAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMarginAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // GAP
+ // --------------------------------------------------------------------- //
+ /// This attribute is used to enable the generation of inactive contacts,
+ /// i.e., contacts that are ignored by the constraint solver but are included
+ /// in mjData.contact for the purpose of custom computations. When this value
+ /// is positive, geom distances between margin and margin-gap correspond to
+ /// such inactive contacts.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:gap = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetGapAttr() const;
+
+ /// See GetGapAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateGapAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // ===================================================================== //
+ // Feel free to add custom code below this line, it will be preserved by
+ // the code generator.
+ //
+ // Just remember to:
+ // - Close the class declaration with };
+ // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
+ // - Close the include guard with #endif
+ // ===================================================================== //
+ // --(BEGIN CUSTOM CODE)--
+};
+
+PXR_NAMESPACE_CLOSE_SCOPE
+
+#endif
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/imageableAPI.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/imageableAPI.h
new file mode 100644
index 00000000..8a77eada
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/imageableAPI.h
@@ -0,0 +1,184 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MJCPHYSICS_GENERATED_IMAGEABLEAPI_H
+#define MJCPHYSICS_GENERATED_IMAGEABLEAPI_H
+
+/// \file mjcPhysics/imageableAPI.h
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+PXR_NAMESPACE_OPEN_SCOPE
+
+class SdfAssetPath;
+
+// -------------------------------------------------------------------------- //
+// MJCIMAGEABLEAPI //
+// -------------------------------------------------------------------------- //
+
+/// \class MjcPhysicsImageableAPI
+///
+/// API describing attributes for visual entities in MuJoCo.
+///
+class MjcPhysicsImageableAPI : public UsdAPISchemaBase {
+ public:
+ /// Compile time constant representing what kind of schema this class is.
+ ///
+ /// \sa UsdSchemaKind
+ static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI;
+
+ /// Construct a MjcPhysicsImageableAPI on UsdPrim \p prim .
+ /// Equivalent to MjcPhysicsImageableAPI::Get(prim.GetStage(), prim.GetPath())
+ /// for a \em valid \p prim, but will not immediately throw an error for
+ /// an invalid \p prim
+ explicit MjcPhysicsImageableAPI(const UsdPrim& prim = UsdPrim())
+ : UsdAPISchemaBase(prim) {}
+
+ /// Construct a MjcPhysicsImageableAPI on the prim held by \p schemaObj .
+ /// Should be preferred over MjcPhysicsImageableAPI(schemaObj.GetPrim()),
+ /// as it preserves SchemaBase state.
+ explicit MjcPhysicsImageableAPI(const UsdSchemaBase& schemaObj)
+ : UsdAPISchemaBase(schemaObj) {}
+
+ /// Destructor.
+ MJCPHYSICS_API
+ virtual ~MjcPhysicsImageableAPI();
+
+ /// Return a vector of names of all pre-declared attributes for this schema
+ /// class and all its ancestor classes. Does not include attributes that
+ /// may be authored by custom/extended methods of the schemas involved.
+ MJCPHYSICS_API
+ static const TfTokenVector& GetSchemaAttributeNames(
+ bool includeInherited = true);
+
+ /// Return a MjcPhysicsImageableAPI holding the prim adhering to this
+ /// schema at \p path on \p stage. If no prim exists at \p path on
+ /// \p stage, or if the prim at that path does not adhere to this schema,
+ /// return an invalid schema object. This is shorthand for the following:
+ ///
+ /// \code
+ /// MjcPhysicsImageableAPI(stage->GetPrimAtPath(path));
+ /// \endcode
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsImageableAPI Get(const UsdStagePtr& stage,
+ const SdfPath& path);
+
+ /// Returns true if this single-apply API schema can be applied to
+ /// the given \p prim. If this schema can not be a applied to the prim,
+ /// this returns false and, if provided, populates \p whyNot with the
+ /// reason it can not be applied.
+ ///
+ /// Note that if CanApply returns false, that does not necessarily imply
+ /// that calling Apply will fail. Callers are expected to call CanApply
+ /// before calling Apply if they want to ensure that it is valid to
+ /// apply a schema.
+ ///
+ /// \sa UsdPrim::GetAppliedSchemas()
+ /// \sa UsdPrim::HasAPI()
+ /// \sa UsdPrim::CanApplyAPI()
+ /// \sa UsdPrim::ApplyAPI()
+ /// \sa UsdPrim::RemoveAPI()
+ ///
+ MJCPHYSICS_API
+ static bool CanApply(const UsdPrim& prim, std::string* whyNot = nullptr);
+
+ /// Applies this single-apply API schema to the given \p prim.
+ /// This information is stored by adding "MjcImageableAPI" to the
+ /// token-valued, listOp metadata \em apiSchemas on the prim.
+ ///
+ /// \return A valid MjcPhysicsImageableAPI object is returned upon success.
+ /// An invalid (or empty) MjcPhysicsImageableAPI object is returned upon
+ /// failure. See \ref UsdPrim::ApplyAPI() for conditions
+ /// resulting in failure.
+ ///
+ /// \sa UsdPrim::GetAppliedSchemas()
+ /// \sa UsdPrim::HasAPI()
+ /// \sa UsdPrim::CanApplyAPI()
+ /// \sa UsdPrim::ApplyAPI()
+ /// \sa UsdPrim::RemoveAPI()
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsImageableAPI Apply(const UsdPrim& prim);
+
+ protected:
+ /// Returns the kind of schema this class belongs to.
+ ///
+ /// \sa UsdSchemaKind
+ MJCPHYSICS_API
+ UsdSchemaKind _GetSchemaKind() const override;
+
+ private:
+ // needs to invoke _GetStaticTfType.
+ friend class UsdSchemaRegistry;
+ MJCPHYSICS_API
+ static const TfType& _GetStaticTfType();
+
+ static bool _IsTypedSchema();
+
+ // override SchemaBase virtuals.
+ MJCPHYSICS_API
+ const TfType& _GetTfType() const override;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // GROUP
+ // --------------------------------------------------------------------- //
+ /// Integer MuJoCo group to which the imageable belongs.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:group = 0` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetGroupAttr() const;
+
+ /// See GetGroupAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateGroupAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // ===================================================================== //
+ // Feel free to add custom code below this line, it will be preserved by
+ // the code generator.
+ //
+ // Just remember to:
+ // - Close the class declaration with };
+ // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
+ // - Close the include guard with #endif
+ // ===================================================================== //
+ // --(BEGIN CUSTOM CODE)--
+};
+
+PXR_NAMESPACE_CLOSE_SCOPE
+
+#endif
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/jointAPI.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/jointAPI.h
new file mode 100644
index 00000000..6d53472d
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/jointAPI.h
@@ -0,0 +1,646 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MJCPHYSICS_GENERATED_JOINTAPI_H
+#define MJCPHYSICS_GENERATED_JOINTAPI_H
+
+/// \file mjcPhysics/jointAPI.h
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+PXR_NAMESPACE_OPEN_SCOPE
+
+class SdfAssetPath;
+
+// -------------------------------------------------------------------------- //
+// MJCJOINTAPI //
+// -------------------------------------------------------------------------- //
+
+/// \class MjcPhysicsJointAPI
+///
+/// API describing a MuJoCo joint.
+///
+/// For any described attribute \em Fallback \em Value or \em Allowed \em Values
+/// below that are text/tokens, the actual token is published and defined in
+/// \ref MjcPhysicsTokens. So to set an attribute to the value "rightHanded",
+/// use MjcPhysicsTokens->rightHanded as the value.
+///
+class MjcPhysicsJointAPI : public UsdAPISchemaBase {
+ public:
+ /// Compile time constant representing what kind of schema this class is.
+ ///
+ /// \sa UsdSchemaKind
+ static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI;
+
+ /// Construct a MjcPhysicsJointAPI on UsdPrim \p prim .
+ /// Equivalent to MjcPhysicsJointAPI::Get(prim.GetStage(), prim.GetPath())
+ /// for a \em valid \p prim, but will not immediately throw an error for
+ /// an invalid \p prim
+ explicit MjcPhysicsJointAPI(const UsdPrim& prim = UsdPrim())
+ : UsdAPISchemaBase(prim) {}
+
+ /// Construct a MjcPhysicsJointAPI on the prim held by \p schemaObj .
+ /// Should be preferred over MjcPhysicsJointAPI(schemaObj.GetPrim()),
+ /// as it preserves SchemaBase state.
+ explicit MjcPhysicsJointAPI(const UsdSchemaBase& schemaObj)
+ : UsdAPISchemaBase(schemaObj) {}
+
+ /// Destructor.
+ MJCPHYSICS_API
+ virtual ~MjcPhysicsJointAPI();
+
+ /// Return a vector of names of all pre-declared attributes for this schema
+ /// class and all its ancestor classes. Does not include attributes that
+ /// may be authored by custom/extended methods of the schemas involved.
+ MJCPHYSICS_API
+ static const TfTokenVector& GetSchemaAttributeNames(
+ bool includeInherited = true);
+
+ /// Return a MjcPhysicsJointAPI holding the prim adhering to this
+ /// schema at \p path on \p stage. If no prim exists at \p path on
+ /// \p stage, or if the prim at that path does not adhere to this schema,
+ /// return an invalid schema object. This is shorthand for the following:
+ ///
+ /// \code
+ /// MjcPhysicsJointAPI(stage->GetPrimAtPath(path));
+ /// \endcode
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsJointAPI Get(const UsdStagePtr& stage, const SdfPath& path);
+
+ /// Returns true if this single-apply API schema can be applied to
+ /// the given \p prim. If this schema can not be a applied to the prim,
+ /// this returns false and, if provided, populates \p whyNot with the
+ /// reason it can not be applied.
+ ///
+ /// Note that if CanApply returns false, that does not necessarily imply
+ /// that calling Apply will fail. Callers are expected to call CanApply
+ /// before calling Apply if they want to ensure that it is valid to
+ /// apply a schema.
+ ///
+ /// \sa UsdPrim::GetAppliedSchemas()
+ /// \sa UsdPrim::HasAPI()
+ /// \sa UsdPrim::CanApplyAPI()
+ /// \sa UsdPrim::ApplyAPI()
+ /// \sa UsdPrim::RemoveAPI()
+ ///
+ MJCPHYSICS_API
+ static bool CanApply(const UsdPrim& prim, std::string* whyNot = nullptr);
+
+ /// Applies this single-apply API schema to the given \p prim.
+ /// This information is stored by adding "MjcJointAPI" to the
+ /// token-valued, listOp metadata \em apiSchemas on the prim.
+ ///
+ /// \return A valid MjcPhysicsJointAPI object is returned upon success.
+ /// An invalid (or empty) MjcPhysicsJointAPI object is returned upon
+ /// failure. See \ref UsdPrim::ApplyAPI() for conditions
+ /// resulting in failure.
+ ///
+ /// \sa UsdPrim::GetAppliedSchemas()
+ /// \sa UsdPrim::HasAPI()
+ /// \sa UsdPrim::CanApplyAPI()
+ /// \sa UsdPrim::ApplyAPI()
+ /// \sa UsdPrim::RemoveAPI()
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsJointAPI Apply(const UsdPrim& prim);
+
+ protected:
+ /// Returns the kind of schema this class belongs to.
+ ///
+ /// \sa UsdSchemaKind
+ MJCPHYSICS_API
+ UsdSchemaKind _GetSchemaKind() const override;
+
+ private:
+ // needs to invoke _GetStaticTfType.
+ friend class UsdSchemaRegistry;
+ MJCPHYSICS_API
+ static const TfType& _GetStaticTfType();
+
+ static bool _IsTypedSchema();
+
+ // override SchemaBase virtuals.
+ MJCPHYSICS_API
+ const TfType& _GetTfType() const override;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // GROUP
+ // --------------------------------------------------------------------- //
+ /// Integer MuJoCo group to which the joint belongs.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:group = 0` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetGroupAttr() const;
+
+ /// See GetGroupAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateGroupAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCSPRINGDAMPER
+ // --------------------------------------------------------------------- //
+ /// When both numbers are positive, the compiler will override any stiffness
+ /// and damping values specified with the attributes below, and will instead
+ /// set them automatically so that the resulting mass-spring-damper for this
+ /// joint has the desired time constant (first value) and damping ratio
+ /// (second value). This is done by taking into account the joint inertia in
+ /// the model reference configuration. Note that the format is the same as the
+ /// solref parameter of the constraint solver.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double[] mjc:springdamper = [0, 0]` |
+ /// | C++ Type | VtArray |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcSpringdamperAttr() const;
+
+ /// See GetMjcSpringdamperAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcSpringdamperAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCSOLREFLIMIT
+ // --------------------------------------------------------------------- //
+ /// Constraint solver parameters for simulating joint limits.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double[] mjc:solreflimit = [0.02, 1]` |
+ /// | C++ Type | VtArray |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcSolreflimitAttr() const;
+
+ /// See GetMjcSolreflimitAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcSolreflimitAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCSOLIMPLIMIT
+ // --------------------------------------------------------------------- //
+ /// Constraint solver parameters for simulating joint limits.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double[] mjc:solimplimit = [0.9, 0.95, 0.001,
+ /// 0.5, 2]` | | C++ Type | VtArray | | \ref Usd_Datatypes "Usd Type"
+ /// | SdfValueTypeNames->DoubleArray | | \ref SdfVariability "Variability" |
+ /// SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcSolimplimitAttr() const;
+
+ /// See GetMjcSolimplimitAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcSolimplimitAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCSOLREFFRICTION
+ // --------------------------------------------------------------------- //
+ /// Constraint solver parameters for simulating dry friction.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double[] mjc:solreffriction = [0.02, 1]` |
+ /// | C++ Type | VtArray |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcSolreffrictionAttr() const;
+
+ /// See GetMjcSolreffrictionAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcSolreffrictionAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCSOLIMPFRICTION
+ // --------------------------------------------------------------------- //
+ /// Constraint solver parameters for simulating dry friction.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double[] mjc:solimpfriction = [0.9, 0.95, 0.001,
+ /// 0.5, 2]` | | C++ Type | VtArray | | \ref Usd_Datatypes "Usd Type"
+ /// | SdfValueTypeNames->DoubleArray | | \ref SdfVariability "Variability" |
+ /// SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcSolimpfrictionAttr() const;
+
+ /// See GetMjcSolimpfrictionAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcSolimpfrictionAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCSTIFFNESS
+ // --------------------------------------------------------------------- //
+ /// Joint stiffness. If this value is positive, a spring will be created with
+ /// equilibrium position given by springref below. The spring force is
+ /// computed along with the other passive forces.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:stiffness = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcStiffnessAttr() const;
+
+ /// See GetMjcStiffnessAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcStiffnessAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCACTUATORFRCRANGEMIN
+ // --------------------------------------------------------------------- //
+ /// Minimum range for clamping total actuator forces acting on this joint. See
+ /// Force limits for details. It is available only for scalar joints (hinge
+ /// and slider) and ignored for ball and free joints. The compiler expects the
+ /// first value to be smaller than the second value. Setting this attribute
+ /// without specifying actuatorfrclimited is an error if compiler-autolimits
+ /// is 'false'.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:actuatorfrcrange:min = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcActuatorfrcrangeMinAttr() const;
+
+ /// See GetMjcActuatorfrcrangeMinAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcActuatorfrcrangeMinAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCACTUATORFRCRANGEMAX
+ // --------------------------------------------------------------------- //
+ /// Maximum range for clamping total actuator forces acting on this joint. See
+ /// Force limits for details. It is available only for scalar joints (hinge
+ /// and slider) and ignored for ball and free joints. The compiler expects the
+ /// first value to be smaller than the second value. Setting this attribute
+ /// without specifying actuatorfrclimited is an error if compiler-autolimits
+ /// is 'false'.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:actuatorfrcrange:max = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcActuatorfrcrangeMaxAttr() const;
+
+ /// See GetMjcActuatorfrcrangeMaxAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcActuatorfrcrangeMaxAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCACTUATORFRCLIMITED
+ // --------------------------------------------------------------------- //
+ /// This attribute specifies whether actuator forces acting on the joint
+ /// should be clamped. See Force limits for details. It is available only for
+ /// scalar joints (hinge and slider) and ignored for ball and free joints.
+ /// This attribute interacts with the actuatorfrcrange attribute. If this
+ /// attribute is 'false', actuator force clamping is disabled. If it is
+ /// 'true', actuator force clamping is enabled. If this attribute is 'auto',
+ /// and autolimits is set in compiler, actuator force clamping will be enabled
+ /// if actuatorfrcrange is defined.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform token mjc:actuatorfrclimited = "auto"` |
+ /// | C++ Type | TfToken |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ /// | \ref MjcPhysicsTokens "Allowed Values" | false, true, auto |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcActuatorfrclimitedAttr() const;
+
+ /// See GetMjcActuatorfrclimitedAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcActuatorfrclimitedAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCACTUATORGRAVCOMP
+ // --------------------------------------------------------------------- //
+ /// If this flag is enabled, gravity compensation applied to this joint is
+ /// added to actuator forces (mjData.qfrc_actuator) rather than passive forces
+ /// (mjData.qfrc_passive). Notionally, this means that gravity compensation is
+ /// the result of a control system rather than natural buoyancy. In practice,
+ /// enabling this flag is useful when joint-level actuator force clamping is
+ /// used. In this case, the total actuation force applied on a joint,
+ /// including gravity compensation, is guaranteed to not exceed the specified
+ /// limits. See Force limits and actuatorfrcrange for more details on this
+ /// type of force limit.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:actuatorgravcomp = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcActuatorgravcompAttr() const;
+
+ /// See GetMjcActuatorgravcompAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcActuatorgravcompAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCMARGIN
+ // --------------------------------------------------------------------- //
+ /// The distance threshold below which limits become active. Recall that the
+ /// Constraint solver normally generates forces as soon as a constraint
+ /// becomes active, even if the margin parameter makes that happen at a
+ /// distance. This attribute together with solreflimit and solimplimit can be
+ /// used to model a soft joint limit.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:margin = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcMarginAttr() const;
+
+ /// See GetMjcMarginAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcMarginAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCREF
+ // --------------------------------------------------------------------- //
+ /// The reference position or angle of the joint. This attribute is only used
+ /// for slide and hinge joints. It defines the joint value corresponding to
+ /// the initial model configuration. The amount of spatial transformation that
+ /// the joint applies at runtime equals the current joint value stored in
+ /// mjData.qpos minus this reference value stored in mjModel.qpos0. The
+ /// meaning of these vectors was discussed in the Stand-alone section in the
+ /// Overview chapter.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:ref = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcRefAttr() const;
+
+ /// See GetMjcRefAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcRefAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCSPRINGREF
+ // --------------------------------------------------------------------- //
+ /// The joint position or angle in which the joint spring (if any) achieves
+ /// equilibrium. Similar to the vector mjModel.qpos0 which stores all joint
+ /// reference values specified with the ref attribute above, all spring
+ /// reference values specified with this attribute are stored in the vector
+ /// mjModel.qpos_spring. The model configuration corresponding to
+ /// mjModel.qpos_spring is also used to compute the spring reference lengths
+ /// of all tendons, stored in mjModel.tendon_lengthspring. This is because
+ /// tendons can also have springs.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:springref = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcSpringrefAttr() const;
+
+ /// See GetMjcSpringrefAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcSpringrefAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCARMATURE
+ // --------------------------------------------------------------------- //
+ /// Additional inertia associated with movement of the joint that is not due
+ /// to body mass. This added inertia is usually due to a rotor (a.k.a
+ /// armature) spinning faster than the joint itself due to a geared
+ /// transmission. The value applies to all degrees of freedom created by this
+ /// joint. Besides increasing the realism of joints with geared transmission,
+ /// positive armature significantly improves simulation stability, even for
+ /// small values, and is a recommended possible fix when encountering
+ /// stability issues.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:armature = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcArmatureAttr() const;
+
+ /// See GetMjcArmatureAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcArmatureAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCDAMPING
+ // --------------------------------------------------------------------- //
+ /// Damping applied to all degrees of freedom created by this joint. Unlike
+ /// friction loss which is computed by the constraint solver, damping is
+ /// simply a force linear in velocity. It is included in the passive forces.
+ /// Despite this simplicity, larger damping values can make numerical
+ /// integrators unstable, which is why our Euler integrator handles damping
+ /// implicitly. See Integration in the Computation chapter.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:damping = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcDampingAttr() const;
+
+ /// See GetMjcDampingAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcDampingAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCFRICTIONLOSS
+ // --------------------------------------------------------------------- //
+ /// Friction loss due to dry friction. This value is the same for all degrees
+ /// of freedom created by this joint. Semantically friction loss does not make
+ /// sense for free joints, but the compiler allows it. To enable friction
+ /// loss, set this attribute to a positive value.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:frictionloss = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcFrictionlossAttr() const;
+
+ /// See GetMjcFrictionlossAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcFrictionlossAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // ===================================================================== //
+ // Feel free to add custom code below this line, it will be preserved by
+ // the code generator.
+ //
+ // Just remember to:
+ // - Close the class declaration with };
+ // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
+ // - Close the include guard with #endif
+ // ===================================================================== //
+ // --(BEGIN CUSTOM CODE)--
+};
+
+PXR_NAMESPACE_CLOSE_SCOPE
+
+#endif
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/keyframe.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/keyframe.h
new file mode 100644
index 00000000..4fa0091c
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/keyframe.h
@@ -0,0 +1,292 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MJCPHYSICS_GENERATED_KEYFRAME_H
+#define MJCPHYSICS_GENERATED_KEYFRAME_H
+
+/// \file mjcPhysics/keyframe.h
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+PXR_NAMESPACE_OPEN_SCOPE
+
+class SdfAssetPath;
+
+// -------------------------------------------------------------------------- //
+// MJCKEYFRAME //
+// -------------------------------------------------------------------------- //
+
+/// \class MjcPhysicsKeyframe
+///
+/// Represents time independent keyframe values.
+///
+class MjcPhysicsKeyframe : public UsdTyped {
+ public:
+ /// Compile time constant representing what kind of schema this class is.
+ ///
+ /// \sa UsdSchemaKind
+ static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
+
+ /// Construct a MjcPhysicsKeyframe on UsdPrim \p prim .
+ /// Equivalent to MjcPhysicsKeyframe::Get(prim.GetStage(), prim.GetPath())
+ /// for a \em valid \p prim, but will not immediately throw an error for
+ /// an invalid \p prim
+ explicit MjcPhysicsKeyframe(const UsdPrim& prim = UsdPrim())
+ : UsdTyped(prim) {}
+
+ /// Construct a MjcPhysicsKeyframe on the prim held by \p schemaObj .
+ /// Should be preferred over MjcPhysicsKeyframe(schemaObj.GetPrim()),
+ /// as it preserves SchemaBase state.
+ explicit MjcPhysicsKeyframe(const UsdSchemaBase& schemaObj)
+ : UsdTyped(schemaObj) {}
+
+ /// Destructor.
+ MJCPHYSICS_API
+ virtual ~MjcPhysicsKeyframe();
+
+ /// Return a vector of names of all pre-declared attributes for this schema
+ /// class and all its ancestor classes. Does not include attributes that
+ /// may be authored by custom/extended methods of the schemas involved.
+ MJCPHYSICS_API
+ static const TfTokenVector& GetSchemaAttributeNames(
+ bool includeInherited = true);
+
+ /// Return a MjcPhysicsKeyframe holding the prim adhering to this
+ /// schema at \p path on \p stage. If no prim exists at \p path on
+ /// \p stage, or if the prim at that path does not adhere to this schema,
+ /// return an invalid schema object. This is shorthand for the following:
+ ///
+ /// \code
+ /// MjcPhysicsKeyframe(stage->GetPrimAtPath(path));
+ /// \endcode
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsKeyframe Get(const UsdStagePtr& stage, const SdfPath& path);
+
+ /// Attempt to ensure a \a UsdPrim adhering to this schema at \p path
+ /// is defined (according to UsdPrim::IsDefined()) on this stage.
+ ///
+ /// If a prim adhering to this schema at \p path is already defined on this
+ /// stage, return that prim. Otherwise author an \a SdfPrimSpec with
+ /// \a specifier == \a SdfSpecifierDef and this schema's prim type name for
+ /// the prim at \p path at the current EditTarget. Author \a SdfPrimSpec s
+ /// with \p specifier == \a SdfSpecifierDef and empty typeName at the
+ /// current EditTarget for any nonexistent, or existing but not \a Defined
+ /// ancestors.
+ ///
+ /// The given \a path must be an absolute prim path that does not contain
+ /// any variant selections.
+ ///
+ /// If it is impossible to author any of the necessary PrimSpecs, (for
+ /// example, in case \a path cannot map to the current UsdEditTarget's
+ /// namespace) issue an error and return an invalid \a UsdPrim.
+ ///
+ /// Note that this method may return a defined prim whose typeName does not
+ /// specify this schema class, in case a stronger typeName opinion overrides
+ /// the opinion at the current EditTarget.
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsKeyframe Define(const UsdStagePtr& stage,
+ const SdfPath& path);
+
+ protected:
+ /// Returns the kind of schema this class belongs to.
+ ///
+ /// \sa UsdSchemaKind
+ MJCPHYSICS_API
+ UsdSchemaKind _GetSchemaKind() const override;
+
+ private:
+ // needs to invoke _GetStaticTfType.
+ friend class UsdSchemaRegistry;
+ MJCPHYSICS_API
+ static const TfType& _GetStaticTfType();
+
+ static bool _IsTypedSchema();
+
+ // override SchemaBase virtuals.
+ MJCPHYSICS_API
+ const TfType& _GetTfType() const override;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCQPOS
+ // --------------------------------------------------------------------- //
+ /// Vector of joint positions, copied into mjData.qpos when the simulation
+ /// state is set to this keyframe.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `double[] mjc:qpos` |
+ /// | C++ Type | VtArray |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcQposAttr() const;
+
+ /// See GetMjcQposAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcQposAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCQVEL
+ // --------------------------------------------------------------------- //
+ /// Vector of joint velocities, copied into mjData.qvel when the simulation
+ /// state is set to this keyframe.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `double[] mjc:qvel` |
+ /// | C++ Type | VtArray |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcQvelAttr() const;
+
+ /// See GetMjcQvelAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcQvelAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCACT
+ // --------------------------------------------------------------------- //
+ /// Vector of actuator activations, copied into mjData.act when the simulation
+ /// state is set to this keyframe.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `double[] mjc:act` |
+ /// | C++ Type | VtArray |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcActAttr() const;
+
+ /// See GetMjcActAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcActAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCCTRL
+ // --------------------------------------------------------------------- //
+ /// Vector of controls, copied into mjData.ctrl when the simulation state is
+ /// set to this keyframe.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `double[] mjc:ctrl` |
+ /// | C++ Type | VtArray |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcCtrlAttr() const;
+
+ /// See GetMjcCtrlAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcCtrlAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCMPOS
+ // --------------------------------------------------------------------- //
+ /// Vector of mocap body positions, copied into mjData.mocap_pos when the
+ /// simulation state is set to this keyframe.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `double[] mjc:mpos` |
+ /// | C++ Type | VtArray |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcMposAttr() const;
+
+ /// See GetMjcMposAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcMposAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MJCMQUAT
+ // --------------------------------------------------------------------- //
+ /// Vector of mocap body quaternions, copied into mjData.mocap_quat when the
+ /// simulation state is set to this keyframe.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `double[] mjc:mquat` |
+ /// | C++ Type | VtArray |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
+ MJCPHYSICS_API
+ UsdAttribute GetMjcMquatAttr() const;
+
+ /// See GetMjcMquatAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMjcMquatAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // ===================================================================== //
+ // Feel free to add custom code below this line, it will be preserved by
+ // the code generator.
+ //
+ // Just remember to:
+ // - Close the class declaration with };
+ // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
+ // - Close the include guard with #endif
+ // ===================================================================== //
+ // --(BEGIN CUSTOM CODE)--
+};
+
+PXR_NAMESPACE_CLOSE_SCOPE
+
+#endif
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/materialAPI.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/materialAPI.h
new file mode 100644
index 00000000..8d30abfa
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/materialAPI.h
@@ -0,0 +1,210 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MJCPHYSICS_GENERATED_MATERIALAPI_H
+#define MJCPHYSICS_GENERATED_MATERIALAPI_H
+
+/// \file mjcPhysics/materialAPI.h
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+PXR_NAMESPACE_OPEN_SCOPE
+
+class SdfAssetPath;
+
+// -------------------------------------------------------------------------- //
+// MJCMATERIALAPI //
+// -------------------------------------------------------------------------- //
+
+/// \class MjcPhysicsMaterialAPI
+///
+/// API providing extension attributes to represent physical MuJoCo materials.
+///
+class MjcPhysicsMaterialAPI : public UsdAPISchemaBase {
+ public:
+ /// Compile time constant representing what kind of schema this class is.
+ ///
+ /// \sa UsdSchemaKind
+ static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI;
+
+ /// Construct a MjcPhysicsMaterialAPI on UsdPrim \p prim .
+ /// Equivalent to MjcPhysicsMaterialAPI::Get(prim.GetStage(), prim.GetPath())
+ /// for a \em valid \p prim, but will not immediately throw an error for
+ /// an invalid \p prim
+ explicit MjcPhysicsMaterialAPI(const UsdPrim& prim = UsdPrim())
+ : UsdAPISchemaBase(prim) {}
+
+ /// Construct a MjcPhysicsMaterialAPI on the prim held by \p schemaObj .
+ /// Should be preferred over MjcPhysicsMaterialAPI(schemaObj.GetPrim()),
+ /// as it preserves SchemaBase state.
+ explicit MjcPhysicsMaterialAPI(const UsdSchemaBase& schemaObj)
+ : UsdAPISchemaBase(schemaObj) {}
+
+ /// Destructor.
+ MJCPHYSICS_API
+ virtual ~MjcPhysicsMaterialAPI();
+
+ /// Return a vector of names of all pre-declared attributes for this schema
+ /// class and all its ancestor classes. Does not include attributes that
+ /// may be authored by custom/extended methods of the schemas involved.
+ MJCPHYSICS_API
+ static const TfTokenVector& GetSchemaAttributeNames(
+ bool includeInherited = true);
+
+ /// Return a MjcPhysicsMaterialAPI holding the prim adhering to this
+ /// schema at \p path on \p stage. If no prim exists at \p path on
+ /// \p stage, or if the prim at that path does not adhere to this schema,
+ /// return an invalid schema object. This is shorthand for the following:
+ ///
+ /// \code
+ /// MjcPhysicsMaterialAPI(stage->GetPrimAtPath(path));
+ /// \endcode
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsMaterialAPI Get(const UsdStagePtr& stage,
+ const SdfPath& path);
+
+ /// Returns true if this single-apply API schema can be applied to
+ /// the given \p prim. If this schema can not be a applied to the prim,
+ /// this returns false and, if provided, populates \p whyNot with the
+ /// reason it can not be applied.
+ ///
+ /// Note that if CanApply returns false, that does not necessarily imply
+ /// that calling Apply will fail. Callers are expected to call CanApply
+ /// before calling Apply if they want to ensure that it is valid to
+ /// apply a schema.
+ ///
+ /// \sa UsdPrim::GetAppliedSchemas()
+ /// \sa UsdPrim::HasAPI()
+ /// \sa UsdPrim::CanApplyAPI()
+ /// \sa UsdPrim::ApplyAPI()
+ /// \sa UsdPrim::RemoveAPI()
+ ///
+ MJCPHYSICS_API
+ static bool CanApply(const UsdPrim& prim, std::string* whyNot = nullptr);
+
+ /// Applies this single-apply API schema to the given \p prim.
+ /// This information is stored by adding "MjcMaterialAPI" to the
+ /// token-valued, listOp metadata \em apiSchemas on the prim.
+ ///
+ /// \return A valid MjcPhysicsMaterialAPI object is returned upon success.
+ /// An invalid (or empty) MjcPhysicsMaterialAPI object is returned upon
+ /// failure. See \ref UsdPrim::ApplyAPI() for conditions
+ /// resulting in failure.
+ ///
+ /// \sa UsdPrim::GetAppliedSchemas()
+ /// \sa UsdPrim::HasAPI()
+ /// \sa UsdPrim::CanApplyAPI()
+ /// \sa UsdPrim::ApplyAPI()
+ /// \sa UsdPrim::RemoveAPI()
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsMaterialAPI Apply(const UsdPrim& prim);
+
+ protected:
+ /// Returns the kind of schema this class belongs to.
+ ///
+ /// \sa UsdSchemaKind
+ MJCPHYSICS_API
+ UsdSchemaKind _GetSchemaKind() const override;
+
+ private:
+ // needs to invoke _GetStaticTfType.
+ friend class UsdSchemaRegistry;
+ MJCPHYSICS_API
+ static const TfType& _GetStaticTfType();
+
+ static bool _IsTypedSchema();
+
+ // override SchemaBase virtuals.
+ MJCPHYSICS_API
+ const TfType& _GetTfType() const override;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // TORSIONALFRICTION
+ // --------------------------------------------------------------------- //
+ /// Friction value acting around contact normal.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:torsionalfriction = 0.005` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetTorsionalFrictionAttr() const;
+
+ /// See GetTorsionalFrictionAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateTorsionalFrictionAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // ROLLINGFRICTION
+ // --------------------------------------------------------------------- //
+ /// Friction value acting around both axes on the contact tangent plane.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:rollingfriction = 0.0001` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetRollingFrictionAttr() const;
+
+ /// See GetRollingFrictionAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateRollingFrictionAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // ===================================================================== //
+ // Feel free to add custom code below this line, it will be preserved by
+ // the code generator.
+ //
+ // Just remember to:
+ // - Close the class declaration with };
+ // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
+ // - Close the include guard with #endif
+ // ===================================================================== //
+ // --(BEGIN CUSTOM CODE)--
+};
+
+PXR_NAMESPACE_CLOSE_SCOPE
+
+#endif
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/meshCollisionAPI.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/meshCollisionAPI.h
new file mode 100644
index 00000000..431e9c38
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/meshCollisionAPI.h
@@ -0,0 +1,216 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MJCPHYSICS_GENERATED_MESHCOLLISIONAPI_H
+#define MJCPHYSICS_GENERATED_MESHCOLLISIONAPI_H
+
+/// \file mjcPhysics/meshCollisionAPI.h
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+PXR_NAMESPACE_OPEN_SCOPE
+
+class SdfAssetPath;
+
+// -------------------------------------------------------------------------- //
+// MJCMESHCOLLISIONAPI //
+// -------------------------------------------------------------------------- //
+
+/// \class MjcPhysicsMeshCollisionAPI
+///
+/// API describing a MuJoCo mesh collider.
+///
+/// For any described attribute \em Fallback \em Value or \em Allowed \em Values
+/// below that are text/tokens, the actual token is published and defined in
+/// \ref MjcPhysicsTokens. So to set an attribute to the value "rightHanded",
+/// use MjcPhysicsTokens->rightHanded as the value.
+///
+class MjcPhysicsMeshCollisionAPI : public UsdAPISchemaBase {
+ public:
+ /// Compile time constant representing what kind of schema this class is.
+ ///
+ /// \sa UsdSchemaKind
+ static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI;
+
+ /// Construct a MjcPhysicsMeshCollisionAPI on UsdPrim \p prim .
+ /// Equivalent to MjcPhysicsMeshCollisionAPI::Get(prim.GetStage(),
+ /// prim.GetPath()) for a \em valid \p prim, but will not immediately throw an
+ /// error for an invalid \p prim
+ explicit MjcPhysicsMeshCollisionAPI(const UsdPrim& prim = UsdPrim())
+ : UsdAPISchemaBase(prim) {}
+
+ /// Construct a MjcPhysicsMeshCollisionAPI on the prim held by \p schemaObj .
+ /// Should be preferred over MjcPhysicsMeshCollisionAPI(schemaObj.GetPrim()),
+ /// as it preserves SchemaBase state.
+ explicit MjcPhysicsMeshCollisionAPI(const UsdSchemaBase& schemaObj)
+ : UsdAPISchemaBase(schemaObj) {}
+
+ /// Destructor.
+ MJCPHYSICS_API
+ virtual ~MjcPhysicsMeshCollisionAPI();
+
+ /// Return a vector of names of all pre-declared attributes for this schema
+ /// class and all its ancestor classes. Does not include attributes that
+ /// may be authored by custom/extended methods of the schemas involved.
+ MJCPHYSICS_API
+ static const TfTokenVector& GetSchemaAttributeNames(
+ bool includeInherited = true);
+
+ /// Return a MjcPhysicsMeshCollisionAPI holding the prim adhering to this
+ /// schema at \p path on \p stage. If no prim exists at \p path on
+ /// \p stage, or if the prim at that path does not adhere to this schema,
+ /// return an invalid schema object. This is shorthand for the following:
+ ///
+ /// \code
+ /// MjcPhysicsMeshCollisionAPI(stage->GetPrimAtPath(path));
+ /// \endcode
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsMeshCollisionAPI Get(const UsdStagePtr& stage,
+ const SdfPath& path);
+
+ /// Returns true if this single-apply API schema can be applied to
+ /// the given \p prim. If this schema can not be a applied to the prim,
+ /// this returns false and, if provided, populates \p whyNot with the
+ /// reason it can not be applied.
+ ///
+ /// Note that if CanApply returns false, that does not necessarily imply
+ /// that calling Apply will fail. Callers are expected to call CanApply
+ /// before calling Apply if they want to ensure that it is valid to
+ /// apply a schema.
+ ///
+ /// \sa UsdPrim::GetAppliedSchemas()
+ /// \sa UsdPrim::HasAPI()
+ /// \sa UsdPrim::CanApplyAPI()
+ /// \sa UsdPrim::ApplyAPI()
+ /// \sa UsdPrim::RemoveAPI()
+ ///
+ MJCPHYSICS_API
+ static bool CanApply(const UsdPrim& prim, std::string* whyNot = nullptr);
+
+ /// Applies this single-apply API schema to the given \p prim.
+ /// This information is stored by adding "MjcMeshCollisionAPI" to the
+ /// token-valued, listOp metadata \em apiSchemas on the prim.
+ ///
+ /// \return A valid MjcPhysicsMeshCollisionAPI object is returned upon
+ /// success. An invalid (or empty) MjcPhysicsMeshCollisionAPI object is
+ /// returned upon failure. See \ref UsdPrim::ApplyAPI() for conditions
+ /// resulting in failure.
+ ///
+ /// \sa UsdPrim::GetAppliedSchemas()
+ /// \sa UsdPrim::HasAPI()
+ /// \sa UsdPrim::CanApplyAPI()
+ /// \sa UsdPrim::ApplyAPI()
+ /// \sa UsdPrim::RemoveAPI()
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsMeshCollisionAPI Apply(const UsdPrim& prim);
+
+ protected:
+ /// Returns the kind of schema this class belongs to.
+ ///
+ /// \sa UsdSchemaKind
+ MJCPHYSICS_API
+ UsdSchemaKind _GetSchemaKind() const override;
+
+ private:
+ // needs to invoke _GetStaticTfType.
+ friend class UsdSchemaRegistry;
+ MJCPHYSICS_API
+ static const TfType& _GetStaticTfType();
+
+ static bool _IsTypedSchema();
+
+ // override SchemaBase virtuals.
+ MJCPHYSICS_API
+ const TfType& _GetTfType() const override;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // INERTIA
+ // --------------------------------------------------------------------- //
+ /// Controls how a mesh is used when mass and inertia are inferred from
+ /// geometry.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform token mjc:inertia = "legacy"` |
+ /// | C++ Type | TfToken |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ /// | \ref MjcPhysicsTokens "Allowed Values" | legacy, convex, exact, shell |
+ MJCPHYSICS_API
+ UsdAttribute GetInertiaAttr() const;
+
+ /// See GetInertiaAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateInertiaAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MAXHULLVERT
+ // --------------------------------------------------------------------- //
+ /// Sets an upper limit on the number of vertices in the meshes convex hull.
+ /// The default value of -1 means unlimited.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:maxhullvert = -1` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMaxHullVertAttr() const;
+
+ /// See GetMaxHullVertAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMaxHullVertAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // ===================================================================== //
+ // Feel free to add custom code below this line, it will be preserved by
+ // the code generator.
+ //
+ // Just remember to:
+ // - Close the class declaration with };
+ // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
+ // - Close the include guard with #endif
+ // ===================================================================== //
+ // --(BEGIN CUSTOM CODE)--
+};
+
+PXR_NAMESPACE_CLOSE_SCOPE
+
+#endif
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/sceneAPI.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/sceneAPI.h
new file mode 100644
index 00000000..e91abe51
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/sceneAPI.h
@@ -0,0 +1,1781 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MJCPHYSICS_GENERATED_SCENEAPI_H
+#define MJCPHYSICS_GENERATED_SCENEAPI_H
+
+/// \file mjcPhysics/sceneAPI.h
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+PXR_NAMESPACE_OPEN_SCOPE
+
+class SdfAssetPath;
+
+// -------------------------------------------------------------------------- //
+// MJCSCENEAPI //
+// -------------------------------------------------------------------------- //
+
+/// \class MjcPhysicsSceneAPI
+///
+/// API providing global simulation options for MuJoCo.
+///
+/// For any described attribute \em Fallback \em Value or \em Allowed \em Values
+/// below that are text/tokens, the actual token is published and defined in
+/// \ref MjcPhysicsTokens. So to set an attribute to the value "rightHanded",
+/// use MjcPhysicsTokens->rightHanded as the value.
+///
+class MjcPhysicsSceneAPI : public UsdAPISchemaBase {
+ public:
+ /// Compile time constant representing what kind of schema this class is.
+ ///
+ /// \sa UsdSchemaKind
+ static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI;
+
+ /// Construct a MjcPhysicsSceneAPI on UsdPrim \p prim .
+ /// Equivalent to MjcPhysicsSceneAPI::Get(prim.GetStage(), prim.GetPath())
+ /// for a \em valid \p prim, but will not immediately throw an error for
+ /// an invalid \p prim
+ explicit MjcPhysicsSceneAPI(const UsdPrim& prim = UsdPrim())
+ : UsdAPISchemaBase(prim) {}
+
+ /// Construct a MjcPhysicsSceneAPI on the prim held by \p schemaObj .
+ /// Should be preferred over MjcPhysicsSceneAPI(schemaObj.GetPrim()),
+ /// as it preserves SchemaBase state.
+ explicit MjcPhysicsSceneAPI(const UsdSchemaBase& schemaObj)
+ : UsdAPISchemaBase(schemaObj) {}
+
+ /// Destructor.
+ MJCPHYSICS_API
+ virtual ~MjcPhysicsSceneAPI();
+
+ /// Return a vector of names of all pre-declared attributes for this schema
+ /// class and all its ancestor classes. Does not include attributes that
+ /// may be authored by custom/extended methods of the schemas involved.
+ MJCPHYSICS_API
+ static const TfTokenVector& GetSchemaAttributeNames(
+ bool includeInherited = true);
+
+ /// Return a MjcPhysicsSceneAPI holding the prim adhering to this
+ /// schema at \p path on \p stage. If no prim exists at \p path on
+ /// \p stage, or if the prim at that path does not adhere to this schema,
+ /// return an invalid schema object. This is shorthand for the following:
+ ///
+ /// \code
+ /// MjcPhysicsSceneAPI(stage->GetPrimAtPath(path));
+ /// \endcode
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsSceneAPI Get(const UsdStagePtr& stage, const SdfPath& path);
+
+ /// Returns true if this single-apply API schema can be applied to
+ /// the given \p prim. If this schema can not be a applied to the prim,
+ /// this returns false and, if provided, populates \p whyNot with the
+ /// reason it can not be applied.
+ ///
+ /// Note that if CanApply returns false, that does not necessarily imply
+ /// that calling Apply will fail. Callers are expected to call CanApply
+ /// before calling Apply if they want to ensure that it is valid to
+ /// apply a schema.
+ ///
+ /// \sa UsdPrim::GetAppliedSchemas()
+ /// \sa UsdPrim::HasAPI()
+ /// \sa UsdPrim::CanApplyAPI()
+ /// \sa UsdPrim::ApplyAPI()
+ /// \sa UsdPrim::RemoveAPI()
+ ///
+ MJCPHYSICS_API
+ static bool CanApply(const UsdPrim& prim, std::string* whyNot = nullptr);
+
+ /// Applies this single-apply API schema to the given \p prim.
+ /// This information is stored by adding "MjcSceneAPI" to the
+ /// token-valued, listOp metadata \em apiSchemas on the prim.
+ ///
+ /// \return A valid MjcPhysicsSceneAPI object is returned upon success.
+ /// An invalid (or empty) MjcPhysicsSceneAPI object is returned upon
+ /// failure. See \ref UsdPrim::ApplyAPI() for conditions
+ /// resulting in failure.
+ ///
+ /// \sa UsdPrim::GetAppliedSchemas()
+ /// \sa UsdPrim::HasAPI()
+ /// \sa UsdPrim::CanApplyAPI()
+ /// \sa UsdPrim::ApplyAPI()
+ /// \sa UsdPrim::RemoveAPI()
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsSceneAPI Apply(const UsdPrim& prim);
+
+ protected:
+ /// Returns the kind of schema this class belongs to.
+ ///
+ /// \sa UsdSchemaKind
+ MJCPHYSICS_API
+ UsdSchemaKind _GetSchemaKind() const override;
+
+ private:
+ // needs to invoke _GetStaticTfType.
+ friend class UsdSchemaRegistry;
+ MJCPHYSICS_API
+ static const TfType& _GetStaticTfType();
+
+ static bool _IsTypedSchema();
+
+ // override SchemaBase virtuals.
+ MJCPHYSICS_API
+ const TfType& _GetTfType() const override;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // TIMESTEP
+ // --------------------------------------------------------------------- //
+ /// Controls the timestep in seconds used by MuJoCo.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:option:timestep = 0.002` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetTimestepAttr() const;
+
+ /// See GetTimestepAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateTimestepAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // IMPRATIO
+ // --------------------------------------------------------------------- //
+ /// Ratio of frictional-to-normal constraint impedance for elliptic
+ /// friction cones.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:option:impratio = 1` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetImpRatioAttr() const;
+
+ /// See GetImpRatioAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateImpRatioAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // WIND
+ // --------------------------------------------------------------------- //
+ /// Velocity vector of medium (i.e. wind).
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double3 mjc:option:wind = (0, 0, 0)` |
+ /// | C++ Type | GfVec3d |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double3 |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetWindAttr() const;
+
+ /// See GetWindAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateWindAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MAGNETIC
+ // --------------------------------------------------------------------- //
+ /// Global magnetic flux.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double3 mjc:option:magnetic = (0, -0.5, 0)` |
+ /// | C++ Type | GfVec3d |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double3 |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMagneticAttr() const;
+
+ /// See GetMagneticAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMagneticAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // DENSITY
+ // --------------------------------------------------------------------- //
+ /// Density of medium.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:option:density = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetDensityAttr() const;
+
+ /// See GetDensityAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateDensityAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // VISCOSITY
+ // --------------------------------------------------------------------- //
+ /// Viscosity of medium.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:option:viscosity = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetViscosityAttr() const;
+
+ /// See GetViscosityAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateViscosityAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // OMARGIN
+ // --------------------------------------------------------------------- //
+ /// Replaces the margin parameter of all active contact pairs when
+ /// Contact override is enabled.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:option:o_margin = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetOMarginAttr() const;
+
+ /// See GetOMarginAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateOMarginAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // OSOLREF
+ // --------------------------------------------------------------------- //
+ /// Replaces the solref parameter of all active contact pairs when
+ /// Contact override is enabled.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double[] mjc:option:o_solref = [0.02, 1]` |
+ /// | C++ Type | VtArray |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetOSolRefAttr() const;
+
+ /// See GetOSolRefAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateOSolRefAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // OSOLIMP
+ // --------------------------------------------------------------------- //
+ /// Replaces the solimp parameter of all active contact pairs when
+ /// Contact override is enabled.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double[] mjc:option:o_solimp = [0.9, 0.95, 0.001,
+ /// 0.5, 2]` | | C++ Type | VtArray | | \ref Usd_Datatypes "Usd Type"
+ /// | SdfValueTypeNames->DoubleArray | | \ref SdfVariability "Variability" |
+ /// SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetOSolImpAttr() const;
+
+ /// See GetOSolImpAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateOSolImpAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // OFRICTION
+ // --------------------------------------------------------------------- //
+ /// Replaces the friction parameter of all active contact pairs when
+ /// Contact override is enabled.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double[] mjc:option:o_friction = [1, 1, 0.005,
+ /// 0.0001, 0.0001]` | | C++ Type | VtArray | | \ref Usd_Datatypes
+ /// "Usd Type" | SdfValueTypeNames->DoubleArray | | \ref SdfVariability
+ /// "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetOFrictionAttr() const;
+
+ /// See GetOFrictionAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateOFrictionAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // INTEGRATOR
+ // --------------------------------------------------------------------- //
+ /// Numerical integrator to be used.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform token mjc:option:integrator = "euler"` |
+ /// | C++ Type | TfToken |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ /// | \ref MjcPhysicsTokens "Allowed Values" | euler, rk4, implicit,
+ /// implicitfast |
+ MJCPHYSICS_API
+ UsdAttribute GetIntegratorAttr() const;
+
+ /// See GetIntegratorAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateIntegratorAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // CONE
+ // --------------------------------------------------------------------- //
+ /// The type of contact friction cone.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform token mjc:option:cone = "pyramidal"` |
+ /// | C++ Type | TfToken |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ /// | \ref MjcPhysicsTokens "Allowed Values" | pyramidal, elliptic |
+ MJCPHYSICS_API
+ UsdAttribute GetConeAttr() const;
+
+ /// See GetConeAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateConeAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // JACOBIAN
+ // --------------------------------------------------------------------- //
+ /// The type of constraint Jacobian and matrices computed from it.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform token mjc:option:jacobian = "auto"` |
+ /// | C++ Type | TfToken |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ /// | \ref MjcPhysicsTokens "Allowed Values" | auto, dense, sparse |
+ MJCPHYSICS_API
+ UsdAttribute GetJacobianAttr() const;
+
+ /// See GetJacobianAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateJacobianAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // SOLVER
+ // --------------------------------------------------------------------- //
+ /// Constraint solver algorithm to be used.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform token mjc:option:solver = "newton"` |
+ /// | C++ Type | TfToken |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ /// | \ref MjcPhysicsTokens "Allowed Values" | pgs, cg, newton |
+ MJCPHYSICS_API
+ UsdAttribute GetSolverAttr() const;
+
+ /// See GetSolverAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateSolverAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // ITERATIONS
+ // --------------------------------------------------------------------- //
+ /// Maximum number of iterations of the constraint solver.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:option:iterations = 100` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetIterationsAttr() const;
+
+ /// See GetIterationsAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateIterationsAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // TOLERANCE
+ // --------------------------------------------------------------------- //
+ /// Tolerance threshold used for early termination of the iterative
+ /// solver.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:option:tolerance = 1e-8` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetToleranceAttr() const;
+
+ /// See GetToleranceAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateToleranceAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // LSITERATIONS
+ // --------------------------------------------------------------------- //
+ /// Maximum number of linesearch iterations performed by CG/Newton
+ /// constraint solvers.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:option:ls_iterations = 50` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetLSIterationsAttr() const;
+
+ /// See GetLSIterationsAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateLSIterationsAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // LSTOLERANCE
+ // --------------------------------------------------------------------- //
+ /// Tolerance threshold used for early termination of the linesearch
+ /// algorithm.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:option:ls_tolerance = 0.01` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetLSToleranceAttr() const;
+
+ /// See GetLSToleranceAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateLSToleranceAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // NOSLIPITERATIONS
+ // --------------------------------------------------------------------- //
+ /// Maximum number of iterations of the Noslip solver.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:option:noslip_iterations = 0` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetNoslipIterationsAttr() const;
+
+ /// See GetNoslipIterationsAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateNoslipIterationsAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // NOSLIPTOLERANCE
+ // --------------------------------------------------------------------- //
+ /// Tolerance threshold used for early termination of the Noslip solver.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:option:noslip_tolerance = 0.000001` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetNoslipToleranceAttr() const;
+
+ /// See GetNoslipToleranceAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateNoslipToleranceAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // CCDITERATIONS
+ // --------------------------------------------------------------------- //
+ /// Maximum number of iterations of the algorithm used for convex collisions.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:option:ccd_iterations = 35` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetCCDIterationsAttr() const;
+
+ /// See GetCCDIterationsAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateCCDIterationsAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // CCDTOLERANCE
+ // --------------------------------------------------------------------- //
+ /// Tolerance threshold used for early termination of the convex
+ /// collision algorithm.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:option:ccd_tolerance = 0.000001` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetCCDToleranceAttr() const;
+
+ /// See GetCCDToleranceAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateCCDToleranceAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // SDFITERATIONS
+ // --------------------------------------------------------------------- //
+ /// Number of iterations used for Signed Distance Field collisions
+ /// (per initial point).
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:option:sdf_iterations = 10` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetSDFIterationsAttr() const;
+
+ /// See GetSDFIterationsAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateSDFIterationsAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // SDFINITPOINTS
+ // --------------------------------------------------------------------- //
+ /// Number of starting points used for finding contacts with Signed
+ /// Distance Field collisions.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:option:sdf_initpoints = 40` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetSDFInitPointsAttr() const;
+
+ /// See GetSDFInitPointsAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateSDFInitPointsAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // ACTUATORGROUPDISABLE
+ // --------------------------------------------------------------------- //
+ /// List of actuator groups to disable.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int[] mjc:option:actuatorgroupdisable = []` |
+ /// | C++ Type | VtArray |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->IntArray |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetActuatorGroupDisableAttr() const;
+
+ /// See GetActuatorGroupDisableAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateActuatorGroupDisableAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // CONSTRAINTFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables constraint solver.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:constraint = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetConstraintFlagAttr() const;
+
+ /// See GetConstraintFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateConstraintFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // EQUALITYFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables all standard computations related to equality constraints.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:equality = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetEqualityFlagAttr() const;
+
+ /// See GetEqualityFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateEqualityFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // FRICTIONLOSSFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables all standard computations related to friction loss constraints.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:frictionloss = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetFrictionLossFlagAttr() const;
+
+ /// See GetFrictionLossFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateFrictionLossFlagAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // LIMITFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables all standard computations related to joint and tendon limit
+ /// constraints.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:limit = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetLimitFlagAttr() const;
+
+ /// See GetLimitFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateLimitFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // CONTACTFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables collision detection and all standard computations related to
+ /// contact constraints.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:contact = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetContactFlagAttr() const;
+
+ /// See GetContactFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateContactFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // SPRINGFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables the simulation of joint and tendon springs.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:spring = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetSpringFlagAttr() const;
+
+ /// See GetSpringFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateSpringFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // DAMPERFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables the simulation of joint and tendon dampers.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:damper = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetDamperFlagAttr() const;
+
+ /// See GetDamperFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateDamperFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // GRAVITYFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables the application of gravitational acceleration as defined in
+ /// mjOption.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:gravity = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetGravityFlagAttr() const;
+
+ /// See GetGravityFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateGravityFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // CLAMPCTRLFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables the clamping of control inputs to all actuators, according to
+ /// actuator-specific attributes.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:clampctrl = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetClampCtrlFlagAttr() const;
+
+ /// See GetClampCtrlFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateClampCtrlFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // WARMSTARTFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables warm-starting of the constraint solver, using the solution from
+ /// the previous time step to initialize the iterative optimization.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:warmstart = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetWarmStartFlagAttr() const;
+
+ /// See GetWarmStartFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateWarmStartFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // FILTERPARENTFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables the filtering of contact pairs where the two geoms belong to a
+ /// parent and child body.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:filterparent = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetFilterParentFlagAttr() const;
+
+ /// See GetFilterParentFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateFilterParentFlagAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // ACTUATIONFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables all standard computations related to actuator forces, including
+ /// actuator dynamics.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:actuation = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetActuationFlagAttr() const;
+
+ /// See GetActuationFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateActuationFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // REFSAFEFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables a safety mechanism that prevents instabilities due to solref[0]
+ /// being too small compared to the simulation timestep.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:refsafe = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetRefSafeFlagAttr() const;
+
+ /// See GetRefSafeFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateRefSafeFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // SENSORFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables all computations related to sensors.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:sensor = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetSensorFlagAttr() const;
+
+ /// See GetSensorFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateSensorFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MIDPHASEFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables mid-phase collision filtering using a static AABB bounding volume
+ /// hierarchy (BVH).
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:midphase = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMidPhaseFlagAttr() const;
+
+ /// See GetMidPhaseFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMidPhaseFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // NATIVECCDFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables the native convex collision detection pipeline instead of using
+ /// the libccd library.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:nativeccd = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetNativeCCDFlagAttr() const;
+
+ /// See GetNativeCCDFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateNativeCCDFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // EULERDAMPFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables implicit integration with respect to joint damping in the Euler
+ /// integrator.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:eulerdamp = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetEulerDampFlagAttr() const;
+
+ /// See GetEulerDampFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateEulerDampFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // AUTORESETFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables the automatic resetting of the simulation state when numerical
+ /// issues are detected.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:autoreset = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetAutoResetFlagAttr() const;
+
+ /// See GetAutoResetFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateAutoResetFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // OVERRIDEFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables the contact override mechanism.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:override = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetOverrideFlagAttr() const;
+
+ /// See GetOverrideFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateOverrideFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // ENERGYFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables the computation of potential and kinetic energy
+ /// (mjData.energy[0,1]).
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:energy = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetEnergyFlagAttr() const;
+
+ /// See GetEnergyFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateEnergyFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // FWDINVFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables the automatic comparison of forward and inverse dynamics.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:fwdinv = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetFwdinvFlagAttr() const;
+
+ /// See GetFwdinvFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateFwdinvFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // INVDISCRETEFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables discrete-time inverse dynamics with mj_inverse for integrators
+ /// other than RK4.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:invdiscrete = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetInvDiscreteFlagAttr() const;
+
+ /// See GetInvDiscreteFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateInvDiscreteFlagAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // MULTICCDFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables multiple-contact collision detection for geom pairs using a
+ /// general-purpose convex-convex collider.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:multiccd = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetMultiCCDFlagAttr() const;
+
+ /// See GetMultiCCDFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateMultiCCDFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // ISLANDFLAG
+ // --------------------------------------------------------------------- //
+ /// Enables the discovery of constraint islands.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:flag:island = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetIslandFlagAttr() const;
+
+ /// See GetIslandFlagAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateIslandFlagAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // AUTOLIMITS
+ // --------------------------------------------------------------------- //
+ /// This attribute affects the behavior of attributes such as "limited" (on
+ /// MjcJointAPI), "forcelimited" "ctrllimited", and "actlimited" (on
+ /// MjcActuator). If True, these attributes are unnecessary and their value
+ /// will be inferred from the presence of their corresponding "range"
+ /// attribute. If False, no such inference will happen: For a joint to be
+ /// limited, both limited=True and range:min/max must be specified. In this
+ /// mode, it is an error to specify a range without a limit.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:compiler:autoLimits = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetAutoLimitsAttr() const;
+
+ /// See GetAutoLimitsAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateAutoLimitsAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // BOUNDMASS
+ // --------------------------------------------------------------------- //
+ /// This attribute imposes a lower bound on the mass of each body except for
+ /// the world body.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:compiler:boundMass = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetBoundMassAttr() const;
+
+ /// See GetBoundMassAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateBoundMassAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // BOUNDINERTIA
+ // --------------------------------------------------------------------- //
+ /// This attribute imposes a lower bound on the diagonal inertia components of
+ /// each body except for the world body.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:compiler:boundInertia = 0` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetBoundInertiaAttr() const;
+
+ /// See GetBoundInertiaAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateBoundInertiaAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // SETTOTALMASS
+ // --------------------------------------------------------------------- //
+ /// If this value is positive, the compiler will scale the masses and inertias
+ /// of all bodies in the model, so that the total mass equals the value
+ /// specified here. The world body has mass 0 and does not participate in any
+ /// mass-related computations. This scaling is performed last, after all other
+ /// operations affecting the body mass and inertia. The same scaling operation
+ /// can be applied at runtime to the compiled mjModel with the function
+ /// mj_setTotalmass.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform double mjc:compiler:setTotalMass = -1` |
+ /// | C++ Type | double |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetSetTotalMassAttr() const;
+
+ /// See GetSetTotalMassAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateSetTotalMassAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // USETHREAD
+ // --------------------------------------------------------------------- //
+ /// If this is True, the model compiler will run in multi-threaded mode.
+ /// Currently multi-threading is used for computing the length ranges of
+ /// actuators and for parallel loading of meshes.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:compiler:useThread = 1` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetUseThreadAttr() const;
+
+ /// See GetUseThreadAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateUseThreadAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // BALANCEINERTIA
+ // --------------------------------------------------------------------- //
+ /// A valid diagonal inertia matrix must satisfy A+B>=C for all permutations
+ /// of the three diagonal elements. Some poorly designed models violate this
+ /// constraint, which will normally result in a compile error. If this
+ /// attribute is set to "true", the compiler will silently set all three
+ /// diagonal elements to their average value whenever the above condition is
+ /// violated.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:compiler:balanceInertia = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetBalanceInertiaAttr() const;
+
+ /// See GetBalanceInertiaAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateBalanceInertiaAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // ANGLE
+ // --------------------------------------------------------------------- //
+ /// This attribute specifies whether the angles in mjcPhysics attributes have
+ /// units of degrees or radians if not otherwise noted.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform token mjc:compiler:angle = "degree"` |
+ /// | C++ Type | TfToken |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ /// | \ref MjcPhysicsTokens "Allowed Values" | degree, radian |
+ MJCPHYSICS_API
+ UsdAttribute GetAngleAttr() const;
+
+ /// See GetAngleAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateAngleAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // FITAABB
+ // --------------------------------------------------------------------- //
+ /// The compiler is able to replace a mesh with a geometric primitive fitted
+ /// to that mesh. If this attribute is True, the fitting procedure uses the
+ /// axis-aligned bounding box (AABB) of the mesh. Otherwise it uses the
+ /// equivalent-inertia box of the mesh.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:compiler:fitAABB = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetFitAABBAttr() const;
+
+ /// See GetFitAABBAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateFitAABBAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // FUSESTATIC
+ // --------------------------------------------------------------------- //
+ /// This attribute controls a compiler optimization feature where static
+ /// bodies are fused with their parent, and any elements defined in those
+ /// bodies are reassigned to the parent. Static bodies are fused with their
+ /// parent unless
+ ///
+ /// * They are referenced by another element in the model.
+ ///
+ /// * They contain a site which is referenced by a force or torque sensor.
+ ///
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:compiler:fuseStatic = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetFuseStaticAttr() const;
+
+ /// See GetFuseStaticAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateFuseStaticAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // INERTIAFROMGEOM
+ // --------------------------------------------------------------------- //
+ /// This attribute controls the automatic inference of body masses and
+ /// inertias from geoms attached to the body. If this setting is "false", no
+ /// automatic inference is performed. In that case each body must have
+ /// explicitly defined mass and inertia with the inertial element, or else a
+ /// compile error will be generated. If this setting is "true", the mass and
+ /// inertia of each body will be inferred from the geoms attached to it,
+ /// overriding any values specified with the inertial element. The default
+ /// setting "auto" means that masses and inertias are inferred automatically
+ /// only when the inertial element is missing in the body definition. One
+ /// reason to set this attribute to "true" instead of "auto" is to override
+ /// inertial data imported from a poorly designed model.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform token mjc:compiler:inertiaFromGeom = "auto"` |
+ /// | C++ Type | TfToken |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ /// | \ref MjcPhysicsTokens "Allowed Values" | false, true, auto |
+ MJCPHYSICS_API
+ UsdAttribute GetInertiaFromGeomAttr() const;
+
+ /// See GetInertiaFromGeomAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateInertiaFromGeomAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // ALIGNFREE
+ // --------------------------------------------------------------------- //
+ /// This attribute toggles the default behaviour of an optimization that
+ /// applies to bodies with a free joint and no child bodies. When True, the
+ /// body frame and free joint will automatically be aligned with inertial
+ /// frame, which leads to both faster and more stable simulation.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:compiler:alignFree = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetAlignFreeAttr() const;
+
+ /// See GetAlignFreeAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateAlignFreeAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // INERTIAGROUPRANGEMIN
+ // --------------------------------------------------------------------- //
+ /// This attribute specifies the maximum of the geom group range that is used
+ /// to infer body masses and inertias (when such inference is enabled). The
+ /// group attribute of geom is an integer. If this integer falls in the range
+ /// specified here, the collider will be used in the inertial computation,
+ /// otherwise it will be ignored. Note that the world body does not
+ /// participate in the inertial computations, so any geoms attached to it are
+ /// automatically ignored. Therefore it is not necessary to adjust this
+ /// attribute and the geom-specific groups so as to exclude world geoms from
+ /// the inertial computation.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:compiler:inertiaGroupRange:min = 0` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetInertiaGroupRangeMinAttr() const;
+
+ /// See GetInertiaGroupRangeMinAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateInertiaGroupRangeMinAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // INERTIAGROUPRANGEMAX
+ // --------------------------------------------------------------------- //
+ /// This attribute specifies the maximum of the geom group range that is used
+ /// to infer body masses and inertias (when such inference is enabled). The
+ /// group attribute of geom is an integer. If this integer falls in the range
+ /// specified here, the geom will be used in the inertial computation,
+ /// otherwise it will be ignored. This feature is useful in models that have
+ /// redundant sets of geoms for collision and visualization. Note that the
+ /// world body does not participate in the inertial computations, so any geoms
+ /// attached to it are automatically ignored. Therefore it is not necessary to
+ /// adjust this attribute and the geom-specific groups so as to exclude world
+ /// geoms from the inertial computation.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:compiler:inertiaGroupRange:max = 5` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetInertiaGroupRangeMaxAttr() const;
+
+ /// See GetInertiaGroupRangeMaxAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateInertiaGroupRangeMaxAttr(
+ VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // SAVEINERTIAL
+ // --------------------------------------------------------------------- //
+ /// If True, the compiler will save explicit inertial clauses for all bodies.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool mjc:compiler:saveInertial = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetSaveInertialAttr() const;
+
+ /// See GetSaveInertialAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateSaveInertialAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // ===================================================================== //
+ // Feel free to add custom code below this line, it will be preserved by
+ // the code generator.
+ //
+ // Just remember to:
+ // - Close the class declaration with };
+ // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
+ // - Close the include guard with #endif
+ // ===================================================================== //
+ // --(BEGIN CUSTOM CODE)--
+};
+
+PXR_NAMESPACE_CLOSE_SCOPE
+
+#endif
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/siteAPI.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/siteAPI.h
new file mode 100644
index 00000000..8e92e9c2
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/siteAPI.h
@@ -0,0 +1,183 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MJCPHYSICS_GENERATED_SITEAPI_H
+#define MJCPHYSICS_GENERATED_SITEAPI_H
+
+/// \file mjcPhysics/siteAPI.h
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+PXR_NAMESPACE_OPEN_SCOPE
+
+class SdfAssetPath;
+
+// -------------------------------------------------------------------------- //
+// MJCSITEAPI //
+// -------------------------------------------------------------------------- //
+
+/// \class MjcPhysicsSiteAPI
+///
+/// API describing a MuJoCo site.
+///
+class MjcPhysicsSiteAPI : public UsdAPISchemaBase {
+ public:
+ /// Compile time constant representing what kind of schema this class is.
+ ///
+ /// \sa UsdSchemaKind
+ static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI;
+
+ /// Construct a MjcPhysicsSiteAPI on UsdPrim \p prim .
+ /// Equivalent to MjcPhysicsSiteAPI::Get(prim.GetStage(), prim.GetPath())
+ /// for a \em valid \p prim, but will not immediately throw an error for
+ /// an invalid \p prim
+ explicit MjcPhysicsSiteAPI(const UsdPrim& prim = UsdPrim())
+ : UsdAPISchemaBase(prim) {}
+
+ /// Construct a MjcPhysicsSiteAPI on the prim held by \p schemaObj .
+ /// Should be preferred over MjcPhysicsSiteAPI(schemaObj.GetPrim()),
+ /// as it preserves SchemaBase state.
+ explicit MjcPhysicsSiteAPI(const UsdSchemaBase& schemaObj)
+ : UsdAPISchemaBase(schemaObj) {}
+
+ /// Destructor.
+ MJCPHYSICS_API
+ virtual ~MjcPhysicsSiteAPI();
+
+ /// Return a vector of names of all pre-declared attributes for this schema
+ /// class and all its ancestor classes. Does not include attributes that
+ /// may be authored by custom/extended methods of the schemas involved.
+ MJCPHYSICS_API
+ static const TfTokenVector& GetSchemaAttributeNames(
+ bool includeInherited = true);
+
+ /// Return a MjcPhysicsSiteAPI holding the prim adhering to this
+ /// schema at \p path on \p stage. If no prim exists at \p path on
+ /// \p stage, or if the prim at that path does not adhere to this schema,
+ /// return an invalid schema object. This is shorthand for the following:
+ ///
+ /// \code
+ /// MjcPhysicsSiteAPI(stage->GetPrimAtPath(path));
+ /// \endcode
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsSiteAPI Get(const UsdStagePtr& stage, const SdfPath& path);
+
+ /// Returns true if this single-apply API schema can be applied to
+ /// the given \p prim. If this schema can not be a applied to the prim,
+ /// this returns false and, if provided, populates \p whyNot with the
+ /// reason it can not be applied.
+ ///
+ /// Note that if CanApply returns false, that does not necessarily imply
+ /// that calling Apply will fail. Callers are expected to call CanApply
+ /// before calling Apply if they want to ensure that it is valid to
+ /// apply a schema.
+ ///
+ /// \sa UsdPrim::GetAppliedSchemas()
+ /// \sa UsdPrim::HasAPI()
+ /// \sa UsdPrim::CanApplyAPI()
+ /// \sa UsdPrim::ApplyAPI()
+ /// \sa UsdPrim::RemoveAPI()
+ ///
+ MJCPHYSICS_API
+ static bool CanApply(const UsdPrim& prim, std::string* whyNot = nullptr);
+
+ /// Applies this single-apply API schema to the given \p prim.
+ /// This information is stored by adding "MjcSiteAPI" to the
+ /// token-valued, listOp metadata \em apiSchemas on the prim.
+ ///
+ /// \return A valid MjcPhysicsSiteAPI object is returned upon success.
+ /// An invalid (or empty) MjcPhysicsSiteAPI object is returned upon
+ /// failure. See \ref UsdPrim::ApplyAPI() for conditions
+ /// resulting in failure.
+ ///
+ /// \sa UsdPrim::GetAppliedSchemas()
+ /// \sa UsdPrim::HasAPI()
+ /// \sa UsdPrim::CanApplyAPI()
+ /// \sa UsdPrim::ApplyAPI()
+ /// \sa UsdPrim::RemoveAPI()
+ ///
+ MJCPHYSICS_API
+ static MjcPhysicsSiteAPI Apply(const UsdPrim& prim);
+
+ protected:
+ /// Returns the kind of schema this class belongs to.
+ ///
+ /// \sa UsdSchemaKind
+ MJCPHYSICS_API
+ UsdSchemaKind _GetSchemaKind() const override;
+
+ private:
+ // needs to invoke _GetStaticTfType.
+ friend class UsdSchemaRegistry;
+ MJCPHYSICS_API
+ static const TfType& _GetStaticTfType();
+
+ static bool _IsTypedSchema();
+
+ // override SchemaBase virtuals.
+ MJCPHYSICS_API
+ const TfType& _GetTfType() const override;
+
+ public:
+ // --------------------------------------------------------------------- //
+ // GROUP
+ // --------------------------------------------------------------------- //
+ /// Integer MuJoCo group to which the collider belongs.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform int mjc:group = 0` |
+ /// | C++ Type | int |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ MJCPHYSICS_API
+ UsdAttribute GetGroupAttr() const;
+
+ /// See GetGroupAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ MJCPHYSICS_API
+ UsdAttribute CreateGroupAttr(VtValue const& defaultValue = VtValue(),
+ bool writeSparsely = false) const;
+
+ public:
+ // ===================================================================== //
+ // Feel free to add custom code below this line, it will be preserved by
+ // the code generator.
+ //
+ // Just remember to:
+ // - Close the class declaration with };
+ // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
+ // - Close the include guard with #endif
+ // ===================================================================== //
+ // --(BEGIN CUSTOM CODE)--
+};
+
+PXR_NAMESPACE_CLOSE_SCOPE
+
+#endif
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/tokens.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/tokens.h
new file mode 100644
index 00000000..7927fb69
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/mjcPhysics/tokens.h
@@ -0,0 +1,740 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MJCPHYSICS_TOKENS_H
+#define MJCPHYSICS_TOKENS_H
+
+/// \file mjcPhysics/tokens.h
+
+// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+//
+// This is an automatically generated file (by usdGenSchema.py).
+// Do not hand-edit!
+//
+// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+
+#include
+
+#include
+#include
+#include
+#include
+
+PXR_NAMESPACE_OPEN_SCOPE
+
+/// \class MjcPhysicsTokensType
+///
+/// \link MjcPhysicsTokens \endlink provides static, efficient
+/// \link TfToken TfTokens\endlink for use in all public USD API.
+///
+/// These tokens are auto-generated from the module's schema, representing
+/// property names, for when you need to fetch an attribute or relationship
+/// directly by name, e.g. UsdPrim::GetAttribute(), in the most efficient
+/// manner, and allow the compiler to verify that you spelled the name
+/// correctly.
+///
+/// MjcPhysicsTokens also contains all of the \em allowedTokens values
+/// declared for schema builtin attributes of 'token' scene description type.
+/// Use MjcPhysicsTokens like so:
+///
+/// \code
+/// gprim.GetMyTokenValuedAttr().Set(MjcPhysicsTokens->affine);
+/// \endcode
+struct MjcPhysicsTokensType {
+ MJCPHYSICS_API MjcPhysicsTokensType();
+ /// \brief "affine"
+ ///
+ /// Possible value for MjcPhysicsActuator::GetMjcBiasTypeAttr(), Possible
+ /// value for MjcPhysicsActuator::GetMjcGainTypeAttr()
+ const TfToken affine;
+ /// \brief "auto"
+ ///
+ /// Fallback value for MjcPhysicsSceneAPI::GetInertiaFromGeomAttr(), Fallback
+ /// value for MjcPhysicsSceneAPI::GetJacobianAttr(), Fallback value for
+ /// MjcPhysicsActuator::GetMjcActLimitedAttr(), Fallback value for
+ /// MjcPhysicsActuator::GetMjcCtrlLimitedAttr(), Fallback value for
+ /// MjcPhysicsActuator::GetMjcForceLimitedAttr(), Fallback value for
+ /// MjcPhysicsJointAPI::GetMjcActuatorfrclimitedAttr(), This token represents
+ /// the auto constraint Jacobian and matrices computed from it.
+ const TfToken auto_;
+ /// \brief "cg"
+ ///
+ /// Possible value for MjcPhysicsSceneAPI::GetSolverAttr(), This token
+ /// represents the CG constraint solver algorithm.
+ const TfToken cg;
+ /// \brief "convex"
+ ///
+ /// Possible value for MjcPhysicsMeshCollisionAPI::GetInertiaAttr()
+ const TfToken convex;
+ /// \brief "degree"
+ ///
+ /// Fallback value for MjcPhysicsSceneAPI::GetAngleAttr()
+ const TfToken degree;
+ /// \brief "dense"
+ ///
+ /// Possible value for MjcPhysicsSceneAPI::GetJacobianAttr(), This token
+ /// represents the dense constraint Jacobian and matrices computed from it.
+ const TfToken dense;
+ /// \brief "elliptic"
+ ///
+ /// Possible value for MjcPhysicsSceneAPI::GetConeAttr(), This token
+ /// represents the elliptic contact friction cone type.
+ const TfToken elliptic;
+ /// \brief "euler"
+ ///
+ /// Fallback value for MjcPhysicsSceneAPI::GetIntegratorAttr(), This token
+ /// represents the Euler numerical integrator.
+ const TfToken euler;
+ /// \brief "exact"
+ ///
+ /// Possible value for MjcPhysicsMeshCollisionAPI::GetInertiaAttr()
+ const TfToken exact;
+ /// \brief "false"
+ ///
+ /// Possible value for MjcPhysicsSceneAPI::GetInertiaFromGeomAttr(), Possible
+ /// value for MjcPhysicsActuator::GetMjcActLimitedAttr(), Possible value for
+ /// MjcPhysicsActuator::GetMjcCtrlLimitedAttr(), Possible value for
+ /// MjcPhysicsActuator::GetMjcForceLimitedAttr(), Possible value for
+ /// MjcPhysicsJointAPI::GetMjcActuatorfrclimitedAttr()
+ const TfToken false_;
+ /// \brief "filter"
+ ///
+ /// Possible value for MjcPhysicsActuator::GetMjcDynTypeAttr()
+ const TfToken filter;
+ /// \brief "filterexact"
+ ///
+ /// Possible value for MjcPhysicsActuator::GetMjcDynTypeAttr()
+ const TfToken filterexact;
+ /// \brief "fixed"
+ ///
+ /// Fallback value for MjcPhysicsActuator::GetMjcGainTypeAttr()
+ const TfToken fixed;
+ /// \brief "implicit"
+ ///
+ /// Possible value for MjcPhysicsSceneAPI::GetIntegratorAttr(), This token
+ /// represents the implicit numerical integrator.
+ const TfToken implicit;
+ /// \brief "implicitfast"
+ ///
+ /// Possible value for MjcPhysicsSceneAPI::GetIntegratorAttr(), This token
+ /// represents the implicitfast numerical integrator.
+ const TfToken implicitfast;
+ /// \brief "integrator"
+ ///
+ /// Possible value for MjcPhysicsActuator::GetMjcDynTypeAttr()
+ const TfToken integrator;
+ /// \brief "legacy"
+ ///
+ /// Fallback value for MjcPhysicsMeshCollisionAPI::GetInertiaAttr()
+ const TfToken legacy;
+ /// \brief "mjc:act"
+ ///
+ /// MjcPhysicsKeyframe
+ const TfToken mjcAct;
+ /// \brief "mjc:actDim"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcActDim;
+ /// \brief "mjc:actEarly"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcActEarly;
+ /// \brief "mjc:actLimited"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcActLimited;
+ /// \brief "mjc:actRange:max"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcActRangeMax;
+ /// \brief "mjc:actRange:min"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcActRangeMin;
+ /// \brief "mjc:actuatorfrclimited"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcActuatorfrclimited;
+ /// \brief "mjc:actuatorfrcrange:max"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcActuatorfrcrangeMax;
+ /// \brief "mjc:actuatorfrcrange:min"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcActuatorfrcrangeMin;
+ /// \brief "mjc:actuatorgravcomp"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcActuatorgravcomp;
+ /// \brief "mjc:armature"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcArmature;
+ /// \brief "mjc:biasPrm"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcBiasPrm;
+ /// \brief "mjc:biasType"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcBiasType;
+ /// \brief "mjc:compiler:alignFree"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcCompilerAlignFree;
+ /// \brief "mjc:compiler:angle"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcCompilerAngle;
+ /// \brief "mjc:compiler:autoLimits"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcCompilerAutoLimits;
+ /// \brief "mjc:compiler:balanceInertia"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcCompilerBalanceInertia;
+ /// \brief "mjc:compiler:boundInertia"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcCompilerBoundInertia;
+ /// \brief "mjc:compiler:boundMass"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcCompilerBoundMass;
+ /// \brief "mjc:compiler:fitAABB"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcCompilerFitAABB;
+ /// \brief "mjc:compiler:fuseStatic"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcCompilerFuseStatic;
+ /// \brief "mjc:compiler:inertiaFromGeom"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcCompilerInertiaFromGeom;
+ /// \brief "mjc:compiler:inertiaGroupRange:max"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcCompilerInertiaGroupRangeMax;
+ /// \brief "mjc:compiler:inertiaGroupRange:min"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcCompilerInertiaGroupRangeMin;
+ /// \brief "mjc:compiler:saveInertial"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcCompilerSaveInertial;
+ /// \brief "mjc:compiler:setTotalMass"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcCompilerSetTotalMass;
+ /// \brief "mjc:compiler:useThread"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcCompilerUseThread;
+ /// \brief "mjc:condim"
+ ///
+ /// MjcPhysicsCollisionAPI
+ const TfToken mjcCondim;
+ /// \brief "mjc:crankLength"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcCrankLength;
+ /// \brief "mjc:ctrl"
+ ///
+ /// MjcPhysicsKeyframe
+ const TfToken mjcCtrl;
+ /// \brief "mjc:ctrlLimited"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcCtrlLimited;
+ /// \brief "mjc:ctrlRange:max"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcCtrlRangeMax;
+ /// \brief "mjc:ctrlRange:min"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcCtrlRangeMin;
+ /// \brief "mjc:damping"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcDamping;
+ /// \brief "mjc:dynPrm"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcDynPrm;
+ /// \brief "mjc:dynType"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcDynType;
+ /// \brief "mjc:flag:actuation"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagActuation;
+ /// \brief "mjc:flag:autoreset"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagAutoreset;
+ /// \brief "mjc:flag:clampctrl"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagClampctrl;
+ /// \brief "mjc:flag:constraint"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagConstraint;
+ /// \brief "mjc:flag:contact"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagContact;
+ /// \brief "mjc:flag:damper"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagDamper;
+ /// \brief "mjc:flag:energy"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagEnergy;
+ /// \brief "mjc:flag:equality"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagEquality;
+ /// \brief "mjc:flag:eulerdamp"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagEulerdamp;
+ /// \brief "mjc:flag:filterparent"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagFilterparent;
+ /// \brief "mjc:flag:frictionloss"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagFrictionloss;
+ /// \brief "mjc:flag:fwdinv"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagFwdinv;
+ /// \brief "mjc:flag:gravity"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagGravity;
+ /// \brief "mjc:flag:invdiscrete"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagInvdiscrete;
+ /// \brief "mjc:flag:island"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagIsland;
+ /// \brief "mjc:flag:limit"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagLimit;
+ /// \brief "mjc:flag:midphase"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagMidphase;
+ /// \brief "mjc:flag:multiccd"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagMulticcd;
+ /// \brief "mjc:flag:nativeccd"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagNativeccd;
+ /// \brief "mjc:flag:override"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagOverride;
+ /// \brief "mjc:flag:refsafe"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagRefsafe;
+ /// \brief "mjc:flag:sensor"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagSensor;
+ /// \brief "mjc:flag:spring"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagSpring;
+ /// \brief "mjc:flag:warmstart"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcFlagWarmstart;
+ /// \brief "mjc:forceLimited"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcForceLimited;
+ /// \brief "mjc:forceRange:max"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcForceRangeMax;
+ /// \brief "mjc:forceRange:min"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcForceRangeMin;
+ /// \brief "mjc:frictionloss"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcFrictionloss;
+ /// \brief "mjc:gainPrm"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcGainPrm;
+ /// \brief "mjc:gainType"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcGainType;
+ /// \brief "mjc:gap"
+ ///
+ /// MjcPhysicsCollisionAPI
+ const TfToken mjcGap;
+ /// \brief "mjc:gear"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcGear;
+ /// \brief "mjc:group"
+ ///
+ /// MjcPhysicsSiteAPI, MjcPhysicsImageableAPI, MjcPhysicsCollisionAPI,
+ /// MjcPhysicsActuator, MjcPhysicsJointAPI
+ const TfToken mjcGroup;
+ /// \brief "mjc:inertia"
+ ///
+ /// MjcPhysicsMeshCollisionAPI
+ const TfToken mjcInertia;
+ /// \brief "mjc:inheritRange"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcInheritRange;
+ /// \brief "mjc:jointInParent"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcJointInParent;
+ /// \brief "mjc:lengthRange:max"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcLengthRangeMax;
+ /// \brief "mjc:lengthRange:min"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcLengthRangeMin;
+ /// \brief "mjc:margin"
+ ///
+ /// MjcPhysicsCollisionAPI, MjcPhysicsJointAPI
+ const TfToken mjcMargin;
+ /// \brief "mjc:maxhullvert"
+ ///
+ /// MjcPhysicsMeshCollisionAPI
+ const TfToken mjcMaxhullvert;
+ /// \brief "mjc:mpos"
+ ///
+ /// MjcPhysicsKeyframe
+ const TfToken mjcMpos;
+ /// \brief "mjc:mquat"
+ ///
+ /// MjcPhysicsKeyframe
+ const TfToken mjcMquat;
+ /// \brief "mjc:option:actuatorgroupdisable"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionActuatorgroupdisable;
+ /// \brief "mjc:option:ccd_iterations"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionCcd_iterations;
+ /// \brief "mjc:option:ccd_tolerance"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionCcd_tolerance;
+ /// \brief "mjc:option:cone"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionCone;
+ /// \brief "mjc:option:density"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionDensity;
+ /// \brief "mjc:option:impratio"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionImpratio;
+ /// \brief "mjc:option:integrator"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionIntegrator;
+ /// \brief "mjc:option:iterations"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionIterations;
+ /// \brief "mjc:option:jacobian"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionJacobian;
+ /// \brief "mjc:option:ls_iterations"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionLs_iterations;
+ /// \brief "mjc:option:ls_tolerance"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionLs_tolerance;
+ /// \brief "mjc:option:magnetic"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionMagnetic;
+ /// \brief "mjc:option:noslip_iterations"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionNoslip_iterations;
+ /// \brief "mjc:option:noslip_tolerance"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionNoslip_tolerance;
+ /// \brief "mjc:option:o_friction"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionO_friction;
+ /// \brief "mjc:option:o_margin"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionO_margin;
+ /// \brief "mjc:option:o_solimp"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionO_solimp;
+ /// \brief "mjc:option:o_solref"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionO_solref;
+ /// \brief "mjc:option:sdf_initpoints"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionSdf_initpoints;
+ /// \brief "mjc:option:sdf_iterations"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionSdf_iterations;
+ /// \brief "mjc:option:solver"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionSolver;
+ /// \brief "mjc:option:timestep"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionTimestep;
+ /// \brief "mjc:option:tolerance"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionTolerance;
+ /// \brief "mjc:option:viscosity"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionViscosity;
+ /// \brief "mjc:option:wind"
+ ///
+ /// MjcPhysicsSceneAPI
+ const TfToken mjcOptionWind;
+ /// \brief "mjc:priority"
+ ///
+ /// MjcPhysicsCollisionAPI
+ const TfToken mjcPriority;
+ /// \brief "mjc:qpos"
+ ///
+ /// MjcPhysicsKeyframe
+ const TfToken mjcQpos;
+ /// \brief "mjc:qvel"
+ ///
+ /// MjcPhysicsKeyframe
+ const TfToken mjcQvel;
+ /// \brief "mjc:ref"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcRef;
+ /// \brief "mjc:refSite"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcRefSite;
+ /// \brief "mjc:rollingfriction"
+ ///
+ /// MjcPhysicsMaterialAPI
+ const TfToken mjcRollingfriction;
+ /// \brief "mjc:shellinertia"
+ ///
+ /// MjcPhysicsCollisionAPI
+ const TfToken mjcShellinertia;
+ /// \brief "mjc:sliderSite"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcSliderSite;
+ /// \brief "mjc:solimp"
+ ///
+ /// MjcPhysicsCollisionAPI
+ const TfToken mjcSolimp;
+ /// \brief "mjc:solimpfriction"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcSolimpfriction;
+ /// \brief "mjc:solimplimit"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcSolimplimit;
+ /// \brief "mjc:solmix"
+ ///
+ /// MjcPhysicsCollisionAPI
+ const TfToken mjcSolmix;
+ /// \brief "mjc:solref"
+ ///
+ /// MjcPhysicsCollisionAPI
+ const TfToken mjcSolref;
+ /// \brief "mjc:solreffriction"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcSolreffriction;
+ /// \brief "mjc:solreflimit"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcSolreflimit;
+ /// \brief "mjc:springdamper"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcSpringdamper;
+ /// \brief "mjc:springref"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcSpringref;
+ /// \brief "mjc:stiffness"
+ ///
+ /// MjcPhysicsJointAPI
+ const TfToken mjcStiffness;
+ /// \brief "mjc:target"
+ ///
+ /// MjcPhysicsActuator
+ const TfToken mjcTarget;
+ /// \brief "mjc:torsionalfriction"
+ ///
+ /// MjcPhysicsMaterialAPI
+ const TfToken mjcTorsionalfriction;
+ /// \brief "muscle"
+ ///
+ /// Possible value for MjcPhysicsActuator::GetMjcBiasTypeAttr(), Possible
+ /// value for MjcPhysicsActuator::GetMjcDynTypeAttr(), Possible value for
+ /// MjcPhysicsActuator::GetMjcGainTypeAttr()
+ const TfToken muscle;
+ /// \brief "newton"
+ ///
+ /// Fallback value for MjcPhysicsSceneAPI::GetSolverAttr(), This token
+ /// represents the Newton constraint solver algorithm.
+ const TfToken newton;
+ /// \brief "none"
+ ///
+ /// Fallback value for MjcPhysicsActuator::GetMjcBiasTypeAttr(), Fallback
+ /// value for MjcPhysicsActuator::GetMjcDynTypeAttr()
+ const TfToken none;
+ /// \brief "pgs"
+ ///
+ /// Possible value for MjcPhysicsSceneAPI::GetSolverAttr(), This token
+ /// represents the PGS constraint solver algorithm.
+ const TfToken pgs;
+ /// \brief "pyramidal"
+ ///
+ /// Fallback value for MjcPhysicsSceneAPI::GetConeAttr(), This token
+ /// represents the pyramidal contact friction cone type.
+ const TfToken pyramidal;
+ /// \brief "radian"
+ ///
+ /// Possible value for MjcPhysicsSceneAPI::GetAngleAttr()
+ const TfToken radian;
+ /// \brief "rk4"
+ ///
+ /// Possible value for MjcPhysicsSceneAPI::GetIntegratorAttr(), This token
+ /// represents the RK4 numerical integrator.
+ const TfToken rk4;
+ /// \brief "shell"
+ ///
+ /// Possible value for MjcPhysicsMeshCollisionAPI::GetInertiaAttr()
+ const TfToken shell;
+ /// \brief "sparse"
+ ///
+ /// Possible value for MjcPhysicsSceneAPI::GetJacobianAttr(), This token
+ /// represents the sparse constraint Jacobian and matrices computed from it.
+ const TfToken sparse;
+ /// \brief "true"
+ ///
+ /// Possible value for MjcPhysicsSceneAPI::GetInertiaFromGeomAttr(), Possible
+ /// value for MjcPhysicsActuator::GetMjcActLimitedAttr(), Possible value for
+ /// MjcPhysicsActuator::GetMjcCtrlLimitedAttr(), Possible value for
+ /// MjcPhysicsActuator::GetMjcForceLimitedAttr(), Possible value for
+ /// MjcPhysicsJointAPI::GetMjcActuatorfrclimitedAttr()
+ const TfToken true_;
+ /// \brief "user"
+ ///
+ /// Possible value for MjcPhysicsActuator::GetMjcBiasTypeAttr(), Possible
+ /// value for MjcPhysicsActuator::GetMjcDynTypeAttr(), Possible value for
+ /// MjcPhysicsActuator::GetMjcGainTypeAttr()
+ const TfToken user;
+ /// \brief "MjcActuator"
+ ///
+ /// Schema identifier and family for MjcPhysicsActuator
+ const TfToken MjcActuator;
+ /// \brief "MjcCollisionAPI"
+ ///
+ /// Schema identifier and family for MjcPhysicsCollisionAPI
+ const TfToken MjcCollisionAPI;
+ /// \brief "MjcImageableAPI"
+ ///
+ /// Schema identifier and family for MjcPhysicsImageableAPI
+ const TfToken MjcImageableAPI;
+ /// \brief "MjcJointAPI"
+ ///
+ /// Schema identifier and family for MjcPhysicsJointAPI
+ const TfToken MjcJointAPI;
+ /// \brief "MjcKeyframe"
+ ///
+ /// Schema identifier and family for MjcPhysicsKeyframe
+ const TfToken MjcKeyframe;
+ /// \brief "MjcMaterialAPI"
+ ///
+ /// Schema identifier and family for MjcPhysicsMaterialAPI
+ const TfToken MjcMaterialAPI;
+ /// \brief "MjcMeshCollisionAPI"
+ ///
+ /// Schema identifier and family for MjcPhysicsMeshCollisionAPI
+ const TfToken MjcMeshCollisionAPI;
+ /// \brief "MjcSceneAPI"
+ ///
+ /// Schema identifier and family for MjcPhysicsSceneAPI
+ const TfToken MjcSceneAPI;
+ /// \brief "MjcSiteAPI"
+ ///
+ /// Schema identifier and family for MjcPhysicsSiteAPI
+ const TfToken MjcSiteAPI;
+ /// A vector of all of the tokens listed above.
+ const std::vector allTokens;
+};
+
+/// \var MjcPhysicsTokens
+///
+/// A global variable with static, efficient \link TfToken TfTokens\endlink
+/// for use in all public USD API. \sa MjcPhysicsTokensType
+extern MJCPHYSICS_API TfStaticData MjcPhysicsTokens;
+
+PXR_NAMESPACE_CLOSE_SCOPE
+
+#endif
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/usd.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/usd.h
new file mode 100644
index 00000000..cfeac6fb
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/usd.h
@@ -0,0 +1,44 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MUJOCO_EXPERIMENTAL_SRC_USD_USD_TO_MJSPEC_H_
+#define MUJOCO_EXPERIMENTAL_SRC_USD_USD_TO_MJSPEC_H_
+
+#include
+#include
+
+// Given a USD file parse to a spec, then compile and return the low-level
+// model.
+//
+// Particular care is taken for physics data to be lossless but visual
+// data such as materials may be lossy.
+MJAPI mjModel* mj_loadUSD(const char* filename, const mjVFS* vfs, char* error,
+ int error_sz);
+
+// Given a USD layer identifier, this function will do a best effort conversion
+// from the composed stage to mjSpec.
+//
+// Particular care is taken for physics data to be lossless but visual
+// data such as materials may be lossy.
+MJAPI mjSpec* mj_parseUSD(const char* identifier, const mjVFS* vfs, char* error,
+ int error_sz);
+
+// Given a USD stage, this function will do a best effort conversion to
+// mjSpec.
+//
+// Particular care is taken for physics data to be lossless but visual
+// data such as materials may be lossy.
+MJAPI mjSpec* mj_parseUSDStage(pxr::UsdStageRefPtr stage);
+
+#endif // MUJOCO_EXPERIMENTAL_SRC_USD_USD_TO_MJSPEC_H_
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/utils.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/utils.h
new file mode 100644
index 00000000..f3dcd4b5
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/utils.h
@@ -0,0 +1,35 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MUJOCO_SRC_EXPERIMENTAL_USD_UTILS_H_
+#define MUJOCO_SRC_EXPERIMENTAL_USD_UTILS_H_
+
+#include
+#include
+
+namespace mujoco {
+namespace usd {
+
+// Sets a user value on an mjsElement with the key "usd_primpath".
+void SetUsdPrimPathUserValue(mjsElement* element,
+ const pxr::SdfPath& prim_path);
+
+// Gets the user value associated with the key "usd_primpath" from an
+// mjsElement. Returns empty pxr::SdfPath() if the value is not found.
+pxr::SdfPath GetUsdPrimPathUserValue(mjsElement* element);
+
+} // namespace usd
+} // namespace mujoco
+
+#endif // MUJOCO_SRC_EXPERIMENTAL_USD_UTILS_H_
diff --git a/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/writer.h b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/writer.h
new file mode 100644
index 00000000..f3d191d1
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/experimental/usd/writer.h
@@ -0,0 +1,52 @@
+// Copyright 2025 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MUJOCO_SRC_EXPERIMENTAL_USD_WRITER_H_
+#define MUJOCO_SRC_EXPERIMENTAL_USD_WRITER_H_
+
+#include
+#include
+
+#include
+#include
+#include
+
+namespace mujoco {
+namespace usd {
+using PoseSinkFn =
+ std::function)>;
+
+class Writer {
+ public:
+ Writer(pxr::UsdStageRefPtr stage, mjSpec* spec, mjModel_* model);
+ ~Writer();
+ Writer(const Writer&) = delete;
+ Writer& operator=(const Writer&) = delete;
+
+ void Update(const mjData* const data);
+ void AddSink(PoseSinkFn sink_fn);
+
+ private:
+ void BuildMjUsdMapping();
+
+ pxr::UsdStageRefPtr stage_;
+ std::vector body_id_to_path_;
+ mjSpec* spec_ = nullptr;
+ mjModel_* model_ = nullptr;
+ std::vector pose_sinks_;
+};
+} // namespace usd
+} // namespace mujoco
+
+#endif // MUJOCO_SRC_EXPERIMENTAL_USD_WRITER_H_
diff --git a/third_party/mujoco/3.3.7/include/mujoco/mjdata.h b/third_party/mujoco/3.3.7/include/mujoco/mjdata.h
new file mode 100644
index 00000000..08642535
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/mjdata.h
@@ -0,0 +1,504 @@
+// Copyright 2021 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MUJOCO_MJDATA_H_
+#define MUJOCO_MJDATA_H_
+
+#include
+#include
+
+#include
+#include
+#include
+
+//---------------------------------- primitive types (mjt) -----------------------------------------
+
+typedef enum mjtState_ { // state elements
+ mjSTATE_TIME = 1<<0, // time
+ mjSTATE_QPOS = 1<<1, // position
+ mjSTATE_QVEL = 1<<2, // velocity
+ mjSTATE_ACT = 1<<3, // actuator activation
+ mjSTATE_WARMSTART = 1<<4, // acceleration used for warmstart
+ mjSTATE_CTRL = 1<<5, // control
+ mjSTATE_QFRC_APPLIED = 1<<6, // applied generalized force
+ mjSTATE_XFRC_APPLIED = 1<<7, // applied Cartesian force/torque
+ mjSTATE_EQ_ACTIVE = 1<<8, // enable/disable constraints
+ mjSTATE_MOCAP_POS = 1<<9, // positions of mocap bodies
+ mjSTATE_MOCAP_QUAT = 1<<10, // orientations of mocap bodies
+ mjSTATE_USERDATA = 1<<11, // user data
+ mjSTATE_PLUGIN = 1<<12, // plugin state
+
+ mjNSTATE = 13, // number of state elements
+
+ // convenience values for commonly used state specifications
+ mjSTATE_PHYSICS = mjSTATE_QPOS | mjSTATE_QVEL | mjSTATE_ACT,
+ mjSTATE_FULLPHYSICS = mjSTATE_TIME | mjSTATE_PHYSICS | mjSTATE_PLUGIN,
+ mjSTATE_USER = mjSTATE_CTRL | mjSTATE_QFRC_APPLIED | mjSTATE_XFRC_APPLIED |
+ mjSTATE_EQ_ACTIVE | mjSTATE_MOCAP_POS | mjSTATE_MOCAP_QUAT |
+ mjSTATE_USERDATA,
+ mjSTATE_INTEGRATION = mjSTATE_FULLPHYSICS | mjSTATE_USER | mjSTATE_WARMSTART
+} mjtState;
+
+
+typedef enum mjtConstraint_ { // type of constraint
+ mjCNSTR_EQUALITY = 0, // equality constraint
+ mjCNSTR_FRICTION_DOF, // dof friction
+ mjCNSTR_FRICTION_TENDON, // tendon friction
+ mjCNSTR_LIMIT_JOINT, // joint limit
+ mjCNSTR_LIMIT_TENDON, // tendon limit
+ mjCNSTR_CONTACT_FRICTIONLESS, // frictionless contact
+ mjCNSTR_CONTACT_PYRAMIDAL, // frictional contact, pyramidal friction cone
+ mjCNSTR_CONTACT_ELLIPTIC // frictional contact, elliptic friction cone
+} mjtConstraint;
+
+
+typedef enum mjtConstraintState_ { // constraint state
+ mjCNSTRSTATE_SATISFIED = 0, // constraint satisfied, zero cost (limit, contact)
+ mjCNSTRSTATE_QUADRATIC, // quadratic cost (equality, friction, limit, contact)
+ mjCNSTRSTATE_LINEARNEG, // linear cost, negative side (friction)
+ mjCNSTRSTATE_LINEARPOS, // linear cost, positive side (friction)
+ mjCNSTRSTATE_CONE // squared distance to cone cost (elliptic contact)
+} mjtConstraintState;
+
+
+typedef enum mjtWarning_ { // warning types
+ mjWARN_INERTIA = 0, // (near) singular inertia matrix
+ mjWARN_CONTACTFULL, // too many contacts in contact list
+ mjWARN_CNSTRFULL, // too many constraints
+ mjWARN_VGEOMFULL, // too many visual geoms
+ mjWARN_BADQPOS, // bad number in qpos
+ mjWARN_BADQVEL, // bad number in qvel
+ mjWARN_BADQACC, // bad number in qacc
+ mjWARN_BADCTRL, // bad number in ctrl
+
+ mjNWARNING // number of warnings
+} mjtWarning;
+
+
+typedef enum mjtTimer_ { // internal timers
+ // main api
+ mjTIMER_STEP = 0, // step
+ mjTIMER_FORWARD, // forward
+ mjTIMER_INVERSE, // inverse
+
+ // breakdown of step/forward
+ mjTIMER_POSITION, // fwdPosition
+ mjTIMER_VELOCITY, // fwdVelocity
+ mjTIMER_ACTUATION, // fwdActuation
+ mjTIMER_CONSTRAINT, // fwdConstraint
+ mjTIMER_ADVANCE, // mj_Euler, mj_implicit
+
+ // breakdown of fwdPosition
+ mjTIMER_POS_KINEMATICS, // kinematics, com, tendon, transmission
+ mjTIMER_POS_INERTIA, // inertia computations
+ mjTIMER_POS_COLLISION, // collision detection
+ mjTIMER_POS_MAKE, // make constraints
+ mjTIMER_POS_PROJECT, // project constraints
+
+ // breakdown of mj_collision
+ mjTIMER_COL_BROAD, // broadphase
+ mjTIMER_COL_NARROW, // narrowphase
+
+ mjNTIMER // number of timers
+} mjtTimer;
+
+
+//---------------------------------- mjContact -----------------------------------------------------
+
+struct mjContact_ { // result of collision detection functions
+ // contact parameters set by near-phase collision function
+ mjtNum dist; // distance between nearest points; neg: penetration
+ mjtNum pos[3]; // position of contact point: midpoint between geoms
+ mjtNum frame[9]; // normal is in [0-2], points from geom[0] to geom[1]
+
+ // contact parameters set by mj_collideGeoms
+ mjtNum includemargin; // include if distplugin, required for deletion (nplugin x 1)
+ uintptr_t* plugin_data; // pointer to plugin-managed data structure (nplugin x 1)
+
+ //-------------------- POSITION dependent
+
+ // computed by mj_fwdPosition/mj_kinematics
+ mjtNum* xpos; // Cartesian position of body frame (nbody x 3)
+ mjtNum* xquat; // Cartesian orientation of body frame (nbody x 4)
+ mjtNum* xmat; // Cartesian orientation of body frame (nbody x 9)
+ mjtNum* xipos; // Cartesian position of body com (nbody x 3)
+ mjtNum* ximat; // Cartesian orientation of body inertia (nbody x 9)
+ mjtNum* xanchor; // Cartesian position of joint anchor (njnt x 3)
+ mjtNum* xaxis; // Cartesian joint axis (njnt x 3)
+ mjtNum* geom_xpos; // Cartesian geom position (ngeom x 3)
+ mjtNum* geom_xmat; // Cartesian geom orientation (ngeom x 9)
+ mjtNum* site_xpos; // Cartesian site position (nsite x 3)
+ mjtNum* site_xmat; // Cartesian site orientation (nsite x 9)
+ mjtNum* cam_xpos; // Cartesian camera position (ncam x 3)
+ mjtNum* cam_xmat; // Cartesian camera orientation (ncam x 9)
+ mjtNum* light_xpos; // Cartesian light position (nlight x 3)
+ mjtNum* light_xdir; // Cartesian light direction (nlight x 3)
+
+ // computed by mj_fwdPosition/mj_comPos
+ mjtNum* subtree_com; // center of mass of each subtree (nbody x 3)
+ mjtNum* cdof; // com-based motion axis of each dof (rot:lin) (nv x 6)
+ mjtNum* cinert; // com-based body inertia and mass (nbody x 10)
+
+ // computed by mj_fwdPosition/mj_flex
+ mjtNum* flexvert_xpos; // Cartesian flex vertex positions (nflexvert x 3)
+ mjtNum* flexelem_aabb; // flex element bounding boxes (center, size) (nflexelem x 6)
+ int* flexedge_J_rownnz; // number of non-zeros in Jacobian row (nflexedge x 1)
+ int* flexedge_J_rowadr; // row start address in colind array (nflexedge x 1)
+ int* flexedge_J_colind; // column indices in sparse Jacobian (nflexedge x nv)
+ mjtNum* flexedge_J; // flex edge Jacobian (nflexedge x nv)
+ mjtNum* flexedge_length; // flex edge lengths (nflexedge x 1)
+ mjtNum* bvh_aabb_dyn; // global bounding box (center, size) (nbvhdynamic x 6)
+
+ // computed by mj_fwdPosition/mj_tendon
+ int* ten_wrapadr; // start address of tendon's path (ntendon x 1)
+ int* ten_wrapnum; // number of wrap points in path (ntendon x 1)
+ int* ten_J_rownnz; // number of non-zeros in Jacobian row (ntendon x 1)
+ int* ten_J_rowadr; // row start address in colind array (ntendon x 1)
+ int* ten_J_colind; // column indices in sparse Jacobian (ntendon x nv)
+ mjtNum* ten_J; // tendon Jacobian (ntendon x nv)
+ mjtNum* ten_length; // tendon lengths (ntendon x 1)
+ int* wrap_obj; // geom id; -1: site; -2: pulley (nwrap x 2)
+ mjtNum* wrap_xpos; // Cartesian 3D points in all paths (nwrap x 6)
+
+ // computed by mj_fwdPosition/mj_transmission
+ mjtNum* actuator_length; // actuator lengths (nu x 1)
+ int* moment_rownnz; // number of non-zeros in actuator_moment row (nu x 1)
+ int* moment_rowadr; // row start address in colind array (nu x 1)
+ int* moment_colind; // column indices in sparse Jacobian (nJmom x 1)
+ mjtNum* actuator_moment; // actuator moments (nJmom x 1)
+
+ // computed by mj_fwdPosition/mj_makeM
+ mjtNum* crb; // com-based composite inertia and mass (nbody x 10)
+ mjtNum* qM; // inertia (sparse) (nM x 1)
+ mjtNum* M; // reduced inertia (compressed sparse row) (nC x 1)
+
+ // computed by mj_fwdPosition/mj_factorM
+ mjtNum* qLD; // L'*D*L factorization of M (sparse) (nC x 1)
+ mjtNum* qLDiagInv; // 1/diag(D) (nv x 1)
+
+ // computed by mj_collision/mj_collideTree
+ mjtByte* bvh_active; // was bounding volume checked for collision (nbvh x 1)
+
+ //-------------------- POSITION, VELOCITY dependent
+
+ // computed by mj_fwdVelocity
+ mjtNum* flexedge_velocity; // flex edge velocities (nflexedge x 1)
+ mjtNum* ten_velocity; // tendon velocities (ntendon x 1)
+ mjtNum* actuator_velocity; // actuator velocities (nu x 1)
+
+ // computed by mj_fwdVelocity/mj_comVel
+ mjtNum* cvel; // com-based velocity (rot:lin) (nbody x 6)
+ mjtNum* cdof_dot; // time-derivative of cdof (rot:lin) (nv x 6)
+
+ // computed by mj_fwdVelocity/mj_rne (without acceleration)
+ mjtNum* qfrc_bias; // C(qpos,qvel) (nv x 1)
+
+ // computed by mj_fwdVelocity/mj_passive
+ mjtNum* qfrc_spring; // passive spring force (nv x 1)
+ mjtNum* qfrc_damper; // passive damper force (nv x 1)
+ mjtNum* qfrc_gravcomp; // passive gravity compensation force (nv x 1)
+ mjtNum* qfrc_fluid; // passive fluid force (nv x 1)
+ mjtNum* qfrc_passive; // total passive force (nv x 1)
+
+ // computed by mj_sensorVel/mj_subtreeVel if needed
+ mjtNum* subtree_linvel; // linear velocity of subtree com (nbody x 3)
+ mjtNum* subtree_angmom; // angular momentum about subtree com (nbody x 3)
+
+ // computed by mj_Euler or mj_implicit
+ mjtNum* qH; // L'*D*L factorization of modified M (nC x 1)
+ mjtNum* qHDiagInv; // 1/diag(D) of modified M (nv x 1)
+
+ // computed by mj_implicit/mj_derivative
+ mjtNum* qDeriv; // d (passive + actuator - bias) / d qvel (nD x 1)
+
+ // computed by mj_implicit/mju_factorLUSparse
+ mjtNum* qLU; // sparse LU of (qM - dt*qDeriv) (nD x 1)
+
+ //-------------------- POSITION, VELOCITY, CONTROL/ACCELERATION dependent
+
+ // computed by mj_fwdActuation
+ mjtNum* actuator_force; // actuator force in actuation space (nu x 1)
+ mjtNum* qfrc_actuator; // actuator force (nv x 1)
+
+ // computed by mj_fwdAcceleration
+ mjtNum* qfrc_smooth; // net unconstrained force (nv x 1)
+ mjtNum* qacc_smooth; // unconstrained acceleration (nv x 1)
+
+ // computed by mj_fwdConstraint/mj_inverse
+ mjtNum* qfrc_constraint; // constraint force (nv x 1)
+
+ // computed by mj_inverse
+ mjtNum* qfrc_inverse; // net external force; should equal:
+ // qfrc_applied + J'*xfrc_applied + qfrc_actuator (nv x 1)
+
+ // computed by mj_sensorAcc/mj_rnePostConstraint if needed; rotation:translation format
+ mjtNum* cacc; // com-based acceleration (nbody x 6)
+ mjtNum* cfrc_int; // com-based interaction force with parent (nbody x 6)
+ mjtNum* cfrc_ext; // com-based external force on body (nbody x 6)
+
+ //-------------------- arena-allocated: POSITION dependent
+
+ // computed by mj_collision
+ mjContact* contact; // array of all detected contacts (ncon x 1)
+
+ // computed by mj_makeConstraint
+ int* efc_type; // constraint type (mjtConstraint) (nefc x 1)
+ int* efc_id; // id of object of specified type (nefc x 1)
+ int* efc_J_rownnz; // number of non-zeros in constraint Jacobian row (nefc x 1)
+ int* efc_J_rowadr; // row start address in colind array (nefc x 1)
+ int* efc_J_rowsuper; // number of subsequent rows in supernode (nefc x 1)
+ int* efc_J_colind; // column indices in constraint Jacobian (nJ x 1)
+ mjtNum* efc_J; // constraint Jacobian (nJ x 1)
+ mjtNum* efc_pos; // constraint position (equality, contact) (nefc x 1)
+ mjtNum* efc_margin; // inclusion margin (contact) (nefc x 1)
+ mjtNum* efc_frictionloss; // frictionloss (friction) (nefc x 1)
+ mjtNum* efc_diagApprox; // approximation to diagonal of A (nefc x 1)
+ mjtNum* efc_KBIP; // stiffness, damping, impedance, imp' (nefc x 4)
+ mjtNum* efc_D; // constraint mass (nefc x 1)
+ mjtNum* efc_R; // inverse constraint mass (nefc x 1)
+ int* tendon_efcadr; // first efc address involving tendon; -1: none (ntendon x 1)
+
+ // computed by mj_island (island dof structure)
+ int* dof_island; // island id of this dof; -1: none (nv x 1)
+ int* island_nv; // number of dofs in this island (nisland x 1)
+ int* island_idofadr; // island start address in idof vector (nisland x 1)
+ int* island_dofadr; // island start address in dof vector (nisland x 1)
+ int* map_dof2idof; // map from dof to idof (nv x 1)
+ int* map_idof2dof; // map from idof to dof; >= nidof: unconstrained (nv x 1)
+
+ // computed by mj_island (dofs sorted by island)
+ mjtNum* ifrc_smooth; // net unconstrained force (nidof x 1)
+ mjtNum* iacc_smooth; // unconstrained acceleration (nidof x 1)
+ int* iM_rownnz; // inertia: non-zeros in each row (nidof x 1)
+ int* iM_rowadr; // inertia: address of each row in iM_colind (nidof x 1)
+ int* iM_colind; // inertia: column indices of non-zeros (nC x 1)
+ mjtNum* iM; // total inertia (sparse) (nC x 1)
+ mjtNum* iLD; // L'*D*L factorization of M (sparse) (nC x 1)
+ mjtNum* iLDiagInv; // 1/diag(D) (nidof x 1)
+ mjtNum* iacc; // acceleration (nidof x 1)
+
+ // computed by mj_island (island constraint structure)
+ int* efc_island; // island id of this constraint (nefc x 1)
+ int* island_ne; // number of equality constraints in island (nisland x 1)
+ int* island_nf; // number of friction constraints in island (nisland x 1)
+ int* island_nefc; // number of constraints in island (nisland x 1)
+ int* island_iefcadr; // start address in iefc vector (nisland x 1)
+ int* map_efc2iefc; // map from efc to iefc (nefc x 1)
+ int* map_iefc2efc; // map from iefc to efc (nefc x 1)
+
+ // computed by mj_island (constraints sorted by island)
+ int* iefc_type; // constraint type (mjtConstraint) (nefc x 1)
+ int* iefc_id; // id of object of specified type (nefc x 1)
+ int* iefc_J_rownnz; // number of non-zeros in constraint Jacobian row (nefc x 1)
+ int* iefc_J_rowadr; // row start address in colind array (nefc x 1)
+ int* iefc_J_rowsuper; // number of subsequent rows in supernode (nefc x 1)
+ int* iefc_J_colind; // column indices in constraint Jacobian (nJ x 1)
+ mjtNum* iefc_J; // constraint Jacobian (nJ x 1)
+ mjtNum* iefc_frictionloss; // frictionloss (friction) (nefc x 1)
+ mjtNum* iefc_D; // constraint mass (nefc x 1)
+ mjtNum* iefc_R; // inverse constraint mass (nefc x 1)
+
+ // computed by mj_projectConstraint (PGS solver)
+ int* efc_AR_rownnz; // number of non-zeros in AR (nefc x 1)
+ int* efc_AR_rowadr; // row start address in colind array (nefc x 1)
+ int* efc_AR_colind; // column indices in sparse AR (nA x 1)
+ mjtNum* efc_AR; // J*inv(M)*J' + R (nA x 1)
+
+ //-------------------- arena-allocated: POSITION, VELOCITY dependent
+
+ // computed by mj_fwdVelocity/mj_referenceConstraint
+ mjtNum* efc_vel; // velocity in constraint space: J*qvel (nefc x 1)
+ mjtNum* efc_aref; // reference pseudo-acceleration (nefc x 1)
+
+ //-------------------- arena-allocated: POSITION, VELOCITY, CONTROL/ACCELERATION dependent
+
+ // computed by mj_fwdConstraint/mj_inverse
+ mjtNum* efc_b; // linear cost term: J*qacc_smooth - aref (nefc x 1)
+ mjtNum* iefc_aref; // reference pseudo-acceleration (nefc x 1)
+ int* iefc_state; // constraint state (mjtConstraintState) (nefc x 1)
+ mjtNum* iefc_force; // constraint force in constraint space (nefc x 1)
+ int* efc_state; // constraint state (mjtConstraintState) (nefc x 1)
+ mjtNum* efc_force; // constraint force in constraint space (nefc x 1)
+ mjtNum* ifrc_constraint; // constraint force (nidof x 1)
+
+ // thread pool pointer
+ uintptr_t threadpool;
+
+ // compilation signature
+ uint64_t signature; // also held by the mjSpec that compiled the model
+};
+typedef struct mjData_ mjData;
+
+
+//---------------------------------- callback function types ---------------------------------------
+
+// generic MuJoCo function
+typedef void (*mjfGeneric)(const mjModel* m, mjData* d);
+
+// contact filter: 1- discard, 0- collide
+typedef int (*mjfConFilt)(const mjModel* m, mjData* d, int geom1, int geom2);
+
+// sensor simulation
+typedef void (*mjfSensor)(const mjModel* m, mjData* d, int stage);
+
+// timer
+typedef mjtNum (*mjfTime)(void);
+
+// actuator dynamics, gain, bias
+typedef mjtNum (*mjfAct)(const mjModel* m, const mjData* d, int id);
+
+// collision detection
+typedef int (*mjfCollision)(const mjModel* m, const mjData* d,
+ mjContact* con, int g1, int g2, mjtNum margin);
+
+#endif // MUJOCO_MJDATA_H_
diff --git a/third_party/mujoco/3.3.7/include/mujoco/mjexport.h b/third_party/mujoco/3.3.7/include/mujoco/mjexport.h
new file mode 100644
index 00000000..1194e03c
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/mjexport.h
@@ -0,0 +1,47 @@
+// Copyright 2021 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MUJOCO_MJEXPORT_H_
+#define MUJOCO_MJEXPORT_H_
+
+#if defined _WIN32 || defined __CYGWIN__
+ #define MUJOCO_HELPER_DLL_IMPORT __declspec(dllimport)
+ #define MUJOCO_HELPER_DLL_EXPORT __declspec(dllexport)
+ #define MUJOCO_HELPER_DLL_LOCAL
+#else
+ #if __GNUC__ >= 4
+ #define MUJOCO_HELPER_DLL_IMPORT __attribute__ ((visibility ("default")))
+ #define MUJOCO_HELPER_DLL_EXPORT __attribute__ ((visibility ("default")))
+ #define MUJOCO_HELPER_DLL_LOCAL __attribute__ ((visibility ("hidden")))
+ #else
+ #define MUJOCO_HELPER_DLL_IMPORT
+ #define MUJOCO_HELPER_DLL_EXPORT
+ #define MUJOCO_HELPER_DLL_LOCAL
+ #endif
+#endif
+
+#ifdef MJ_STATIC
+ // static library
+ #define MJAPI
+ #define MJLOCAL
+#else
+ #ifdef MUJOCO_DLL_EXPORTS
+ #define MJAPI MUJOCO_HELPER_DLL_EXPORT
+ #else
+ #define MJAPI MUJOCO_HELPER_DLL_IMPORT
+ #endif
+ #define MJLOCAL MUJOCO_HELPER_DLL_LOCAL
+#endif
+
+#endif // MUJOCO_MJEXPORT_H_
diff --git a/third_party/mujoco/3.3.7/include/mujoco/mjmacro.h b/third_party/mujoco/3.3.7/include/mujoco/mjmacro.h
new file mode 100644
index 00000000..a50c117c
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/mjmacro.h
@@ -0,0 +1,38 @@
+// Copyright 2023 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MUJOCO_MJMACRO_H_
+#define MUJOCO_MJMACRO_H_
+
+// max and min (use only for primitive types)
+#define mjMAX(a, b) (((a) > (b)) ? (a) : (b))
+#define mjMIN(a, b) (((a) < (b)) ? (a) : (b))
+
+// return current value of mjOption enable/disable flags
+#define mjDISABLED(x) (m->opt.disableflags & (x))
+#define mjENABLED(x) (m->opt.enableflags & (x))
+
+// is actuator disabled
+#define mjACTUATORDISABLED(i) (m->opt.disableactuator & (1 << m->actuator_group[i]))
+
+// annotation for functions that accept printf-like variadic arguments
+#ifndef mjPRINTFLIKE
+ #if defined(__GNUC__)
+ #define mjPRINTFLIKE(n, m) __attribute__((format(printf, n, m)))
+ #else
+ #define mjPRINTFLIKE(n, m)
+ #endif
+#endif
+
+#endif // MUJOCO_MJMACRO_H_
diff --git a/third_party/mujoco/3.3.7/include/mujoco/mjmodel.h b/third_party/mujoco/3.3.7/include/mujoco/mjmodel.h
new file mode 100644
index 00000000..a33f148d
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/mjmodel.h
@@ -0,0 +1,1231 @@
+// Copyright 2021 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MUJOCO_MJMODEL_H_
+#define MUJOCO_MJMODEL_H_
+
+#include
+#include
+
+
+#include
+
+// global constants
+#define mjPI 3.14159265358979323846
+#define mjMAXVAL 1E+10 // maximum value in qpos, qvel, qacc
+#define mjMINMU 1E-5 // minimum friction coefficient
+#define mjMINIMP 0.0001 // minimum constraint impedance
+#define mjMAXIMP 0.9999 // maximum constraint impedance
+#define mjMAXCONPAIR 50 // maximum number of contacts per geom pair
+#define mjMAXTREEDEPTH 50 // maximum bounding volume hierarchy depth
+#define mjMAXFLEXNODES 27 // maximum number of flex nodes
+
+
+//---------------------------------- sizes ---------------------------------------------------------
+
+#define mjNEQDATA 11 // number of eq_data fields
+#define mjNDYN 10 // number of actuator dynamics parameters
+#define mjNGAIN 10 // number of actuator gain parameters
+#define mjNBIAS 10 // number of actuator bias parameters
+#define mjNFLUID 12 // number of fluid interaction parameters
+#define mjNREF 2 // number of solver reference parameters
+#define mjNIMP 5 // number of solver impedance parameters
+#define mjNSENS 3 // number of sensor parameters
+#define mjNSOLVER 200 // size of one mjData.solver array
+#define mjNISLAND 20 // number of mjData.solver arrays
+
+
+//---------------------------------- enum types (mjt) ----------------------------------------------
+
+typedef enum mjtDisableBit_ { // disable default feature bitflags
+ mjDSBL_CONSTRAINT = 1<<0, // entire constraint solver
+ mjDSBL_EQUALITY = 1<<1, // equality constraints
+ mjDSBL_FRICTIONLOSS = 1<<2, // joint and tendon frictionloss constraints
+ mjDSBL_LIMIT = 1<<3, // joint and tendon limit constraints
+ mjDSBL_CONTACT = 1<<4, // contact constraints
+ mjDSBL_SPRING = 1<<5, // passive spring forces
+ mjDSBL_DAMPER = 1<<6, // passive damping forces
+ mjDSBL_GRAVITY = 1<<7, // gravitational forces
+ mjDSBL_CLAMPCTRL = 1<<8, // clamp control to specified range
+ mjDSBL_WARMSTART = 1<<9, // warmstart constraint solver
+ mjDSBL_FILTERPARENT = 1<<10, // remove collisions with parent body
+ mjDSBL_ACTUATION = 1<<11, // apply actuation forces
+ mjDSBL_REFSAFE = 1<<12, // integrator safety: make ref[0]>=2*timestep
+ mjDSBL_SENSOR = 1<<13, // sensors
+ mjDSBL_MIDPHASE = 1<<14, // mid-phase collision filtering
+ mjDSBL_EULERDAMP = 1<<15, // implicit integration of joint damping in Euler integrator
+ mjDSBL_AUTORESET = 1<<16, // automatic reset when numerical issues are detected
+ mjDSBL_NATIVECCD = 1<<17, // native convex collision detection
+ mjDSBL_ISLAND = 1<<18, // constraint island discovery
+
+ mjNDISABLE = 19 // number of disable flags
+} mjtDisableBit;
+
+
+typedef enum mjtEnableBit_ { // enable optional feature bitflags
+ mjENBL_OVERRIDE = 1<<0, // override contact parameters
+ mjENBL_ENERGY = 1<<1, // energy computation
+ mjENBL_FWDINV = 1<<2, // record solver statistics
+ mjENBL_INVDISCRETE = 1<<3, // discrete-time inverse dynamics
+ // experimental features:
+ mjENBL_MULTICCD = 1<<4, // multi-point convex collision detection
+
+ mjNENABLE = 5 // number of enable flags
+} mjtEnableBit;
+
+
+typedef enum mjtJoint_ { // type of degree of freedom
+ mjJNT_FREE = 0, // global position and orientation (quat) (7)
+ mjJNT_BALL, // orientation (quat) relative to parent (4)
+ mjJNT_SLIDE, // sliding distance along body-fixed axis (1)
+ mjJNT_HINGE // rotation angle (rad) around body-fixed axis (1)
+} mjtJoint;
+
+
+typedef enum mjtGeom_ { // type of geometric shape
+ // regular geom types
+ mjGEOM_PLANE = 0, // plane
+ mjGEOM_HFIELD, // height field
+ mjGEOM_SPHERE, // sphere
+ mjGEOM_CAPSULE, // capsule
+ mjGEOM_ELLIPSOID, // ellipsoid
+ mjGEOM_CYLINDER, // cylinder
+ mjGEOM_BOX, // box
+ mjGEOM_MESH, // mesh
+ mjGEOM_SDF, // signed distance field
+
+ mjNGEOMTYPES, // number of regular geom types
+
+ // rendering-only geom types: not used in mjModel, not counted in mjNGEOMTYPES
+ mjGEOM_ARROW = 100, // arrow
+ mjGEOM_ARROW1, // arrow without wedges
+ mjGEOM_ARROW2, // arrow in both directions
+ mjGEOM_LINE, // line
+ mjGEOM_LINEBOX, // box with line edges
+ mjGEOM_FLEX, // flex
+ mjGEOM_SKIN, // skin
+ mjGEOM_LABEL, // text label
+ mjGEOM_TRIANGLE, // triangle
+
+ mjGEOM_NONE = 1001 // missing geom type
+} mjtGeom;
+
+
+typedef enum mjtCamLight_ { // tracking mode for camera and light
+ mjCAMLIGHT_FIXED = 0, // pos and rot fixed in body
+ mjCAMLIGHT_TRACK, // pos tracks body, rot fixed in global
+ mjCAMLIGHT_TRACKCOM, // pos tracks subtree com, rot fixed in body
+ mjCAMLIGHT_TARGETBODY, // pos fixed in body, rot tracks target body
+ mjCAMLIGHT_TARGETBODYCOM // pos fixed in body, rot tracks target subtree com
+} mjtCamLight;
+
+
+typedef enum mjtLightType_ { // type of light
+ mjLIGHT_SPOT = 0, // spot
+ mjLIGHT_DIRECTIONAL, // directional
+ mjLIGHT_POINT, // point
+ mjLIGHT_IMAGE, // image-based
+} mjtLightType;
+
+
+typedef enum mjtTexture_ { // type of texture
+ mjTEXTURE_2D = 0, // 2d texture, suitable for planes and hfields
+ mjTEXTURE_CUBE, // cube texture, suitable for all other geom types
+ mjTEXTURE_SKYBOX // cube texture used as skybox
+} mjtTexture;
+
+
+typedef enum mjtTextureRole_ { // role of texture map in rendering
+ mjTEXROLE_USER = 0, // unspecified
+ mjTEXROLE_RGB, // base color (albedo)
+ mjTEXROLE_OCCLUSION, // ambient occlusion
+ mjTEXROLE_ROUGHNESS, // roughness
+ mjTEXROLE_METALLIC, // metallic
+ mjTEXROLE_NORMAL, // normal (bump) map
+ mjTEXROLE_OPACITY, // transperancy
+ mjTEXROLE_EMISSIVE, // light emission
+ mjTEXROLE_RGBA, // base color, opacity
+ mjTEXROLE_ORM, // occlusion, roughness, metallic
+ mjNTEXROLE
+} mjtTextureRole;
+
+
+typedef enum mjtColorSpace_ { // type of color space encoding
+ mjCOLORSPACE_AUTO = 0, // attempts to autodetect color space, defaults to linear
+ mjCOLORSPACE_LINEAR, // linear color space
+ mjCOLORSPACE_SRGB // standard RGB color space
+} mjtColorSpace;
+
+
+typedef enum mjtIntegrator_ { // integrator mode
+ mjINT_EULER = 0, // semi-implicit Euler
+ mjINT_RK4, // 4th-order Runge Kutta
+ mjINT_IMPLICIT, // implicit in velocity
+ mjINT_IMPLICITFAST // implicit in velocity, no rne derivative
+} mjtIntegrator;
+
+
+typedef enum mjtCone_ { // type of friction cone
+ mjCONE_PYRAMIDAL = 0, // pyramidal
+ mjCONE_ELLIPTIC // elliptic
+} mjtCone;
+
+
+typedef enum mjtJacobian_ { // type of constraint Jacobian
+ mjJAC_DENSE = 0, // dense
+ mjJAC_SPARSE, // sparse
+ mjJAC_AUTO // dense if nv<60, sparse otherwise
+} mjtJacobian;
+
+
+typedef enum mjtSolver_ { // constraint solver algorithm
+ mjSOL_PGS = 0, // PGS (dual)
+ mjSOL_CG, // CG (primal)
+ mjSOL_NEWTON // Newton (primal)
+} mjtSolver;
+
+
+typedef enum mjtEq_ { // type of equality constraint
+ mjEQ_CONNECT = 0, // connect two bodies at a point (ball joint)
+ mjEQ_WELD, // fix relative position and orientation of two bodies
+ mjEQ_JOINT, // couple the values of two scalar joints with cubic
+ mjEQ_TENDON, // couple the lengths of two tendons with cubic
+ mjEQ_FLEX, // fix all edge lengths of a flex
+ mjEQ_DISTANCE // unsupported, will cause an error if used
+} mjtEq;
+
+
+typedef enum mjtWrap_ { // type of tendon wrap object
+ mjWRAP_NONE = 0, // null object
+ mjWRAP_JOINT, // constant moment arm
+ mjWRAP_PULLEY, // pulley used to split tendon
+ mjWRAP_SITE, // pass through site
+ mjWRAP_SPHERE, // wrap around sphere
+ mjWRAP_CYLINDER // wrap around (infinite) cylinder
+} mjtWrap;
+
+
+typedef enum mjtTrn_ { // type of actuator transmission
+ mjTRN_JOINT = 0, // force on joint
+ mjTRN_JOINTINPARENT, // force on joint, expressed in parent frame
+ mjTRN_SLIDERCRANK, // force via slider-crank linkage
+ mjTRN_TENDON, // force on tendon
+ mjTRN_SITE, // force on site
+ mjTRN_BODY, // adhesion force on a body's geoms
+
+ mjTRN_UNDEFINED = 1000 // undefined transmission type
+} mjtTrn;
+
+
+typedef enum mjtDyn_ { // type of actuator dynamics
+ mjDYN_NONE = 0, // no internal dynamics; ctrl specifies force
+ mjDYN_INTEGRATOR, // integrator: da/dt = u
+ mjDYN_FILTER, // linear filter: da/dt = (u-a) / tau
+ mjDYN_FILTEREXACT, // linear filter: da/dt = (u-a) / tau, with exact integration
+ mjDYN_MUSCLE, // piece-wise linear filter with two time constants
+ mjDYN_USER // user-defined dynamics type
+} mjtDyn;
+
+
+typedef enum mjtGain_ { // type of actuator gain
+ mjGAIN_FIXED = 0, // fixed gain
+ mjGAIN_AFFINE, // const + kp*length + kv*velocity
+ mjGAIN_MUSCLE, // muscle FLV curve computed by mju_muscleGain()
+ mjGAIN_USER // user-defined gain type
+} mjtGain;
+
+
+typedef enum mjtBias_ { // type of actuator bias
+ mjBIAS_NONE = 0, // no bias
+ mjBIAS_AFFINE, // const + kp*length + kv*velocity
+ mjBIAS_MUSCLE, // muscle passive force computed by mju_muscleBias()
+ mjBIAS_USER // user-defined bias type
+} mjtBias;
+
+
+typedef enum mjtObj_ { // type of MujoCo object
+ mjOBJ_UNKNOWN = 0, // unknown object type
+ mjOBJ_BODY, // body
+ mjOBJ_XBODY, // body, used to access regular frame instead of i-frame
+ mjOBJ_JOINT, // joint
+ mjOBJ_DOF, // dof
+ mjOBJ_GEOM, // geom
+ mjOBJ_SITE, // site
+ mjOBJ_CAMERA, // camera
+ mjOBJ_LIGHT, // light
+ mjOBJ_FLEX, // flex
+ mjOBJ_MESH, // mesh
+ mjOBJ_SKIN, // skin
+ mjOBJ_HFIELD, // heightfield
+ mjOBJ_TEXTURE, // texture
+ mjOBJ_MATERIAL, // material for rendering
+ mjOBJ_PAIR, // geom pair to include
+ mjOBJ_EXCLUDE, // body pair to exclude
+ mjOBJ_EQUALITY, // equality constraint
+ mjOBJ_TENDON, // tendon
+ mjOBJ_ACTUATOR, // actuator
+ mjOBJ_SENSOR, // sensor
+ mjOBJ_NUMERIC, // numeric
+ mjOBJ_TEXT, // text
+ mjOBJ_TUPLE, // tuple
+ mjOBJ_KEY, // keyframe
+ mjOBJ_PLUGIN, // plugin instance
+
+ mjNOBJECT, // number of object types
+
+ // meta elements, do not appear in mjModel
+ mjOBJ_FRAME = 100, // frame
+ mjOBJ_DEFAULT, // default
+ mjOBJ_MODEL // entire model
+
+} mjtObj;
+
+
+typedef enum mjtSensor_ { // type of sensor
+ // common robotic sensors, attached to a site
+ mjSENS_TOUCH = 0, // scalar contact normal forces summed over sensor zone
+ mjSENS_ACCELEROMETER, // 3D linear acceleration, in local frame
+ mjSENS_VELOCIMETER, // 3D linear velocity, in local frame
+ mjSENS_GYRO, // 3D angular velocity, in local frame
+ mjSENS_FORCE, // 3D force between site's body and its parent body
+ mjSENS_TORQUE, // 3D torque between site's body and its parent body
+ mjSENS_MAGNETOMETER, // 3D magnetometer
+ mjSENS_RANGEFINDER, // scalar distance to nearest geom or site along z-axis
+ mjSENS_CAMPROJECTION, // pixel coordinates of a site in the camera image
+
+ // sensors related to scalar joints, tendons, actuators
+ mjSENS_JOINTPOS, // scalar joint position (hinge and slide only)
+ mjSENS_JOINTVEL, // scalar joint velocity (hinge and slide only)
+ mjSENS_TENDONPOS, // scalar tendon position
+ mjSENS_TENDONVEL, // scalar tendon velocity
+ mjSENS_ACTUATORPOS, // scalar actuator position
+ mjSENS_ACTUATORVEL, // scalar actuator velocity
+ mjSENS_ACTUATORFRC, // scalar actuator force
+ mjSENS_JOINTACTFRC, // scalar actuator force, measured at the joint
+ mjSENS_TENDONACTFRC, // scalar actuator force, measured at the tendon
+
+ // sensors related to ball joints
+ mjSENS_BALLQUAT, // 4D ball joint quaternion
+ mjSENS_BALLANGVEL, // 3D ball joint angular velocity
+
+ // joint and tendon limit sensors, in constraint space
+ mjSENS_JOINTLIMITPOS, // joint limit distance-margin
+ mjSENS_JOINTLIMITVEL, // joint limit velocity
+ mjSENS_JOINTLIMITFRC, // joint limit force
+ mjSENS_TENDONLIMITPOS, // tendon limit distance-margin
+ mjSENS_TENDONLIMITVEL, // tendon limit velocity
+ mjSENS_TENDONLIMITFRC, // tendon limit force
+
+ // sensors attached to an object with spatial frame: (x)body, geom, site, camera
+ mjSENS_FRAMEPOS, // 3D position
+ mjSENS_FRAMEQUAT, // 4D unit quaternion orientation
+ mjSENS_FRAMEXAXIS, // 3D unit vector: x-axis of object's frame
+ mjSENS_FRAMEYAXIS, // 3D unit vector: y-axis of object's frame
+ mjSENS_FRAMEZAXIS, // 3D unit vector: z-axis of object's frame
+ mjSENS_FRAMELINVEL, // 3D linear velocity
+ mjSENS_FRAMEANGVEL, // 3D angular velocity
+ mjSENS_FRAMELINACC, // 3D linear acceleration
+ mjSENS_FRAMEANGACC, // 3D angular acceleration
+
+ // sensors related to kinematic subtrees; attached to a body (which is the subtree root)
+ mjSENS_SUBTREECOM, // 3D center of mass of subtree
+ mjSENS_SUBTREELINVEL, // 3D linear velocity of subtree
+ mjSENS_SUBTREEANGMOM, // 3D angular momentum of subtree
+
+ // sensors of geometric relationships
+ mjSENS_INSIDESITE, // 1 if object is inside a site, 0 otherwise
+ mjSENS_GEOMDIST, // signed distance between two geoms
+ mjSENS_GEOMNORMAL, // normal direction between two geoms
+ mjSENS_GEOMFROMTO, // segment between two geoms
+
+ // sensors for reporting contacts which occurred during the simulation
+ mjSENS_CONTACT, // contacts which occurred during the simulation
+
+ // global sensors
+ mjSENS_E_POTENTIAL, // potential energy
+ mjSENS_E_KINETIC, // kinetic energy
+ mjSENS_CLOCK, // simulation time
+
+ // sensors related to SDFs
+ mjSENS_TACTILE, // tactile sensor
+
+ // plugin-controlled sensors
+ mjSENS_PLUGIN, // plugin-controlled
+
+ // user-defined sensor
+ mjSENS_USER // sensor data provided by mjcb_sensor callback
+} mjtSensor;
+
+
+typedef enum mjtStage_ { // computation stage
+ mjSTAGE_NONE = 0, // no computations
+ mjSTAGE_POS, // position-dependent computations
+ mjSTAGE_VEL, // velocity-dependent computations
+ mjSTAGE_ACC // acceleration/force-dependent computations
+} mjtStage;
+
+
+typedef enum mjtDataType_ { // data type for sensors
+ mjDATATYPE_REAL = 0, // real values, no constraints
+ mjDATATYPE_POSITIVE, // positive values; 0 or negative: inactive
+ mjDATATYPE_AXIS, // 3D unit vector
+ mjDATATYPE_QUATERNION // unit quaternion
+} mjtDataType;
+
+
+typedef enum mjtConDataField_ { // data fields returned by contact sensors
+ mjCONDATA_FOUND = 0, // whether a contact was found
+ mjCONDATA_FORCE, // contact force
+ mjCONDATA_TORQUE, // contact torque
+ mjCONDATA_DIST, // contact penetration distance
+ mjCONDATA_POS, // contact position
+ mjCONDATA_NORMAL, // contact frame normal
+ mjCONDATA_TANGENT, // contact frame first tangent
+
+ mjNCONDATA = 7 // number of contact sensor data fields
+} mjtConDataField;
+
+
+typedef enum mjtSameFrame_ { // frame alignment of bodies with their children
+ mjSAMEFRAME_NONE = 0, // no alignment
+ mjSAMEFRAME_BODY, // frame is same as body frame
+ mjSAMEFRAME_INERTIA, // frame is same as inertial frame
+ mjSAMEFRAME_BODYROT, // frame orientation is same as body orientation
+ mjSAMEFRAME_INERTIAROT // frame orientation is same as inertia orientation
+} mjtSameFrame;
+
+
+typedef enum mjtLRMode_ { // mode for actuator length range computation
+ mjLRMODE_NONE = 0, // do not process any actuators
+ mjLRMODE_MUSCLE, // process muscle actuators
+ mjLRMODE_MUSCLEUSER, // process muscle and user actuators
+ mjLRMODE_ALL // process all actuators
+} mjtLRMode;
+
+
+typedef enum mjtFlexSelf_ { // mode for flex selfcollide
+ mjFLEXSELF_NONE = 0, // no self-collisions
+ mjFLEXSELF_NARROW, // skip midphase, go directly to narrowphase
+ mjFLEXSELF_BVH, // use BVH in midphase (if midphase enabled)
+ mjFLEXSELF_SAP, // use SAP in midphase
+ mjFLEXSELF_AUTO // choose between BVH and SAP automatically
+} mjtFlexSelf;
+
+
+typedef enum mjtSDFType_ { // signed distance function (SDF) type
+ mjSDFTYPE_SINGLE = 0, // single SDF
+ mjSDFTYPE_INTERSECTION, // max(A, B)
+ mjSDFTYPE_MIDSURFACE, // A - B
+ mjSDFTYPE_COLLISION, // A + B + abs(max(A, B))
+} mjtSDFType;
+
+
+//---------------------------------- mjLROpt -------------------------------------------------------
+
+struct mjLROpt_ { // options for mj_setLengthRange()
+ // flags
+ int mode; // which actuators to process (mjtLRMode)
+ int useexisting; // use existing length range if available
+ int uselimit; // use joint and tendon limits if available
+
+ // algorithm parameters
+ mjtNum accel; // target acceleration used to compute force
+ mjtNum maxforce; // maximum force; 0: no limit
+ mjtNum timeconst; // time constant for velocity reduction; min 0.01
+ mjtNum timestep; // simulation timestep; 0: use mjOption.timestep
+ mjtNum inttotal; // total simulation time interval
+ mjtNum interval; // evaluation time interval (at the end)
+ mjtNum tolrange; // convergence tolerance (relative to range)
+};
+typedef struct mjLROpt_ mjLROpt;
+
+//---------------------------------- mjCache -------------------------------------------------------
+
+struct mjCache_ { // asset cache used by the compiler
+ void* impl_; // internal pointer to cache
+};
+typedef struct mjCache_ mjCache;
+
+//---------------------------------- mjVFS ---------------------------------------------------------
+
+struct mjVFS_ { // virtual file system for loading from memory
+ void* impl_; // internal pointer to VFS memory
+};
+typedef struct mjVFS_ mjVFS;
+
+//---------------------------------- mjOption ------------------------------------------------------
+
+struct mjOption_ { // physics options
+ // timing parameters
+ mjtNum timestep; // timestep
+
+ // solver parameters
+ mjtNum impratio; // ratio of friction-to-normal contact impedance
+ mjtNum tolerance; // main solver tolerance
+ mjtNum ls_tolerance; // CG/Newton linesearch tolerance
+ mjtNum noslip_tolerance; // noslip solver tolerance
+ mjtNum ccd_tolerance; // convex collision solver tolerance
+
+ // physical constants
+ mjtNum gravity[3]; // gravitational acceleration
+ mjtNum wind[3]; // wind (for lift, drag and viscosity)
+ mjtNum magnetic[3]; // global magnetic flux
+ mjtNum density; // density of medium
+ mjtNum viscosity; // viscosity of medium
+
+ // override contact solver parameters (if enabled)
+ mjtNum o_margin; // margin
+ mjtNum o_solref[mjNREF]; // solref
+ mjtNum o_solimp[mjNIMP]; // solimp
+ mjtNum o_friction[5]; // friction
+
+ // discrete settings
+ int integrator; // integration mode (mjtIntegrator)
+ int cone; // type of friction cone (mjtCone)
+ int jacobian; // type of Jacobian (mjtJacobian)
+ int solver; // solver algorithm (mjtSolver)
+ int iterations; // maximum number of main solver iterations
+ int ls_iterations; // maximum number of CG/Newton linesearch iterations
+ int noslip_iterations; // maximum number of noslip solver iterations
+ int ccd_iterations; // maximum number of convex collision solver iterations
+ int disableflags; // bit flags for disabling standard features
+ int enableflags; // bit flags for enabling optional features
+ int disableactuator; // bit flags for disabling actuators by group id
+
+ // sdf collision settings
+ int sdf_initpoints; // number of starting points for gradient descent
+ int sdf_iterations; // max number of iterations for gradient descent
+};
+typedef struct mjOption_ mjOption;
+
+
+//---------------------------------- mjVisual ------------------------------------------------------
+
+struct mjVisual_ { // visualization options
+ struct { // global parameters
+ int cameraid; // initial camera id (-1: free)
+ int orthographic; // is the free camera orthographic (0: no, 1: yes)
+ float fovy; // y field-of-view of free camera (orthographic ? length : degree)
+ float ipd; // inter-pupilary distance for free camera
+ float azimuth; // initial azimuth of free camera (degrees)
+ float elevation; // initial elevation of free camera (degrees)
+ float linewidth; // line width for wireframe and ray rendering
+ float glow; // glow coefficient for selected body
+ float realtime; // initial real-time factor (1: real time)
+ int offwidth; // width of offscreen buffer
+ int offheight; // height of offscreen buffer
+ int ellipsoidinertia; // geom for inertia visualization (0: box, 1: ellipsoid)
+ int bvactive; // visualize active bounding volumes (0: no, 1: yes)
+ } global;
+
+ struct { // rendering quality
+ int shadowsize; // size of shadowmap texture
+ int offsamples; // number of multisamples for offscreen rendering
+ int numslices; // number of slices for builtin geom drawing
+ int numstacks; // number of stacks for builtin geom drawing
+ int numquads; // number of quads for box rendering
+ } quality;
+
+ struct { // head light
+ float ambient[3]; // ambient rgb (alpha=1)
+ float diffuse[3]; // diffuse rgb (alpha=1)
+ float specular[3]; // specular rgb (alpha=1)
+ int active; // is headlight active
+ } headlight;
+
+ struct { // mapping
+ float stiffness; // mouse perturbation stiffness (space->force)
+ float stiffnessrot; // mouse perturbation stiffness (space->torque)
+ float force; // from force units to space units
+ float torque; // from torque units to space units
+ float alpha; // scale geom alphas when transparency is enabled
+ float fogstart; // OpenGL fog starts at fogstart * mjModel.stat.extent
+ float fogend; // OpenGL fog ends at fogend * mjModel.stat.extent
+ float znear; // near clipping plane = znear * mjModel.stat.extent
+ float zfar; // far clipping plane = zfar * mjModel.stat.extent
+ float haze; // haze ratio
+ float shadowclip; // directional light: shadowclip * mjModel.stat.extent
+ float shadowscale; // spot light: shadowscale * light.cutoff
+ float actuatortendon; // scale tendon width
+ } map;
+
+ struct { // scale of decor elements relative to mean body size
+ float forcewidth; // width of force arrow
+ float contactwidth; // contact width
+ float contactheight; // contact height
+ float connect; // autoconnect capsule width
+ float com; // com radius
+ float camera; // camera object
+ float light; // light object
+ float selectpoint; // selection point
+ float jointlength; // joint length
+ float jointwidth; // joint width
+ float actuatorlength; // actuator length
+ float actuatorwidth; // actuator width
+ float framelength; // bodyframe axis length
+ float framewidth; // bodyframe axis width
+ float constraint; // constraint width
+ float slidercrank; // slidercrank width
+ float frustum; // frustum zfar plane
+ } scale;
+
+ struct { // color of decor elements
+ float fog[4]; // fog
+ float haze[4]; // haze
+ float force[4]; // external force
+ float inertia[4]; // inertia box
+ float joint[4]; // joint
+ float actuator[4]; // actuator, neutral
+ float actuatornegative[4]; // actuator, negative limit
+ float actuatorpositive[4]; // actuator, positive limit
+ float com[4]; // center of mass
+ float camera[4]; // camera object
+ float light[4]; // light object
+ float selectpoint[4]; // selection point
+ float connect[4]; // auto connect
+ float contactpoint[4]; // contact point
+ float contactforce[4]; // contact force
+ float contactfriction[4]; // contact friction force
+ float contacttorque[4]; // contact torque
+ float contactgap[4]; // contact point in gap
+ float rangefinder[4]; // rangefinder ray
+ float constraint[4]; // constraint
+ float slidercrank[4]; // slidercrank
+ float crankbroken[4]; // used when crank must be stretched/broken
+ float frustum[4]; // camera frustum
+ float bv[4]; // bounding volume
+ float bvactive[4]; // active bounding volume
+ } rgba;
+};
+typedef struct mjVisual_ mjVisual;
+
+
+//---------------------------------- mjStatistic ---------------------------------------------------
+
+struct mjStatistic_ { // model statistics (in qpos0)
+ mjtNum meaninertia; // mean diagonal inertia
+ mjtNum meanmass; // mean body mass
+ mjtNum meansize; // mean body size
+ mjtNum extent; // spatial extent
+ mjtNum center[3]; // center of model
+};
+typedef struct mjStatistic_ mjStatistic;
+
+
+//---------------------------------- mjModel -------------------------------------------------------
+
+struct mjModel_ {
+ // ------------------------------- sizes
+
+ // sizes needed at mjModel construction
+ int nq; // number of generalized coordinates = dim(qpos)
+ int nv; // number of degrees of freedom = dim(qvel)
+ int nu; // number of actuators/controls = dim(ctrl)
+ int na; // number of activation states = dim(act)
+ int nbody; // number of bodies
+ int nbvh; // number of total bounding volumes in all bodies
+ int nbvhstatic; // number of static bounding volumes (aabb stored in mjModel)
+ int nbvhdynamic; // number of dynamic bounding volumes (aabb stored in mjData)
+ int noct; // number of total octree cells in all meshes
+ int njnt; // number of joints
+ int ntree; // number of kinematic trees under world body
+ int nM; // number of non-zeros in sparse inertia matrix
+ int nB; // number of non-zeros in sparse body-dof matrix
+ int nC; // number of non-zeros in sparse reduced dof-dof matrix
+ int nD; // number of non-zeros in sparse dof-dof matrix
+ int ngeom; // number of geoms
+ int nsite; // number of sites
+ int ncam; // number of cameras
+ int nlight; // number of lights
+ int nflex; // number of flexes
+ int nflexnode; // number of dofs in all flexes
+ int nflexvert; // number of vertices in all flexes
+ int nflexedge; // number of edges in all flexes
+ int nflexelem; // number of elements in all flexes
+ int nflexelemdata; // number of element vertex ids in all flexes
+ int nflexelemedge; // number of element edge ids in all flexes
+ int nflexshelldata; // number of shell fragment vertex ids in all flexes
+ int nflexevpair; // number of element-vertex pairs in all flexes
+ int nflextexcoord; // number of vertices with texture coordinates
+ int nmesh; // number of meshes
+ int nmeshvert; // number of vertices in all meshes
+ int nmeshnormal; // number of normals in all meshes
+ int nmeshtexcoord; // number of texcoords in all meshes
+ int nmeshface; // number of triangular faces in all meshes
+ int nmeshgraph; // number of ints in mesh auxiliary data
+ int nmeshpoly; // number of polygons in all meshes
+ int nmeshpolyvert; // number of vertices in all polygons
+ int nmeshpolymap; // number of polygons in vertex map
+ int nskin; // number of skins
+ int nskinvert; // number of vertices in all skins
+ int nskintexvert; // number of vertiex with texcoords in all skins
+ int nskinface; // number of triangular faces in all skins
+ int nskinbone; // number of bones in all skins
+ int nskinbonevert; // number of vertices in all skin bones
+ int nhfield; // number of heightfields
+ int nhfielddata; // number of data points in all heightfields
+ int ntex; // number of textures
+ int ntexdata; // number of bytes in texture rgb data
+ int nmat; // number of materials
+ int npair; // number of predefined geom pairs
+ int nexclude; // number of excluded geom pairs
+ int neq; // number of equality constraints
+ int ntendon; // number of tendons
+ int nwrap; // number of wrap objects in all tendon paths
+ int nsensor; // number of sensors
+ int nnumeric; // number of numeric custom fields
+ int nnumericdata; // number of mjtNums in all numeric fields
+ int ntext; // number of text custom fields
+ int ntextdata; // number of mjtBytes in all text fields
+ int ntuple; // number of tuple custom fields
+ int ntupledata; // number of objects in all tuple fields
+ int nkey; // number of keyframes
+ int nmocap; // number of mocap bodies
+ int nplugin; // number of plugin instances
+ int npluginattr; // number of chars in all plugin config attributes
+ int nuser_body; // number of mjtNums in body_user
+ int nuser_jnt; // number of mjtNums in jnt_user
+ int nuser_geom; // number of mjtNums in geom_user
+ int nuser_site; // number of mjtNums in site_user
+ int nuser_cam; // number of mjtNums in cam_user
+ int nuser_tendon; // number of mjtNums in tendon_user
+ int nuser_actuator; // number of mjtNums in actuator_user
+ int nuser_sensor; // number of mjtNums in sensor_user
+ int nnames; // number of chars in all names
+ int npaths; // number of chars in all paths
+
+ // sizes set after mjModel construction
+ int nnames_map; // number of slots in the names hash map
+ int nJmom; // number of non-zeros in sparse actuator_moment matrix
+ int ngravcomp; // number of bodies with nonzero gravcomp
+ int nemax; // number of potential equality-constraint rows
+ int njmax; // number of available rows in constraint Jacobian (legacy)
+ int nconmax; // number of potential contacts in contact list (legacy)
+ int nuserdata; // number of mjtNums reserved for the user
+ int nsensordata; // number of mjtNums in sensor data vector
+ int npluginstate; // number of mjtNums in plugin state vector
+
+ mjtSize narena; // number of bytes in the mjData arena (inclusive of stack)
+ mjtSize nbuffer; // number of bytes in buffer
+
+ // ------------------------------- options and statistics
+
+ mjOption opt; // physics options
+ mjVisual vis; // visualization options
+ mjStatistic stat; // model statistics
+
+ // ------------------------------- buffers
+
+ // main buffer
+ void* buffer; // main buffer; all pointers point in it (nbuffer)
+
+ // default generalized coordinates
+ mjtNum* qpos0; // qpos values at default pose (nq x 1)
+ mjtNum* qpos_spring; // reference pose for springs (nq x 1)
+
+ // bodies
+ int* body_parentid; // id of body's parent (nbody x 1)
+ int* body_rootid; // id of root above body (nbody x 1)
+ int* body_weldid; // id of body that this body is welded to (nbody x 1)
+ int* body_mocapid; // id of mocap data; -1: none (nbody x 1)
+ int* body_jntnum; // number of joints for this body (nbody x 1)
+ int* body_jntadr; // start addr of joints; -1: no joints (nbody x 1)
+ int* body_dofnum; // number of motion degrees of freedom (nbody x 1)
+ int* body_dofadr; // start addr of dofs; -1: no dofs (nbody x 1)
+ int* body_treeid; // id of body's kinematic tree; -1: static (nbody x 1)
+ int* body_geomnum; // number of geoms (nbody x 1)
+ int* body_geomadr; // start addr of geoms; -1: no geoms (nbody x 1)
+ mjtByte* body_simple; // 1: diag M; 2: diag M, sliders only (nbody x 1)
+ mjtByte* body_sameframe; // same frame as inertia (mjtSameframe) (nbody x 1)
+ mjtNum* body_pos; // position offset rel. to parent body (nbody x 3)
+ mjtNum* body_quat; // orientation offset rel. to parent body (nbody x 4)
+ mjtNum* body_ipos; // local position of center of mass (nbody x 3)
+ mjtNum* body_iquat; // local orientation of inertia ellipsoid (nbody x 4)
+ mjtNum* body_mass; // mass (nbody x 1)
+ mjtNum* body_subtreemass; // mass of subtree starting at this body (nbody x 1)
+ mjtNum* body_inertia; // diagonal inertia in ipos/iquat frame (nbody x 3)
+ mjtNum* body_invweight0; // mean inv inert in qpos0 (trn, rot) (nbody x 2)
+ mjtNum* body_gravcomp; // antigravity force, units of body weight (nbody x 1)
+ mjtNum* body_margin; // MAX over all geom margins (nbody x 1)
+ mjtNum* body_user; // user data (nbody x nuser_body)
+ int* body_plugin; // plugin instance id; -1: not in use (nbody x 1)
+ int* body_contype; // OR over all geom contypes (nbody x 1)
+ int* body_conaffinity; // OR over all geom conaffinities (nbody x 1)
+ int* body_bvhadr; // address of bvh root (nbody x 1)
+ int* body_bvhnum; // number of bounding volumes (nbody x 1)
+
+ // bounding volume hierarchy
+ int* bvh_depth; // depth in the bounding volume hierarchy (nbvh x 1)
+ int* bvh_child; // left and right children in tree (nbvh x 2)
+ int* bvh_nodeid; // geom or elem id of node; -1: non-leaf (nbvh x 1)
+ mjtNum* bvh_aabb; // local bounding box (center, size) (nbvhstatic x 6)
+
+ // octree spatial partitioning
+ int* oct_depth; // depth in the octree (noct x 1)
+ int* oct_child; // children of octree node (noct x 8)
+ mjtNum* oct_aabb; // octree node bounding box (center, size) (noct x 6)
+ mjtNum* oct_coeff; // octree interpolation coefficients (noct x 8)
+
+ // joints
+ int* jnt_type; // type of joint (mjtJoint) (njnt x 1)
+ int* jnt_qposadr; // start addr in 'qpos' for joint's data (njnt x 1)
+ int* jnt_dofadr; // start addr in 'qvel' for joint's data (njnt x 1)
+ int* jnt_bodyid; // id of joint's body (njnt x 1)
+ int* jnt_group; // group for visibility (njnt x 1)
+ mjtByte* jnt_limited; // does joint have limits (njnt x 1)
+ mjtByte* jnt_actfrclimited; // does joint have actuator force limits (njnt x 1)
+ mjtByte* jnt_actgravcomp; // is gravcomp force applied via actuators (njnt x 1)
+ mjtNum* jnt_solref; // constraint solver reference: limit (njnt x mjNREF)
+ mjtNum* jnt_solimp; // constraint solver impedance: limit (njnt x mjNIMP)
+ mjtNum* jnt_pos; // local anchor position (njnt x 3)
+ mjtNum* jnt_axis; // local joint axis (njnt x 3)
+ mjtNum* jnt_stiffness; // stiffness coefficient (njnt x 1)
+ mjtNum* jnt_range; // joint limits (njnt x 2)
+ mjtNum* jnt_actfrcrange; // range of total actuator force (njnt x 2)
+ mjtNum* jnt_margin; // min distance for limit detection (njnt x 1)
+ mjtNum* jnt_user; // user data (njnt x nuser_jnt)
+
+ // dofs
+ int* dof_bodyid; // id of dof's body (nv x 1)
+ int* dof_jntid; // id of dof's joint (nv x 1)
+ int* dof_parentid; // id of dof's parent; -1: none (nv x 1)
+ int* dof_treeid; // id of dof's kinematic tree (nv x 1)
+ int* dof_Madr; // dof address in M-diagonal (nv x 1)
+ int* dof_simplenum; // number of consecutive simple dofs (nv x 1)
+ mjtNum* dof_solref; // constraint solver reference:frictionloss (nv x mjNREF)
+ mjtNum* dof_solimp; // constraint solver impedance:frictionloss (nv x mjNIMP)
+ mjtNum* dof_frictionloss; // dof friction loss (nv x 1)
+ mjtNum* dof_armature; // dof armature inertia/mass (nv x 1)
+ mjtNum* dof_damping; // damping coefficient (nv x 1)
+ mjtNum* dof_invweight0; // diag. inverse inertia in qpos0 (nv x 1)
+ mjtNum* dof_M0; // diag. inertia in qpos0 (nv x 1)
+
+ // geoms
+ int* geom_type; // geometric type (mjtGeom) (ngeom x 1)
+ int* geom_contype; // geom contact type (ngeom x 1)
+ int* geom_conaffinity; // geom contact affinity (ngeom x 1)
+ int* geom_condim; // contact dimensionality (1, 3, 4, 6) (ngeom x 1)
+ int* geom_bodyid; // id of geom's body (ngeom x 1)
+ int* geom_dataid; // id of geom's mesh/hfield; -1: none (ngeom x 1)
+ int* geom_matid; // material id for rendering; -1: none (ngeom x 1)
+ int* geom_group; // group for visibility (ngeom x 1)
+ int* geom_priority; // geom contact priority (ngeom x 1)
+ int* geom_plugin; // plugin instance id; -1: not in use (ngeom x 1)
+ mjtByte* geom_sameframe; // same frame as body (mjtSameframe) (ngeom x 1)
+ mjtNum* geom_solmix; // mixing coef for solref/imp in geom pair (ngeom x 1)
+ mjtNum* geom_solref; // constraint solver reference: contact (ngeom x mjNREF)
+ mjtNum* geom_solimp; // constraint solver impedance: contact (ngeom x mjNIMP)
+ mjtNum* geom_size; // geom-specific size parameters (ngeom x 3)
+ mjtNum* geom_aabb; // bounding box, (center, size) (ngeom x 6)
+ mjtNum* geom_rbound; // radius of bounding sphere (ngeom x 1)
+ mjtNum* geom_pos; // local position offset rel. to body (ngeom x 3)
+ mjtNum* geom_quat; // local orientation offset rel. to body (ngeom x 4)
+ mjtNum* geom_friction; // friction for (slide, spin, roll) (ngeom x 3)
+ mjtNum* geom_margin; // detect contact if dist
+#include
+#include
+#include
+
+
+//---------------------------------- Resource Provider ---------------------------------------------
+
+struct mjResource_ {
+ char* name; // name of resource (filename, etc)
+ void* data; // opaque data pointer
+ char timestamp[512]; // timestamp of the resource
+ const struct mjpResourceProvider* provider; // pointer to the provider
+};
+typedef struct mjResource_ mjResource;
+
+// callback for opening a resource, returns zero on failure
+typedef int (*mjfOpenResource)(mjResource* resource);
+
+// callback for reading a resource
+// return number of bytes stored in buffer, return -1 if error
+typedef int (*mjfReadResource)(mjResource* resource, const void** buffer);
+
+// callback for closing a resource (responsible for freeing any allocated memory)
+typedef void (*mjfCloseResource)(mjResource* resource);
+
+// callback for returning the directory of a resource
+// sets dir to directory string with ndir being size of directory string
+typedef void (*mjfGetResourceDir)(mjResource* resource, const char** dir, int* ndir);
+
+// callback for checking if the current resource was modified from the time
+// specified by the timestamp
+// returns 0 if the resource's timestamp matches the provided timestamp
+// returns > 0 if the resource is younger than the given timestamp
+// returns < 0 if the resource is older than the given timestamp
+typedef int (*mjfResourceModified)(const mjResource* resource, const char* timestamp);
+
+// struct describing a single resource provider
+struct mjpResourceProvider {
+ const char* prefix; // prefix for match against a resource name
+ mjfOpenResource open; // opening callback
+ mjfReadResource read; // reading callback
+ mjfCloseResource close; // closing callback
+ mjfGetResourceDir getdir; // get directory callback (optional)
+ mjfResourceModified modified; // resource modified callback (optional)
+ void* data; // opaque data pointer (resource invariant)
+};
+typedef struct mjpResourceProvider mjpResourceProvider;
+
+
+//---------------------------------- Plugins -------------------------------------------------------
+
+typedef enum mjtPluginCapabilityBit_ {
+ mjPLUGIN_ACTUATOR = 1<<0, // actuator forces
+ mjPLUGIN_SENSOR = 1<<1, // sensor measurements
+ mjPLUGIN_PASSIVE = 1<<2, // passive forces
+ mjPLUGIN_SDF = 1<<3, // signed distance fields
+} mjtPluginCapabilityBit;
+
+struct mjpPlugin_ {
+ const char* name; // globally unique name identifying the plugin
+
+ int nattribute; // number of configuration attributes
+ const char* const* attributes; // name of configuration attributes
+
+ int capabilityflags; // plugin capabilities: bitfield of mjtPluginCapabilityBit
+ int needstage; // sensor computation stage (mjtStage)
+
+ // number of mjtNums needed to store the state of a plugin instance (required)
+ int (*nstate)(const mjModel* m, int instance);
+
+ // dimension of the specified sensor's output (required only for sensor plugins)
+ int (*nsensordata)(const mjModel* m, int instance, int sensor_id);
+
+ // called when a new mjData is being created (required), returns 0 on success or -1 on failure
+ int (*init)(const mjModel* m, mjData* d, int instance);
+
+ // called when an mjData is being freed (optional)
+ void (*destroy)(mjData* d, int instance);
+
+ // called when an mjData is being copied (optional)
+ void (*copy)(mjData* dest, const mjModel* m, const mjData* src, int instance);
+
+ // called when an mjData is being reset (required)
+ void (*reset)(const mjModel* m, mjtNum* plugin_state, void* plugin_data, int instance);
+
+ // called when the plugin needs to update its outputs (required)
+ void (*compute)(const mjModel* m, mjData* d, int instance, int capability_bit);
+
+ // called when time integration occurs (optional)
+ void (*advance)(const mjModel* m, mjData* d, int instance);
+
+ // called by mjv_updateScene (optional)
+ void (*visualize)(const mjModel*m, mjData* d, const mjvOption* opt, mjvScene* scn, int instance);
+
+ // methods specific to actuators (optional)
+
+ // updates the actuator plugin's entries in act_dot
+ // called after native act_dot is computed and before the compute callback
+ void (*actuator_act_dot)(const mjModel* m, mjData* d, int instance);
+
+ // methods specific to signed distance fields (optional)
+
+ // signed distance from the surface
+ mjtNum (*sdf_distance)(const mjtNum point[3], const mjData* d, int instance);
+
+ // gradient of distance with respect to local coordinates
+ void (*sdf_gradient)(mjtNum gradient[3], const mjtNum point[3], const mjData* d, int instance);
+
+ // called during compilation for marching cubes
+ mjtNum (*sdf_staticdistance)(const mjtNum point[3], const mjtNum* attributes);
+
+ // convert attributes and provide defaults if not present
+ void (*sdf_attribute)(mjtNum attribute[], const char* name[], const char* value[]);
+
+ // bounding box of implicit surface
+ void (*sdf_aabb)(mjtNum aabb[6], const mjtNum* attributes);
+};
+typedef struct mjpPlugin_ mjpPlugin;
+
+struct mjSDF_ {
+ const mjpPlugin** plugin;
+ int* id;
+ mjtSDFType type;
+ mjtNum* relpos;
+ mjtNum* relmat;
+ mjtGeom* geomtype;
+};
+typedef struct mjSDF_ mjSDF;
+
+#if defined(__has_attribute)
+
+ #if __has_attribute(constructor)
+ #define mjPLUGIN_LIB_INIT __attribute__((constructor)) static void _mjplugin_init(void)
+ #endif // __has_attribute(constructor)
+
+#elif defined(_MSC_VER)
+
+ #ifndef mjDLLMAIN
+ #define mjDLLMAIN DllMain
+ #endif
+
+ #if !defined(mjEXTERNC)
+ #if defined(__cplusplus)
+ #define mjEXTERNC extern "C"
+ #else
+ #define mjEXTERNC
+ #endif // defined(__cplusplus)
+ #endif // !defined(mjEXTERNC)
+
+ // NOLINTBEGIN(runtime/int)
+ #define mjPLUGIN_LIB_INIT \
+ static void _mjplugin_dllmain(void); \
+ mjEXTERNC int __stdcall mjDLLMAIN(void* hinst, unsigned long reason, void* reserved) { \
+ if (reason == 1) { \
+ _mjplugin_dllmain(); \
+ } \
+ return 1; \
+ } \
+ static void _mjplugin_dllmain(void)
+ // NOLINTEND(runtime/int)
+
+#endif // defined(_MSC_VER)
+
+// function pointer type for mj_loadAllPluginLibraries callback
+typedef void (*mjfPluginLibraryLoadCallback)(const char* filename, int first, int count);
+
+#endif // MUJOCO_INCLUDE_MJPLUGIN_H_
diff --git a/third_party/mujoco/3.3.7/include/mujoco/mjrender.h b/third_party/mujoco/3.3.7/include/mujoco/mjrender.h
new file mode 100644
index 00000000..9a8ed1b7
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/mjrender.h
@@ -0,0 +1,177 @@
+// Copyright 2021 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MUJOCO_MJRENDER_H_
+#define MUJOCO_MJRENDER_H_
+
+#include
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#define mjNAUX 10 // number of auxiliary buffers
+#define mjMAXTEXTURE 1000 // maximum number of textures
+#define mjMAXMATERIAL 1000 // maximum number of materials with textures
+
+//---------------------------------- primitive types (mjt) -----------------------------------------
+
+typedef enum mjtGridPos_ { // grid position for overlay
+ mjGRID_TOPLEFT = 0, // top left
+ mjGRID_TOPRIGHT, // top right
+ mjGRID_BOTTOMLEFT, // bottom left
+ mjGRID_BOTTOMRIGHT, // bottom right
+ mjGRID_TOP, // top center
+ mjGRID_BOTTOM, // bottom center
+ mjGRID_LEFT, // left center
+ mjGRID_RIGHT // right center
+} mjtGridPos;
+
+
+typedef enum mjtFramebuffer_ { // OpenGL framebuffer option
+ mjFB_WINDOW = 0, // default/window buffer
+ mjFB_OFFSCREEN // offscreen buffer
+} mjtFramebuffer;
+
+typedef enum mjtDepthMap_ { // depth mapping for `mjr_readPixels`
+ mjDEPTH_ZERONEAR = 0, // standard depth map; 0: znear, 1: zfar
+ mjDEPTH_ZEROFAR = 1 // reversed depth map; 1: znear, 0: zfar
+} mjtDepthMap;
+
+typedef enum mjtFontScale_ { // font scale, used at context creation
+ mjFONTSCALE_50 = 50, // 50% scale, suitable for low-res rendering
+ mjFONTSCALE_100 = 100, // normal scale, suitable in the absence of DPI scaling
+ mjFONTSCALE_150 = 150, // 150% scale
+ mjFONTSCALE_200 = 200, // 200% scale
+ mjFONTSCALE_250 = 250, // 250% scale
+ mjFONTSCALE_300 = 300 // 300% scale
+} mjtFontScale;
+
+
+typedef enum mjtFont_ { // font type, used at each text operation
+ mjFONT_NORMAL = 0, // normal font
+ mjFONT_SHADOW, // normal font with shadow (for higher contrast)
+ mjFONT_BIG // big font (for user alerts)
+} mjtFont;
+
+
+struct mjrRect_ { // OpenGL rectangle
+ int left; // left (usually 0)
+ int bottom; // bottom (usually 0)
+ int width; // width (usually buffer width)
+ int height; // height (usually buffer height)
+};
+typedef struct mjrRect_ mjrRect;
+
+
+//---------------------------------- mjrContext ----------------------------------------------------
+
+struct mjrContext_ { // custom OpenGL context
+ // parameters copied from mjVisual
+ float lineWidth; // line width for wireframe rendering
+ float shadowClip; // clipping radius for directional lights
+ float shadowScale; // fraction of light cutoff for spot lights
+ float fogStart; // fog start = stat.extent * vis.map.fogstart
+ float fogEnd; // fog end = stat.extent * vis.map.fogend
+ float fogRGBA[4]; // fog rgba
+ int shadowSize; // size of shadow map texture
+ int offWidth; // width of offscreen buffer
+ int offHeight; // height of offscreen buffer
+ int offSamples; // number of offscreen buffer multisamples
+
+ // parameters specified at creation
+ int fontScale; // font scale
+ int auxWidth[mjNAUX]; // auxiliary buffer width
+ int auxHeight[mjNAUX]; // auxiliary buffer height
+ int auxSamples[mjNAUX]; // auxiliary buffer multisamples
+
+ // offscreen rendering objects
+ unsigned int offFBO; // offscreen framebuffer object
+ unsigned int offFBO_r; // offscreen framebuffer for resolving multisamples
+ unsigned int offColor; // offscreen color buffer
+ unsigned int offColor_r; // offscreen color buffer for resolving multisamples
+ unsigned int offDepthStencil; // offscreen depth and stencil buffer
+ unsigned int offDepthStencil_r; // offscreen depth and stencil buffer for multisamples
+
+ // shadow rendering objects
+ unsigned int shadowFBO; // shadow map framebuffer object
+ unsigned int shadowTex; // shadow map texture
+
+ // auxiliary buffers
+ unsigned int auxFBO[mjNAUX]; // auxiliary framebuffer object
+ unsigned int auxFBO_r[mjNAUX]; // auxiliary framebuffer object for resolving
+ unsigned int auxColor[mjNAUX]; // auxiliary color buffer
+ unsigned int auxColor_r[mjNAUX]; // auxiliary color buffer for resolving
+
+ // materials with textures
+ int mat_texid[mjMAXMATERIAL*mjNTEXROLE]; // material texture ids (-1: no texture)
+ int mat_texuniform[mjMAXMATERIAL]; // uniform cube mapping
+ float mat_texrepeat[mjMAXMATERIAL*2]; // texture repetition for 2d mapping
+
+ // texture objects and info
+ int ntexture; // number of allocated textures
+ int textureType[mjMAXTEXTURE]; // type of texture (mjtTexture) (ntexture)
+ unsigned int texture[mjMAXTEXTURE]; // texture names
+
+ // displaylist starting positions
+ unsigned int basePlane; // all planes from model
+ unsigned int baseMesh; // all meshes from model
+ unsigned int baseHField; // all height fields from model
+ unsigned int baseBuiltin; // all builtin geoms, with quality from model
+ unsigned int baseFontNormal; // normal font
+ unsigned int baseFontShadow; // shadow font
+ unsigned int baseFontBig; // big font
+
+ // displaylist ranges
+ int rangePlane; // all planes from model
+ int rangeMesh; // all meshes from model
+ int rangeHField; // all hfields from model
+ int rangeBuiltin; // all builtin geoms, with quality from model
+ int rangeFont; // all characters in font
+
+ // skin VBOs
+ int nskin; // number of skins
+ unsigned int* skinvertVBO; // skin vertex position VBOs (nskin)
+ unsigned int* skinnormalVBO; // skin vertex normal VBOs (nskin)
+ unsigned int* skintexcoordVBO; // skin vertex texture coordinate VBOs (nskin)
+ unsigned int* skinfaceVBO; // skin face index VBOs (nskin)
+
+ // character info
+ int charWidth[127]; // character widths: normal and shadow
+ int charWidthBig[127]; // chacarter widths: big
+ int charHeight; // character heights: normal and shadow
+ int charHeightBig; // character heights: big
+
+ // capabilities
+ int glInitialized; // is OpenGL initialized
+ int windowAvailable; // is default/window framebuffer available
+ int windowSamples; // number of samples for default/window framebuffer
+ int windowStereo; // is stereo available for default/window framebuffer
+ int windowDoublebuffer; // is default/window framebuffer double buffered
+
+ // framebuffer
+ int currentBuffer; // currently active framebuffer: mjFB_WINDOW or mjFB_OFFSCREEN
+
+ // pixel output format
+ int readPixelFormat; // default color pixel format for mjr_readPixels
+
+ // depth output format
+ int readDepthMap; // depth mapping: mjDEPTH_ZERONEAR or mjDEPTH_ZEROFAR
+};
+typedef struct mjrContext_ mjrContext;
+
+#if defined(__cplusplus)
+}
+#endif
+#endif // MUJOCO_MJRENDER_H_
diff --git a/third_party/mujoco/3.3.7/include/mujoco/mjsan.h b/third_party/mujoco/3.3.7/include/mujoco/mjsan.h
new file mode 100644
index 00000000..4d45997b
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/mjsan.h
@@ -0,0 +1,58 @@
+// Copyright 2024 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MUJOCO_INCLUDE_MJSAN_H_
+#define MUJOCO_INCLUDE_MJSAN_H_
+
+// Include asan interface header, or provide stubs for poison/unpoison macros when not using asan.
+#ifdef ADDRESS_SANITIZER
+ #include
+#elif defined(_MSC_VER)
+ #define ASAN_POISON_MEMORY_REGION(addr, size)
+ #define ASAN_UNPOISON_MEMORY_REGION(addr, size)
+#else
+ #define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
+ #define ASAN_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
+#endif
+
+// When built and run under address sanitizer (asan), mj_markStack and mj_freeStack are instrumented
+// to detect leakage of mjData stack frames. When the compiler inlines several callees that call
+// into mark/free into the same function, this instrumentation requires that the compiler retains
+// separate mark/free calls for each original callee. The memory-clobbered asm blocks act as a
+// barrier to prevent mark/free calls from being combined under optimization.
+#ifdef ADDRESS_SANITIZER
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void mj__markStack(mjData*) __attribute__((noinline));
+static inline void mj_markStack(mjData* d) __attribute__((always_inline)) {
+ asm volatile("" ::: "memory");
+ mj__markStack(d);
+ asm volatile("" ::: "memory");
+}
+
+void mj__freeStack(mjData*) __attribute__((noinline));
+static inline void mj_freeStack(mjData* d) __attribute__((always_inline)) {
+ asm volatile("" ::: "memory");
+ mj__freeStack(d);
+ asm volatile("" ::: "memory");
+}
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+#endif // ADDRESS_SANITIZER
+
+#endif // MUJOCO_INCLUDE_MJSAN_H_
diff --git a/third_party/mujoco/3.3.7/include/mujoco/mjspec.h b/third_party/mujoco/3.3.7/include/mujoco/mjspec.h
new file mode 100644
index 00000000..e84f5f33
--- /dev/null
+++ b/third_party/mujoco/3.3.7/include/mujoco/mjspec.h
@@ -0,0 +1,784 @@
+// Copyright 2024 DeepMind Technologies Limited
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MUJOCO_INCLUDE_MJSPEC_H_
+#define MUJOCO_INCLUDE_MJSPEC_H_
+
+#include
+#include
+#include
+
+
+// this is a C-API
+#ifdef __cplusplus
+#include
+#include
+#include
+#include
+
+extern "C" {
+#endif
+
+//-------------------------------- handles to strings and arrays -----------------------------------
+
+#ifdef __cplusplus
+ // C++: defined to be compatible with corresponding std types
+ using mjString = std::string;
+ using mjStringVec = std::vector;
+ using mjIntVec = std::vector;
+ using mjIntVecVec = std::vector>;
+ using mjFloatVec = std::vector;
+ using mjFloatVecVec = std::vector>;
+ using mjDoubleVec = std::vector