-
Notifications
You must be signed in to change notification settings - Fork 3
/
cassiemujoco_ctypes.py
1241 lines (1045 loc) · 59.2 KB
/
cassiemujoco_ctypes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- coding: utf-8 -*-
#
# TARGET arch is: ['-I/usr/include/clang/6.0/include', '-Iinclude']
# WORD_SIZE is: 8
# POINTER_SIZE is: 8
# LONGDOUBLE_SIZE is: 16
#
import ctypes
import os
_dir_path = os.path.dirname(os.path.realpath(__file__))
_libraries = {}
_libraries['./libcassiemujoco.so'] = ctypes.CDLL(_dir_path + '/libcassiemujoco.so')
# if local wordsize is same as target, keep ctypes pointer function.
if ctypes.sizeof(ctypes.c_void_p) == 8:
POINTER_T = ctypes.POINTER
else:
# required to access _ctypes
import _ctypes
# Emulate a pointer class using the approriate c_int32/c_int64 type
# The new class should have :
# ['__module__', 'from_param', '_type_', '__dict__', '__weakref__', '__doc__']
# but the class should be submitted to a unique instance for each base type
# to that if A == B, POINTER_T(A) == POINTER_T(B)
ctypes._pointer_t_type_cache = {}
def POINTER_T(pointee):
# a pointer should have the same length as LONG
fake_ptr_base_type = ctypes.c_uint64
# specific case for c_void_p
if pointee is None: # VOID pointer type. c_void_p.
pointee = type(None) # ctypes.c_void_p # ctypes.c_ulong
clsname = 'c_void'
else:
clsname = pointee.__name__
if clsname in ctypes._pointer_t_type_cache:
return ctypes._pointer_t_type_cache[clsname]
# make template
class _T(_ctypes._SimpleCData,):
_type_ = 'L'
_subtype_ = pointee
def _sub_addr_(self):
return self.value
def __repr__(self):
return '%s(%d)'%(clsname, self.value)
def contents(self):
raise TypeError('This is not a ctypes pointer.')
def __init__(self, **args):
raise TypeError('This is not a ctypes pointer. It is not instanciable.')
_class = type('LP_%d_%s'%(8, clsname), (_T,),{})
ctypes._pointer_t_type_cache[clsname] = _class
return _class
c_int128 = ctypes.c_ubyte*16
c_uint128 = c_int128
void = None
if ctypes.sizeof(ctypes.c_longdouble) == 16:
c_long_double_t = ctypes.c_longdouble
else:
c_long_double_t = ctypes.c_ubyte*16
size_t = ctypes.c_uint64
socklen_t = ctypes.c_uint32
class struct_sockaddr(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('sa_family', ctypes.c_uint16),
('sa_data', ctypes.c_char * 14),
]
ssize_t = ctypes.c_int64
class struct_CassieCoreSim(ctypes.Structure):
pass
cassie_core_sim_t = struct_CassieCoreSim
cassie_core_sim_alloc = _libraries['./libcassiemujoco.so'].cassie_core_sim_alloc
cassie_core_sim_alloc.restype = POINTER_T(struct_CassieCoreSim)
cassie_core_sim_alloc.argtypes = []
cassie_core_sim_copy = _libraries['./libcassiemujoco.so'].cassie_core_sim_copy
cassie_core_sim_copy.restype = None
cassie_core_sim_copy.argtypes = [POINTER_T(struct_CassieCoreSim), POINTER_T(struct_CassieCoreSim)]
cassie_core_sim_free = _libraries['./libcassiemujoco.so'].cassie_core_sim_free
cassie_core_sim_free.restype = None
cassie_core_sim_free.argtypes = [POINTER_T(struct_CassieCoreSim)]
cassie_core_sim_setup = _libraries['./libcassiemujoco.so'].cassie_core_sim_setup
cassie_core_sim_setup.restype = None
cassie_core_sim_setup.argtypes = [POINTER_T(struct_CassieCoreSim)]
class struct_c__SA_cassie_user_in_t(ctypes.Structure):
pass
class struct_c__SA_cassie_out_t(ctypes.Structure):
pass
class struct_c__SA_cassie_in_t(ctypes.Structure):
pass
cassie_core_sim_step = _libraries['./libcassiemujoco.so'].cassie_core_sim_step
cassie_core_sim_step.restype = None
cassie_core_sim_step.argtypes = [POINTER_T(struct_CassieCoreSim), POINTER_T(struct_c__SA_cassie_user_in_t), POINTER_T(struct_c__SA_cassie_out_t), POINTER_T(struct_c__SA_cassie_in_t)]
class struct_c__SA_elmo_in_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('controlWord', ctypes.c_uint16),
('PADDING_0', ctypes.c_ubyte * 6),
('torque', ctypes.c_double),
]
elmo_in_t = struct_c__SA_elmo_in_t
class struct_c__SA_cassie_leg_in_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('hipRollDrive', elmo_in_t),
('hipYawDrive', elmo_in_t),
('hipPitchDrive', elmo_in_t),
('kneeDrive', elmo_in_t),
('footDrive', elmo_in_t),
]
cassie_leg_in_t = struct_c__SA_cassie_leg_in_t
class struct_c__SA_radio_in_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('channel', ctypes.c_int16 * 14),
]
radio_in_t = struct_c__SA_radio_in_t
class struct_c__SA_cassie_pelvis_in_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('radio', radio_in_t),
('sto', ctypes.c_bool),
('piezoState', ctypes.c_bool),
('piezoTone', ctypes.c_ubyte),
('PADDING_0', ctypes.c_ubyte),
]
cassie_pelvis_in_t = struct_c__SA_cassie_pelvis_in_t
struct_c__SA_cassie_in_t._pack_ = True # source:False
struct_c__SA_cassie_in_t._fields_ = [
('pelvis', cassie_pelvis_in_t),
('leftLeg', cassie_leg_in_t),
('rightLeg', cassie_leg_in_t),
]
cassie_in_t = struct_c__SA_cassie_in_t
pack_cassie_in_t = _libraries['./libcassiemujoco.so'].pack_cassie_in_t
pack_cassie_in_t.restype = None
pack_cassie_in_t.argtypes = [POINTER_T(struct_c__SA_cassie_in_t), POINTER_T(ctypes.c_ubyte)]
unpack_cassie_in_t = _libraries['./libcassiemujoco.so'].unpack_cassie_in_t
unpack_cassie_in_t.restype = None
unpack_cassie_in_t.argtypes = [POINTER_T(ctypes.c_ubyte), POINTER_T(struct_c__SA_cassie_in_t)]
DiagnosticCodes = ctypes.c_int16
class struct_c__SA_battery_out_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('dataGood', ctypes.c_bool),
('PADDING_0', ctypes.c_ubyte * 7),
('stateOfCharge', ctypes.c_double),
('voltage', ctypes.c_double * 12),
('current', ctypes.c_double),
('temperature', ctypes.c_double * 4),
]
battery_out_t = struct_c__SA_battery_out_t
class struct_c__SA_cassie_joint_out_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('position', ctypes.c_double),
('velocity', ctypes.c_double),
]
cassie_joint_out_t = struct_c__SA_cassie_joint_out_t
class struct_c__SA_elmo_out_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('statusWord', ctypes.c_uint16),
('PADDING_0', ctypes.c_ubyte * 6),
('position', ctypes.c_double),
('velocity', ctypes.c_double),
('torque', ctypes.c_double),
('driveTemperature', ctypes.c_double),
('dcLinkVoltage', ctypes.c_double),
('torqueLimit', ctypes.c_double),
('gearRatio', ctypes.c_double),
]
elmo_out_t = struct_c__SA_elmo_out_t
class struct_c__SA_cassie_leg_out_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('hipRollDrive', elmo_out_t),
('hipYawDrive', elmo_out_t),
('hipPitchDrive', elmo_out_t),
('kneeDrive', elmo_out_t),
('footDrive', elmo_out_t),
('shinJoint', cassie_joint_out_t),
('tarsusJoint', cassie_joint_out_t),
('footJoint', cassie_joint_out_t),
('medullaCounter', ctypes.c_ubyte),
('PADDING_0', ctypes.c_ubyte),
('medullaCpuLoad', ctypes.c_uint16),
('reedSwitchState', ctypes.c_bool),
('PADDING_1', ctypes.c_ubyte * 3),
]
cassie_leg_out_t = struct_c__SA_cassie_leg_out_t
class struct_c__SA_radio_out_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('radioReceiverSignalGood', ctypes.c_bool),
('receiverMedullaSignalGood', ctypes.c_bool),
('PADDING_0', ctypes.c_ubyte * 6),
('channel', ctypes.c_double * 16),
]
radio_out_t = struct_c__SA_radio_out_t
class struct_c__SA_target_pc_out_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('etherCatStatus', ctypes.c_int32 * 6),
('etherCatNotifications', ctypes.c_int32 * 21),
('PADDING_0', ctypes.c_ubyte * 4),
('taskExecutionTime', ctypes.c_double),
('overloadCounter', ctypes.c_uint32),
('PADDING_1', ctypes.c_ubyte * 4),
('cpuTemperature', ctypes.c_double),
]
target_pc_out_t = struct_c__SA_target_pc_out_t
class struct_c__SA_vectornav_out_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('dataGood', ctypes.c_bool),
('PADDING_0', ctypes.c_ubyte),
('vpeStatus', ctypes.c_uint16),
('PADDING_1', ctypes.c_ubyte * 4),
('pressure', ctypes.c_double),
('temperature', ctypes.c_double),
('magneticField', ctypes.c_double * 3),
('angularVelocity', ctypes.c_double * 3),
('linearAcceleration', ctypes.c_double * 3),
('orientation', ctypes.c_double * 4),
]
vectornav_out_t = struct_c__SA_vectornav_out_t
class struct_c__SA_cassie_pelvis_out_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('targetPc', target_pc_out_t),
('battery', battery_out_t),
('radio', radio_out_t),
('vectorNav', vectornav_out_t),
('medullaCounter', ctypes.c_ubyte),
('PADDING_0', ctypes.c_ubyte),
('medullaCpuLoad', ctypes.c_uint16),
('bleederState', ctypes.c_bool),
('leftReedSwitchState', ctypes.c_bool),
('rightReedSwitchState', ctypes.c_bool),
('PADDING_1', ctypes.c_ubyte),
('vtmTemperature', ctypes.c_double),
]
cassie_pelvis_out_t = struct_c__SA_cassie_pelvis_out_t
struct_c__SA_cassie_out_t._pack_ = True # source:False
struct_c__SA_cassie_out_t._fields_ = [
('pelvis', cassie_pelvis_out_t),
('leftLeg', cassie_leg_out_t),
('rightLeg', cassie_leg_out_t),
('isCalibrated', ctypes.c_bool),
('PADDING_0', ctypes.c_ubyte),
('messages', ctypes.c_int16 * 4),
('PADDING_1', ctypes.c_ubyte * 6),
]
cassie_out_t = struct_c__SA_cassie_out_t
pack_cassie_out_t = _libraries['./libcassiemujoco.so'].pack_cassie_out_t
pack_cassie_out_t.restype = None
pack_cassie_out_t.argtypes = [POINTER_T(struct_c__SA_cassie_out_t), POINTER_T(ctypes.c_ubyte)]
unpack_cassie_out_t = _libraries['./libcassiemujoco.so'].unpack_cassie_out_t
unpack_cassie_out_t.restype = None
unpack_cassie_out_t.argtypes = [POINTER_T(ctypes.c_ubyte), POINTER_T(struct_c__SA_cassie_out_t)]
struct_c__SA_cassie_user_in_t._pack_ = True # source:False
struct_c__SA_cassie_user_in_t._fields_ = [
('torque', ctypes.c_double * 10),
('telemetry', ctypes.c_int16 * 9),
('PADDING_0', ctypes.c_ubyte * 6),
]
cassie_user_in_t = struct_c__SA_cassie_user_in_t
pack_cassie_user_in_t = _libraries['./libcassiemujoco.so'].pack_cassie_user_in_t
pack_cassie_user_in_t.restype = None
pack_cassie_user_in_t.argtypes = [POINTER_T(struct_c__SA_cassie_user_in_t), POINTER_T(ctypes.c_ubyte)]
unpack_cassie_user_in_t = _libraries['./libcassiemujoco.so'].unpack_cassie_user_in_t
unpack_cassie_user_in_t.restype = None
unpack_cassie_user_in_t.argtypes = [POINTER_T(ctypes.c_ubyte), POINTER_T(struct_c__SA_cassie_user_in_t)]
class struct_cassie_sim(ctypes.Structure):
pass
cassie_sim_t = struct_cassie_sim
class struct_cassie_vis(ctypes.Structure):
pass
cassie_vis_t = struct_cassie_vis
class struct_cassie_state(ctypes.Structure):
pass
cassie_state_t = struct_cassie_state
cassie_mujoco_init = _libraries['./libcassiemujoco.so'].cassie_mujoco_init
cassie_mujoco_init.restype = ctypes.c_bool
cassie_mujoco_init.argtypes = [POINTER_T(ctypes.c_char)]
cassie_cleanup = _libraries['./libcassiemujoco.so'].cassie_cleanup
cassie_cleanup.restype = None
cassie_cleanup.argtypes = []
cassie_reload_xml = _libraries['./libcassiemujoco.so'].cassie_reload_xml
cassie_reload_xml.restype = ctypes.c_bool
cassie_reload_xml.argtypes = [ctypes.c_char_p]
cassie_sim_init = _libraries['./libcassiemujoco.so'].cassie_sim_init
cassie_sim_init.restype = POINTER_T(struct_cassie_sim)
cassie_sim_init.argtypes = [ctypes.c_char_p, ctypes.c_bool]
cassie_sim_duplicate = _libraries['./libcassiemujoco.so'].cassie_sim_duplicate
cassie_sim_duplicate.restype = POINTER_T(struct_cassie_sim)
cassie_sim_duplicate.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_copy = _libraries['./libcassiemujoco.so'].cassie_sim_copy
cassie_sim_copy.restype = None
cassie_sim_copy.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(struct_cassie_sim)]
cassie_sim_free = _libraries['./libcassiemujoco.so'].cassie_sim_free
cassie_sim_free.restype = None
cassie_sim_free.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_step_ethercat = _libraries['./libcassiemujoco.so'].cassie_sim_step_ethercat
cassie_sim_step_ethercat.restype = None
cassie_sim_step_ethercat.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(struct_c__SA_cassie_out_t), POINTER_T(struct_c__SA_cassie_in_t)]
cassie_sim_step = _libraries['./libcassiemujoco.so'].cassie_sim_step
cassie_sim_step.restype = None
cassie_sim_step.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(struct_c__SA_cassie_out_t), POINTER_T(struct_c__SA_cassie_user_in_t)]
class struct_c__SA_state_out_t(ctypes.Structure):
pass
class struct_c__SA_pd_in_t(ctypes.Structure):
pass
class struct_c__SA_joint_filter_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('x', ctypes.c_double * 4),
('y', ctypes.c_double * 3),
]
joint_filter_t = struct_c__SA_joint_filter_t
class struct_c__SA_drive_filter_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('x', ctypes.c_double * 9),
]
drive_filter_t = struct_c__SA_drive_filter_t
cassie_sim_step_pd = _libraries['./libcassiemujoco.so'].cassie_sim_step_pd
cassie_sim_step_pd.restype = None
cassie_sim_step_pd.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(struct_c__SA_state_out_t), POINTER_T(struct_c__SA_pd_in_t)]
cassie_sim_step_pd_no2khz = _libraries['./libcassiemujoco.so'].cassie_sim_step_pd_no2khz
cassie_sim_step_pd_no2khz.restype = None
cassie_sim_step_pd_no2khz.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(struct_c__SA_state_out_t), POINTER_T(struct_c__SA_pd_in_t)]
cassie_integrate_pos = _libraries['./libcassiemujoco.so'].cassie_integrate_pos
cassie_integrate_pos.restype = None
cassie_integrate_pos.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(struct_c__SA_state_out_t)]
cassie_sim_time = _libraries['./libcassiemujoco.so'].cassie_sim_time
cassie_sim_time.restype = POINTER_T(ctypes.c_double)
cassie_sim_time.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_timestep = _libraries['./libcassiemujoco.so'].cassie_sim_timestep
cassie_sim_timestep.restype = POINTER_T(ctypes.c_double)
cassie_sim_timestep.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_set_timestep = _libraries['./libcassiemujoco.so'].cassie_sim_set_timestep
cassie_sim_set_timestep.restype = None
cassie_sim_set_timestep.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double]
cassie_sim_qpos = _libraries['./libcassiemujoco.so'].cassie_sim_qpos
cassie_sim_qpos.restype = POINTER_T(ctypes.c_double)
cassie_sim_qpos.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_qvel = _libraries['./libcassiemujoco.so'].cassie_sim_qvel
cassie_sim_qvel.restype = POINTER_T(ctypes.c_double)
cassie_sim_qvel.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_qacc = _libraries['./libcassiemujoco.so'].cassie_sim_qacc
cassie_sim_qacc.restype = POINTER_T(ctypes.c_double)
cassie_sim_qacc.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_ctrl = _libraries['./libcassiemujoco.so'].cassie_sim_ctrl
cassie_sim_ctrl.restype = POINTER_T(ctypes.c_double)
cassie_sim_ctrl.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_jnt_qposadr = _libraries['./libcassiemujoco.so'].cassie_sim_jnt_qposadr
cassie_sim_jnt_qposadr.restype = POINTER_T(ctypes.c_int32)
cassie_sim_jnt_qposadr.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_jnt_dofadr = _libraries['./libcassiemujoco.so'].cassie_sim_jnt_dofadr
cassie_sim_jnt_dofadr.restype = POINTER_T(ctypes.c_int32)
cassie_sim_jnt_dofadr.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_mjmodel = _libraries['./libcassiemujoco.so'].cassie_sim_mjmodel
cassie_sim_mjmodel.restype = POINTER_T(None)
cassie_sim_mjmodel.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_mjdata = _libraries['./libcassiemujoco.so'].cassie_sim_mjdata
cassie_sim_mjdata.restype = POINTER_T(None)
cassie_sim_mjdata.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_check_obstacle_collision = _libraries['./libcassiemujoco.so'].cassie_sim_check_obstacle_collision
cassie_sim_check_obstacle_collision.restype = ctypes.c_bool
cassie_sim_check_obstacle_collision.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_check_self_collision = _libraries['./libcassiemujoco.so'].cassie_sim_check_self_collision
cassie_sim_check_self_collision.restype = ctypes.c_bool
cassie_sim_check_self_collision.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_foot_forces = _libraries['./libcassiemujoco.so'].cassie_sim_foot_forces
cassie_sim_foot_forces.restype = None
cassie_sim_foot_forces.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 12]
cassie_sim_heeltoe_forces = _libraries['./libcassiemujoco.so'].cassie_sim_heeltoe_forces
cassie_sim_heeltoe_forces.restype = None
cassie_sim_heeltoe_forces.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 6, ctypes.c_double * 6]
cassie_sim_geom_collision = _libraries['./libcassiemujoco.so'].cassie_sim_geom_collision
cassie_sim_geom_collision.restype = ctypes.c_bool
cassie_sim_geom_collision.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_int32]
cassie_sim_foot_positions = _libraries['./libcassiemujoco.so'].cassie_sim_foot_positions
cassie_sim_foot_positions.restype = None
cassie_sim_foot_positions.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 6]
cassie_sim_foot_velocities = _libraries['./libcassiemujoco.so'].cassie_sim_foot_velocities
cassie_sim_foot_velocities.restype = None
cassie_sim_foot_velocities.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 12]
cassie_sim_cm_position = _libraries['./libcassiemujoco.so'].cassie_sim_cm_position
cassie_sim_cm_position.restype = None
cassie_sim_cm_position.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 3]
cassie_sim_cm_velocity = _libraries['./libcassiemujoco.so'].cassie_sim_cm_velocity
cassie_sim_cm_velocity.restype = None
cassie_sim_cm_velocity.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 3]
cassie_sim_centroid_inertia = _libraries['./libcassiemujoco.so'].cassie_sim_centroid_inertia
cassie_sim_centroid_inertia.restype = None
cassie_sim_centroid_inertia.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 9]
cassie_sim_angular_momentum = _libraries['./libcassiemujoco.so'].cassie_sim_angular_momentum
cassie_sim_angular_momentum.restype = None
cassie_sim_angular_momentum.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 3]
cassie_sim_full_mass_matrix = _libraries['./libcassiemujoco.so'].cassie_sim_full_mass_matrix
cassie_sim_full_mass_matrix.restype = None
cassie_sim_full_mass_matrix.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * (32*32)]
cassie_sim_minimal_mass_matrix = _libraries['./libcassiemujoco.so'].cassie_sim_minimal_mass_matrix
cassie_sim_minimal_mass_matrix.restype = None
cassie_sim_minimal_mass_matrix.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * (16*16)]
cassie_sim_loop_constraint_info = _libraries['./libcassiemujoco.so'].cassie_sim_loop_constraint_info
cassie_sim_loop_constraint_info.restype = None
cassie_sim_loop_constraint_info.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * (6*32), ctypes.c_double * (6)]
cassie_sim_foot_quat = _libraries['./libcassiemujoco.so'].cassie_sim_foot_orient
cassie_sim_foot_quat.restype = None
cassie_sim_foot_quat.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 4]
cassie_sim_body_vel = _libraries['./libcassiemujoco.so'].cassie_sim_body_velocities
cassie_sim_body_vel.restype = None
cassie_sim_body_vel.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 6, ctypes.c_char_p]
cassie_sim_apply_force = _libraries['./libcassiemujoco.so'].cassie_sim_apply_force
cassie_sim_apply_force.restype = None
cassie_sim_apply_force.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 6, ctypes.c_char_p]
cassie_sim_xpos = _libraries['./libcassiemujoco.so'].cassie_sim_xpos
cassie_sim_xpos.restype = POINTER_T(ctypes.c_double)
cassie_sim_xpos.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p]
cassie_sim_xquat = _libraries['./libcassiemujoco.so'].cassie_sim_xquat
cassie_sim_xquat.restype = POINTER_T(ctypes.c_double)
cassie_sim_xquat.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p]
cassie_sim_clear_forces = _libraries['./libcassiemujoco.so'].cassie_sim_clear_forces
cassie_sim_clear_forces.restype = None
cassie_sim_clear_forces.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_hold = _libraries['./libcassiemujoco.so'].cassie_sim_hold
cassie_sim_hold.restype = None
cassie_sim_hold.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_release = _libraries['./libcassiemujoco.so'].cassie_sim_release
cassie_sim_release.restype = None
cassie_sim_release.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_radio = _libraries['./libcassiemujoco.so'].cassie_sim_radio
cassie_sim_radio.restype = None
cassie_sim_radio.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 16]
cassie_sim_full_reset = _libraries['./libcassiemujoco.so'].cassie_sim_full_reset
cassie_sim_full_reset.restype = None
cassie_sim_full_reset.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_get_hfield_nrow = _libraries['./libcassiemujoco.so'].cassie_sim_get_hfield_nrow
cassie_sim_get_hfield_nrow.restype = ctypes.c_int32
cassie_sim_get_hfield_nrow.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_get_hfield_ncol = _libraries['./libcassiemujoco.so'].cassie_sim_get_hfield_ncol
cassie_sim_get_hfield_ncol.restype = ctypes.c_int32
cassie_sim_get_hfield_ncol.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_get_nhfielddata = _libraries['./libcassiemujoco.so'].cassie_sim_get_nhfielddata
cassie_sim_get_nhfielddata.restype = ctypes.c_int32
cassie_sim_get_nhfielddata.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_get_hfield_size = _libraries['./libcassiemujoco.so'].cassie_sim_get_hfield_size
cassie_sim_get_hfield_size.restype = POINTER_T(ctypes.c_double)
cassie_sim_get_hfield_size.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_set_hfield_size = _libraries['./libcassiemujoco.so'].cassie_sim_set_hfield_size
cassie_sim_set_hfield_size.restype = None
cassie_sim_set_hfield_size.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 4]
cassie_sim_hfielddata = _libraries['./libcassiemujoco.so'].cassie_sim_hfielddata
cassie_sim_hfielddata.restype = POINTER_T(ctypes.c_float)
cassie_sim_hfielddata.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_set_hfielddata = _libraries['./libcassiemujoco.so'].cassie_sim_set_hfielddata
cassie_sim_set_hfielddata.restype = None
cassie_sim_set_hfielddata.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_float)]
cassie_vis_init = _libraries['./libcassiemujoco.so'].cassie_vis_init
cassie_vis_init.restype = POINTER_T(struct_cassie_vis)
cassie_vis_init.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p,ctypes.c_bool]
cassie_vis_extent = _libraries['./libcassiemujoco.so'].cassie_vis_extent
cassie_vis_extent.restype = ctypes.c_float
cassie_vis_extent.argtypes = [POINTER_T(struct_cassie_vis)]
cassie_vis_znear = _libraries['./libcassiemujoco.so'].cassie_vis_znear
cassie_vis_znear.restype = ctypes.c_float
cassie_vis_znear.argtypes = [POINTER_T(struct_cassie_vis)]
cassie_vis_zfar = _libraries['./libcassiemujoco.so'].cassie_vis_zfar
cassie_vis_zfar.restype = ctypes.c_float
cassie_vis_zfar.argtypes = [POINTER_T(struct_cassie_vis)]
cassie_vis_close = _libraries['./libcassiemujoco.so'].cassie_vis_close
cassie_vis_close.restype = None
cassie_vis_close.argtypes = [POINTER_T(struct_cassie_vis)]
cassie_vis_free = _libraries['./libcassiemujoco.so'].cassie_vis_free
cassie_vis_free.restype = None
cassie_vis_free.argtypes = [POINTER_T(struct_cassie_vis)]
cassie_vis_draw = _libraries['./libcassiemujoco.so'].cassie_vis_draw
cassie_vis_draw.restype = ctypes.c_bool
cassie_vis_draw.argtypes = [POINTER_T(struct_cassie_vis), POINTER_T(struct_cassie_sim)]
cassie_vis_set_cam = _libraries['./libcassiemujoco.so'].cassie_vis_set_cam
cassie_vis_set_cam.restype = None
cassie_vis_set_cam.argtypes = [POINTER_T(struct_cassie_vis), ctypes.c_char_p, ctypes.c_double, ctypes.c_double, ctypes.c_double]
cassie_vis_set_cam_pos = _libraries['./libcassiemujoco.so'].cassie_vis_set_cam_pos
cassie_vis_set_cam_pos.restype = None
cassie_vis_set_cam_pos.argtypes = [POINTER_T(struct_cassie_vis), POINTER_T(ctypes.c_double), ctypes.c_double, ctypes.c_double, ctypes.c_double]
cassie_vis_window_resize = _libraries['./libcassiemujoco.so'].cassie_vis_window_resize
cassie_vis_window_resize.restype = None
cassie_vis_window_resize.argtypes = [POINTER_T(struct_cassie_vis), ctypes.c_int32, ctypes.c_int32]
cassie_vis_attach_cam = _libraries['./libcassiemujoco.so'].cassie_vis_attach_cam
cassie_vis_attach_cam.restype = None
cassie_vis_attach_cam.argtypes = [POINTER_T(struct_cassie_vis), ctypes.c_char_p]
cassie_vis_draw_depth = _libraries['./libcassiemujoco.so'].cassie_vis_draw_depth
cassie_vis_draw_depth.restype = POINTER_T(ctypes.c_float)
cassie_vis_draw_depth.argtypes = [POINTER_T(struct_cassie_vis), POINTER_T(struct_cassie_sim), ctypes.c_int32, ctypes.c_int32]
cassie_vis_get_rgb = _libraries['./libcassiemujoco.so'].cassie_vis_get_rgb
cassie_vis_get_rgb.restype = POINTER_T(ctypes.c_ubyte)
cassie_vis_get_rgb.argtypes = [POINTER_T(struct_cassie_vis), POINTER_T(struct_cassie_sim), ctypes.c_int32, ctypes.c_int32]
cassie_vis_get_depth_size = _libraries['./libcassiemujoco.so'].cassie_vis_get_depth_size
cassie_vis_get_depth_size.restype = ctypes.c_int32
cassie_vis_get_depth_size.argtypes = [POINTER_T(struct_cassie_vis), ctypes.c_int32, ctypes.c_int32]
cassie_vis_init_depth = _libraries['./libcassiemujoco.so'].cassie_vis_init_depth
cassie_vis_init_depth.restype = None
cassie_vis_init_depth.argtypes = [POINTER_T(struct_cassie_vis), ctypes.c_int, ctypes.c_int]
cassie_vis_init_rgb = _libraries['./libcassiemujoco.so'].cassie_vis_init_rgb
cassie_vis_init_rgb.restype = None
cassie_vis_init_rgb.argtypes = [POINTER_T(struct_cassie_vis), ctypes.c_int, ctypes.c_int]
cassie_vis_valid = _libraries['./libcassiemujoco.so'].cassie_vis_valid
cassie_vis_valid.restype = ctypes.c_bool
cassie_vis_valid.argtypes = [POINTER_T(struct_cassie_vis)]
cassie_vis_paused = _libraries['./libcassiemujoco.so'].cassie_vis_paused
cassie_vis_paused.restype = ctypes.c_bool
cassie_vis_paused.argtypes = [POINTER_T(struct_cassie_vis)]
cassie_vis_apply_force = _libraries['./libcassiemujoco.so'].cassie_vis_apply_force
cassie_vis_apply_force.restype = None
cassie_vis_apply_force.argtypes = [POINTER_T(struct_cassie_vis), POINTER_T(ctypes.c_double), ctypes.c_char_p]
cassie_vis_add_marker = _libraries['./libcassiemujoco.so'].cassie_vis_add_marker
cassie_vis_add_marker.restype = None
cassie_vis_add_marker.argtypes = [POINTER_T(struct_cassie_vis), ctypes.c_double * 3, ctypes.c_double * 3, ctypes.c_double * 4, ctypes.c_double * 9]
cassie_vis_remove_marker = _libraries['./libcassiemujoco.so'].cassie_vis_remove_marker
cassie_vis_remove_marker.restype = None
cassie_vis_remove_marker.argtypes = [POINTER_T(struct_cassie_vis), ctypes.c_int]
cassie_vis_clear_markers = _libraries['./libcassiemujoco.so'].cassie_vis_clear_markers
cassie_vis_clear_markers.restype = None
cassie_vis_clear_markers.argtypes = [POINTER_T(struct_cassie_vis)]
cassie_vis_update_marker_pos = _libraries['./libcassiemujoco.so'].cassie_vis_update_marker_pos
cassie_vis_update_marker_pos.restype = None
cassie_vis_update_marker_pos.argtypes = [POINTER_T(struct_cassie_vis), ctypes.c_int, ctypes.c_double * 3]
cassie_vis_update_marker_size = _libraries['./libcassiemujoco.so'].cassie_vis_update_marker_size
cassie_vis_update_marker_size.restype = None
cassie_vis_update_marker_size.argtypes = [POINTER_T(struct_cassie_vis), ctypes.c_int, ctypes.c_double * 3]
cassie_vis_update_marker_rgba = _libraries['./libcassiemujoco.so'].cassie_vis_update_marker_rgba
cassie_vis_update_marker_rgba.restype = None
cassie_vis_update_marker_rgba.argtypes = [POINTER_T(struct_cassie_vis), ctypes.c_int, ctypes.c_double * 4]
cassie_vis_update_marker_orient = _libraries['./libcassiemujoco.so'].cassie_vis_update_marker_orient
cassie_vis_update_marker_orient.restype = None
cassie_vis_update_marker_orient.argtypes = [POINTER_T(struct_cassie_vis), ctypes.c_int, ctypes.c_double * 9]
cassie_vis_full_reset = _libraries['./libcassiemujoco.so'].cassie_vis_full_reset
cassie_vis_full_reset.restype = None
cassie_vis_full_reset.argtypes = [POINTER_T(struct_cassie_vis)]
cassie_vis_remakeSceneCon = _libraries['./libcassiemujoco.so'].cassie_vis_remakeSceneCon
cassie_vis_remakeSceneCon.restype = None
cassie_vis_remakeSceneCon.argtypes = [POINTER_T(struct_cassie_vis)]
cassie_vis_init_recording = _libraries['./libcassiemujoco.so'].cassie_vis_init_recording
cassie_vis_init_recording.restype = None
cassie_vis_init_recording.argtypes = [POINTER_T(struct_cassie_vis), ctypes.c_char_p, ctypes.c_int32, ctypes.c_int32]
cassie_vis_record_frame = _libraries['./libcassiemujoco.so'].cassie_vis_record_frame
cassie_vis_record_frame.restype = None
cassie_vis_record_frame.argtypes = [POINTER_T(struct_cassie_vis)]
cassie_vis_close_recording = _libraries['./libcassiemujoco.so'].cassie_vis_close_recording
cassie_vis_close_recording.restype = None
cassie_vis_close_recording.argtypes = [POINTER_T(struct_cassie_vis)]
cassie_state_alloc = _libraries['./libcassiemujoco.so'].cassie_state_alloc
cassie_state_alloc.restype = POINTER_T(struct_cassie_state)
cassie_state_alloc.argtypes = []
cassie_state_duplicate = _libraries['./libcassiemujoco.so'].cassie_state_duplicate
cassie_state_duplicate.restype = POINTER_T(struct_cassie_state)
cassie_state_duplicate.argtypes = [POINTER_T(struct_cassie_state)]
cassie_state_copy = _libraries['./libcassiemujoco.so'].cassie_state_copy
cassie_state_copy.restype = None
cassie_state_copy.argtypes = [POINTER_T(struct_cassie_state), POINTER_T(struct_cassie_state)]
cassie_state_free = _libraries['./libcassiemujoco.so'].cassie_state_free
cassie_state_free.restype = None
cassie_state_free.argtypes = [POINTER_T(struct_cassie_state)]
cassie_state_time = _libraries['./libcassiemujoco.so'].cassie_state_time
cassie_state_time.restype = POINTER_T(ctypes.c_double)
cassie_state_time.argtypes = [POINTER_T(struct_cassie_state)]
cassie_state_qpos = _libraries['./libcassiemujoco.so'].cassie_state_qpos
cassie_state_qpos.restype = POINTER_T(ctypes.c_double)
cassie_state_qpos.argtypes = [POINTER_T(struct_cassie_state)]
cassie_state_qvel = _libraries['./libcassiemujoco.so'].cassie_state_qvel
cassie_state_qvel.restype = POINTER_T(ctypes.c_double)
cassie_state_qvel.argtypes = [POINTER_T(struct_cassie_state)]
cassie_get_state = _libraries['./libcassiemujoco.so'].cassie_get_state
cassie_get_state.restype = None
cassie_get_state.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(struct_cassie_state)]
cassie_set_state = _libraries['./libcassiemujoco.so'].cassie_set_state
cassie_set_state.restype = None
cassie_set_state.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(struct_cassie_state)]
cassie_sim_read_rangefinder = _libraries['./libcassiemujoco.so'].cassie_sim_read_rangefinder
cassie_sim_read_rangefinder.restype = None
cassie_sim_read_rangefinder.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 6]
#cassie_sim_foot_positions.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 6]
cassie_sim_dof_damping = _libraries['./libcassiemujoco.so'].cassie_sim_dof_damping
cassie_sim_dof_damping.restype = POINTER_T(ctypes.c_double)
cassie_sim_dof_damping.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_set_dof_damping = _libraries['./libcassiemujoco.so'].cassie_sim_set_dof_damping
cassie_sim_set_dof_damping.restype = None
cassie_sim_set_dof_damping.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double)]
cassie_sim_set_dof_name_damping = _libraries['./libcassiemujoco.so'].cassie_sim_set_dof_name_damping
cassie_sim_set_dof_name_damping.restype = None
cassie_sim_set_dof_name_damping.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p, POINTER_T(ctypes.c_double)]
cassie_sim_get_dof_name_damping = _libraries['./libcassiemujoco.so'].cassie_sim_get_dof_name_damping
cassie_sim_get_dof_name_damping.restype = POINTER_T(ctypes.c_double)
cassie_sim_get_dof_name_damping.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p]
cassie_sim_get_joint_num_dof = _libraries['./libcassiemujoco.so'].cassie_sim_get_joint_num_dof
cassie_sim_get_joint_num_dof.restype = ctypes.c_int32
cassie_sim_get_joint_num_dof.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p]
cassie_sim_body_mass = _libraries['./libcassiemujoco.so'].cassie_sim_body_mass
cassie_sim_body_mass.restype = POINTER_T(ctypes.c_double)
cassie_sim_body_mass.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_set_body_mass = _libraries['./libcassiemujoco.so'].cassie_sim_set_body_mass
cassie_sim_set_body_mass.restype = None
cassie_sim_set_body_mass.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double)]
cassie_sim_set_body_name_mass = _libraries['./libcassiemujoco.so'].cassie_sim_set_body_name_mass
cassie_sim_set_body_name_mass.restype = None
cassie_sim_set_body_name_mass.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p, ctypes.c_double]
cassie_sim_get_body_name_mass = _libraries['./libcassiemujoco.so'].cassie_sim_get_body_name_mass
cassie_sim_get_body_name_mass.restype = ctypes.c_double
cassie_sim_get_body_name_mass.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p]
cassie_sim_body_ipos = _libraries['./libcassiemujoco.so'].cassie_sim_body_ipos
cassie_sim_body_ipos.restype = POINTER_T(ctypes.c_double)
cassie_sim_body_ipos.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_set_body_name_ipos = _libraries['./libcassiemujoco.so'].cassie_sim_set_body_name_ipos
cassie_sim_set_body_name_ipos.restype = None
cassie_sim_set_body_name_ipos.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p, POINTER_T(ctypes.c_double)]
cassie_sim_get_body_name_ipos = _libraries['./libcassiemujoco.so'].cassie_sim_get_body_name_ipos
cassie_sim_get_body_name_ipos.restype = POINTER_T(ctypes.c_double)
cassie_sim_get_body_name_ipos.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p]
cassie_sim_get_body_name_pos = _libraries['./libcassiemujoco.so'].cassie_sim_get_body_name_pos
cassie_sim_get_body_name_pos.restype = POINTER_T(ctypes.c_double)
cassie_sim_get_body_name_pos.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p]
cassie_sim_set_body_name_pos = _libraries['./libcassiemujoco.so'].cassie_sim_set_body_name_pos
cassie_sim_set_body_name_pos.restype = None
cassie_sim_set_body_name_pos.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p, POINTER_T(ctypes.c_double)]
cassie_sim_set_body_ipos = _libraries['./libcassiemujoco.so'].cassie_sim_set_body_ipos
cassie_sim_set_body_ipos.restype = None
cassie_sim_set_body_ipos.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double)]
cassie_sim_geom_friction = _libraries['./libcassiemujoco.so'].cassie_sim_geom_friction
cassie_sim_geom_friction.restype = POINTER_T(ctypes.c_double)
cassie_sim_geom_friction.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_set_geom_friction = _libraries['./libcassiemujoco.so'].cassie_sim_set_geom_friction
cassie_sim_set_geom_friction.restype = None
cassie_sim_set_geom_friction.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double)]
cassie_sim_set_geom_name_friction = _libraries['./libcassiemujoco.so'].cassie_sim_set_geom_name_friction
cassie_sim_set_geom_name_friction.restype = None
cassie_sim_set_geom_name_friction.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p, POINTER_T(ctypes.c_double)]
cassie_sim_get_geom_name_friction = _libraries['./libcassiemujoco.so'].cassie_sim_get_geom_name_friction
cassie_sim_get_geom_name_friction.restype = POINTER_T(ctypes.c_double)
cassie_sim_get_geom_name_friction.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p]
cassie_sim_geom_rgba = _libraries['./libcassiemujoco.so'].cassie_sim_geom_rgba
cassie_sim_geom_rgba.restype = POINTER_T(ctypes.c_float)
cassie_sim_geom_rgba.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_geom_name_rgba = _libraries['./libcassiemujoco.so'].cassie_sim_geom_name_rgba
cassie_sim_geom_name_rgba.restype = POINTER_T(ctypes.c_float)
cassie_sim_geom_name_rgba.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p]
cassie_sim_set_geom_rgba = _libraries['./libcassiemujoco.so'].cassie_sim_set_geom_rgba
cassie_sim_set_geom_rgba.restype = None
cassie_sim_set_geom_rgba.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_float)]
cassie_sim_set_geom_name_rgba = _libraries['./libcassiemujoco.so'].cassie_sim_set_geom_name_rgba
cassie_sim_set_geom_name_rgba.restype = None
cassie_sim_set_geom_name_rgba.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p, POINTER_T(ctypes.c_float)]
cassie_sim_geom_quat = _libraries['./libcassiemujoco.so'].cassie_sim_geom_quat
cassie_sim_geom_quat.restype = POINTER_T(ctypes.c_double)
cassie_sim_geom_quat.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_geom_name_quat = _libraries['./libcassiemujoco.so'].cassie_sim_geom_name_quat
cassie_sim_geom_name_quat.restype = POINTER_T(ctypes.c_double)
cassie_sim_geom_name_quat.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p]
cassie_sim_set_geom_quat = _libraries['./libcassiemujoco.so'].cassie_sim_set_geom_quat
cassie_sim_set_geom_quat.restype = None
cassie_sim_set_geom_quat.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double)]
cassie_sim_set_geom_name_quat = _libraries['./libcassiemujoco.so'].cassie_sim_set_geom_name_quat
cassie_sim_set_geom_name_quat.restype = None
cassie_sim_set_geom_name_quat.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p, POINTER_T(ctypes.c_double)]
cassie_sim_geom_pos = _libraries['./libcassiemujoco.so'].cassie_sim_geom_pos
cassie_sim_geom_pos.restype = POINTER_T(ctypes.c_double)
cassie_sim_geom_pos.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_geom_name_pos = _libraries['./libcassiemujoco.so'].cassie_sim_geom_name_pos
cassie_sim_geom_name_pos.restype = POINTER_T(ctypes.c_double)
cassie_sim_geom_name_pos.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p]
cassie_sim_set_geom_pos = _libraries['./libcassiemujoco.so'].cassie_sim_set_geom_pos
cassie_sim_set_geom_pos.restype = None
cassie_sim_set_geom_pos.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double)]
cassie_sim_set_geom_name_pos = _libraries['./libcassiemujoco.so'].cassie_sim_set_geom_name_pos
cassie_sim_set_geom_name_pos.restype = None
cassie_sim_set_geom_name_pos.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p, POINTER_T(ctypes.c_double)]
cassie_sim_geom_size = _libraries['./libcassiemujoco.so'].cassie_sim_geom_size
cassie_sim_geom_size.restype = POINTER_T(ctypes.c_double)
cassie_sim_geom_size.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_geom_name_size = _libraries['./libcassiemujoco.so'].cassie_sim_geom_name_size
cassie_sim_geom_name_size.restype = POINTER_T(ctypes.c_double)
cassie_sim_geom_name_size.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p]
cassie_sim_set_geom_size = _libraries['./libcassiemujoco.so'].cassie_sim_set_geom_size
cassie_sim_set_geom_size.restype = None
cassie_sim_set_geom_size.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double)]
cassie_sim_set_geom_name_size = _libraries['./libcassiemujoco.so'].cassie_sim_set_geom_name_size
cassie_sim_set_geom_name_size.restype = None
cassie_sim_set_geom_name_size.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p, POINTER_T(ctypes.c_double)]
cassie_sim_set_const = _libraries['./libcassiemujoco.so'].cassie_sim_set_const
cassie_sim_set_const.restype = None
cassie_sim_set_const.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_site_xpos = _libraries['./libcassiemujoco.so'].cassie_sim_site_xpos
cassie_sim_site_xpos.restype = POINTER_T(ctypes.c_double)
cassie_sim_site_xpos.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p]
cassie_sim_site_xquat = _libraries['./libcassiemujoco.so'].cassie_sim_site_xquat
cassie_sim_site_xquat.restype = None
cassie_sim_site_xquat.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p]
cassie_sim_relative_pose = _libraries['./libcassiemujoco.so'].cassie_sim_relative_pose
cassie_sim_relative_pose.restype = None
cassie_sim_relative_pose.argtypes = [POINTER_T(ctypes.c_double), POINTER_T(ctypes.c_double),
POINTER_T(ctypes.c_double), POINTER_T(ctypes.c_double),
ctypes.c_double * 3, ctypes.c_double * 4]
cassie_sim_just_set_const = _libraries['./libcassiemujoco.so'].cassie_sim_just_set_const
cassie_sim_just_set_const.restype = None
cassie_sim_just_set_const.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_params = _libraries['./libcassiemujoco.so'].cassie_sim_params
cassie_sim_params.restype = None
cassie_sim_params.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_int32)]
cassie_sim_joint_filter = _libraries['./libcassiemujoco.so'].cassie_sim_joint_filter
cassie_sim_joint_filter.restype = POINTER_T(joint_filter_t)
cassie_sim_joint_filter.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_get_joint_filter = _libraries['./libcassiemujoco.so'].cassie_sim_get_joint_filter
cassie_sim_get_joint_filter.restype = None
cassie_sim_get_joint_filter.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double)]
cassie_sim_set_joint_filter = _libraries['./libcassiemujoco.so'].cassie_sim_set_joint_filter
cassie_sim_set_joint_filter.restype = None
cassie_sim_set_joint_filter.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double), POINTER_T(ctypes.c_double)]
cassie_sim_drive_filter = _libraries['./libcassiemujoco.so'].cassie_sim_drive_filter
cassie_sim_drive_filter.restype = POINTER_T(drive_filter_t)
cassie_sim_drive_filter.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_get_drive_filter = _libraries['./libcassiemujoco.so'].cassie_sim_drive_filter
cassie_sim_get_drive_filter.restype = None
cassie_sim_get_drive_filter.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double)]
cassie_sim_set_drive_filter = _libraries['./libcassiemujoco.so'].cassie_sim_set_drive_filter
cassie_sim_set_drive_filter.restype = None
cassie_sim_set_drive_filter.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double)]
cassie_sim_torque_delay = _libraries['./libcassiemujoco.so'].cassie_sim_torque_delay
cassie_sim_torque_delay.restype = None
cassie_sim_torque_delay.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double)]
cassie_sim_set_torque_delay = _libraries['./libcassiemujoco.so'].cassie_sim_set_torque_delay
cassie_sim_set_torque_delay.restype = None
cassie_sim_set_torque_delay.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double)]
cassie_sim_nv = _libraries['./libcassiemujoco.so'].cassie_sim_nv
cassie_sim_nv.restype = ctypes.c_int32
cassie_sim_nv.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_nbody = _libraries['./libcassiemujoco.so'].cassie_sim_nbody
cassie_sim_nbody.restype = ctypes.c_int32
cassie_sim_nbody.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_ngeom = _libraries['./libcassiemujoco.so'].cassie_sim_ngeom
cassie_sim_ngeom.restype = ctypes.c_int32
cassie_sim_ngeom.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_nq = _libraries['./libcassiemujoco.so'].cassie_sim_nq
cassie_sim_nq.restype = ctypes.c_int32
cassie_sim_nq.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_nu = _libraries['./libcassiemujoco.so'].cassie_sim_nu
cassie_sim_nu.restype = ctypes.c_int32
cassie_sim_nu.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_njnt = _libraries['./libcassiemujoco.so'].cassie_sim_njnt
cassie_sim_njnt.restype = ctypes.c_int32
cassie_sim_njnt.argtypes = [POINTER_T(struct_cassie_sim)]
cassie_sim_get_jacobian = _libraries['./libcassiemujoco.so'].cassie_sim_get_jacobian
cassie_sim_get_jacobian.restype = None
cassie_sim_get_jacobian.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double), ctypes.c_char_p]
cassie_sim_mj_name2id = _libraries['./libcassiemujoco.so'].cassie_sim_mj_name2id
cassie_sim_mj_name2id.restype = ctypes.c_int32
cassie_sim_mj_name2id.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_char_p, ctypes.c_char_p]
cassie_sim_get_jacobian_full = _libraries['./libcassiemujoco.so'].cassie_sim_get_jacobian_full
cassie_sim_get_jacobian_full.restype = None
cassie_sim_get_jacobian_full.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double), POINTER_T(ctypes.c_double), ctypes.c_char_p]
cassie_sim_get_jacobian_full_site = _libraries['./libcassiemujoco.so'].cassie_sim_get_jacobian_full_site
cassie_sim_get_jacobian_full_site.restype = None
cassie_sim_get_jacobian_full_site.argtypes = [POINTER_T(struct_cassie_sim), POINTER_T(ctypes.c_double), POINTER_T(ctypes.c_double), ctypes.c_char_p]
cassie_sim_body_contact_force = _libraries['./libcassiemujoco.so'].cassie_sim_body_contact_force
cassie_sim_body_contact_force.restype = None
cassie_sim_body_contact_force.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 6, ctypes.c_char_p]
cassie_sim_body_acceleration = _libraries['./libcassiemujoco.so'].cassie_sim_body_acceleration
cassie_sim_body_acceleration.restype = None
cassie_sim_body_acceleration.argtypes = [POINTER_T(struct_cassie_sim), ctypes.c_double * 6, ctypes.c_char_p]
class struct_c__SA_pd_motor_in_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('torque', ctypes.c_double * 5),
('pTarget', ctypes.c_double * 5),
('dTarget', ctypes.c_double * 5),
('pGain', ctypes.c_double * 5),
('dGain', ctypes.c_double * 5),
]
pd_motor_in_t = struct_c__SA_pd_motor_in_t
class struct_c__SA_pd_task_in_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('torque', ctypes.c_double * 6),
('pTarget', ctypes.c_double * 6),
('dTarget', ctypes.c_double * 6),
('pGain', ctypes.c_double * 6),
('dGain', ctypes.c_double * 6),
]
pd_task_in_t = struct_c__SA_pd_task_in_t
class struct_c__SA_pd_leg_in_t(ctypes.Structure):
_pack_ = True # source:False
_fields_ = [
('taskPd', pd_task_in_t),
('motorPd', pd_motor_in_t),
]
pd_leg_in_t = struct_c__SA_pd_leg_in_t
struct_c__SA_pd_in_t._pack_ = True # source:False
struct_c__SA_pd_in_t._fields_ = [
('leftLeg', pd_leg_in_t),
('rightLeg', pd_leg_in_t),
('telemetry', ctypes.c_double * 9),
]
pd_in_t = struct_c__SA_pd_in_t
pack_pd_in_t = _libraries['./libcassiemujoco.so'].pack_pd_in_t
pack_pd_in_t.restype = None
pack_pd_in_t.argtypes = [POINTER_T(struct_c__SA_pd_in_t), POINTER_T(ctypes.c_ubyte)]
unpack_pd_in_t = _libraries['./libcassiemujoco.so'].unpack_pd_in_t
unpack_pd_in_t.restype = None
unpack_pd_in_t.argtypes = [POINTER_T(ctypes.c_ubyte), POINTER_T(struct_c__SA_pd_in_t)]
class struct_PdInput(ctypes.Structure):
pass
pd_input_t = struct_PdInput
pd_input_alloc = _libraries['./libcassiemujoco.so'].pd_input_alloc
pd_input_alloc.restype = POINTER_T(struct_PdInput)
pd_input_alloc.argtypes = []
pd_input_copy = _libraries['./libcassiemujoco.so'].pd_input_copy