agx-openplx 0.15.1__cp39-cp39-win_amd64.whl → 0.15.2__cp39-cp39-win_amd64.whl
Sign up to get free protection for your applications and to get access to all the features.
- {agx_openplx-0.15.1.dist-info → agx_openplx-0.15.2.dist-info}/METADATA +7 -6
- agx_openplx-0.15.2.dist-info/RECORD +41 -0
- openplx/DriveTrain.py +0 -406
- openplx/Physics.py +3634 -2416
- openplx/Physics1D.py +23 -1221
- openplx/Physics3D.py +4444 -7186
- openplx/Robotics.py +153 -993
- openplx/_AgxOpenPlxPyApi.cp39-win_amd64.pyd +0 -0
- openplx/_CorePythonSwig.cp39-win_amd64.pyd +0 -0
- openplx/_DriveTrainSwig.cp39-win_amd64.pyd +0 -0
- openplx/_MathSwig.cp39-win_amd64.pyd +0 -0
- openplx/_Physics1DSwig.cp39-win_amd64.pyd +0 -0
- openplx/_Physics3DSwig.cp39-win_amd64.pyd +0 -0
- openplx/_PhysicsSwig.cp39-win_amd64.pyd +0 -0
- openplx/_RoboticsSwig.cp39-win_amd64.pyd +0 -0
- openplx/_SimulationSwig.cp39-win_amd64.pyd +0 -0
- openplx/_TerrainSwig.cp39-win_amd64.pyd +0 -0
- openplx/_UrdfSwig.cp39-win_amd64.pyd +0 -0
- openplx/_VehiclesSwig.cp39-win_amd64.pyd +0 -0
- openplx/_VisualsSwig.cp39-win_amd64.pyd +0 -0
- openplx/__init__.py +20 -16
- openplx/api.py +102 -86
- openplx/migrate.py +70 -36
- openplx/migrations.py +176 -10
- openplx/openplx_application.py +9 -6
- openplx/openplx_validate.py +3 -3
- agx_openplx-0.15.1.dist-info/RECORD +0 -41
- {agx_openplx-0.15.1.dist-info → agx_openplx-0.15.2.dist-info}/WHEEL +0 -0
- {agx_openplx-0.15.1.dist-info → agx_openplx-0.15.2.dist-info}/entry_points.txt +0 -0
openplx/migrations.py
CHANGED
@@ -25,9 +25,8 @@ def migration(from_version: str, to_version: str, order: int = 0):
|
|
25
25
|
|
26
26
|
return decorator
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
def snakecaseify_methods(documents):
|
28
|
+
@migration("0.9.3", "0.10.0")
|
29
|
+
def snakecaseify_methods_093(documents): # pylint: disable=too-many-statements
|
31
30
|
ops = []
|
32
31
|
ops.extend(RefactorToolkit.renameMethod(documents, "Math.Vec3.fromXYZ", "from_xyz"))
|
33
32
|
ops.extend(
|
@@ -118,13 +117,6 @@ def snakecaseify_methods(documents):
|
|
118
117
|
ops.extend(
|
119
118
|
RefactorToolkit.renameMethod(documents, "Math.Line.fromPoints", "from_points")
|
120
119
|
)
|
121
|
-
|
122
|
-
return [ReplaceOp(op) for op in ops]
|
123
|
-
|
124
|
-
|
125
|
-
@migration("0.9.3", "0.10.0")
|
126
|
-
def snakecaseify_methods_093(documents):
|
127
|
-
ops = []
|
128
120
|
# ValueOutputSignal
|
129
121
|
ops.extend(
|
130
122
|
RefactorToolkit.renameMethod(
|
@@ -456,6 +448,180 @@ def rename_from_brick_to_openplx(document_path):
|
|
456
448
|
return ChangeExtensionOp(Path(document_path), ".openplx")
|
457
449
|
|
458
450
|
|
451
|
+
@migration("0.15.1", "0.15.2")
|
452
|
+
def migrations_for_0_15_1(documents):
|
453
|
+
ops = []
|
454
|
+
ops.extend(
|
455
|
+
RefactorToolkit.renameModel(
|
456
|
+
documents,
|
457
|
+
"Robotics.Joints.TorqueDriveTrain",
|
458
|
+
"FlexibleJointDriveTrain",
|
459
|
+
)
|
460
|
+
)
|
461
|
+
ops.extend(
|
462
|
+
RefactorToolkit.renameModel(
|
463
|
+
documents,
|
464
|
+
"Robotics.Joints.AngularVelocityDriveTrain",
|
465
|
+
"FlexibleJointDriveTrain",
|
466
|
+
)
|
467
|
+
)
|
468
|
+
ops.extend(
|
469
|
+
RefactorToolkit.moveAndRenameModel(
|
470
|
+
documents,
|
471
|
+
"Physics3D.Signals.HingeAngularVelocityOutput",
|
472
|
+
"Physics.Signals",
|
473
|
+
"AngularVelocity1DOutput",
|
474
|
+
)
|
475
|
+
)
|
476
|
+
ops.extend(
|
477
|
+
RefactorToolkit.renameAttribute(
|
478
|
+
documents, "Physics3D.Signals.HingeAngularVelocityOutput.hinge", "source"
|
479
|
+
)
|
480
|
+
)
|
481
|
+
ops.extend(
|
482
|
+
RefactorToolkit.moveAndRenameModel(
|
483
|
+
documents,
|
484
|
+
"DriveTrain.Signals.TorqueMotorInput",
|
485
|
+
"Physics.Signals",
|
486
|
+
"Torque1DInput",
|
487
|
+
)
|
488
|
+
)
|
489
|
+
ops.extend(
|
490
|
+
RefactorToolkit.renameAttribute(
|
491
|
+
documents, "DriveTrain.Signals.TorqueMotorInput.motor", "source"
|
492
|
+
)
|
493
|
+
)
|
494
|
+
ops.extend(
|
495
|
+
RefactorToolkit.moveAndRenameModel(
|
496
|
+
documents,
|
497
|
+
"Physics3D.Signals.LinearSpringPositionInput",
|
498
|
+
"Physics.Signals",
|
499
|
+
"Position1DInput",
|
500
|
+
)
|
501
|
+
)
|
502
|
+
ops.extend(
|
503
|
+
RefactorToolkit.renameAttribute(
|
504
|
+
documents, "Physics3D.Signals.LinearSpringPositionInput.spring", "source"
|
505
|
+
)
|
506
|
+
)
|
507
|
+
ops.extend(
|
508
|
+
RefactorToolkit.moveAndRenameModel(
|
509
|
+
documents,
|
510
|
+
"Physics3D.Signals.TorsionSpringAngleInput",
|
511
|
+
"Physics.Signals",
|
512
|
+
"AngleInput",
|
513
|
+
)
|
514
|
+
)
|
515
|
+
ops.extend(
|
516
|
+
RefactorToolkit.renameAttribute(
|
517
|
+
documents, "Physics3D.Signals.TorsionSpringAngleInput.spring", "source"
|
518
|
+
)
|
519
|
+
)
|
520
|
+
ops.extend(
|
521
|
+
RefactorToolkit.moveAndRenameModel(
|
522
|
+
documents,
|
523
|
+
"Physics3D.Signals.RigidBodyRPYOutput",
|
524
|
+
"Physics3D.Signals",
|
525
|
+
"RPYOutput",
|
526
|
+
)
|
527
|
+
)
|
528
|
+
ops.extend(
|
529
|
+
RefactorToolkit.renameAttribute(
|
530
|
+
documents, "Physics3D.Signals.RigidBodyRPYOutput.rigid_body", "source"
|
531
|
+
)
|
532
|
+
)
|
533
|
+
ops.extend(
|
534
|
+
RefactorToolkit.moveAndRenameModel(
|
535
|
+
documents,
|
536
|
+
"Physics3D.Signals.RigidBodyPositionOutput",
|
537
|
+
"Physics3D.Signals",
|
538
|
+
"Position3DOutput",
|
539
|
+
)
|
540
|
+
)
|
541
|
+
ops.extend(
|
542
|
+
RefactorToolkit.renameAttribute(
|
543
|
+
documents, "Physics3D.Signals.RigidBodyPositionOutput.rigid_body", "source"
|
544
|
+
)
|
545
|
+
)
|
546
|
+
ops.extend(
|
547
|
+
RefactorToolkit.renameAttribute(
|
548
|
+
documents, "Physics3D.Interactions.VelocityMotor.desired_speed", "target_speed"
|
549
|
+
)
|
550
|
+
)
|
551
|
+
ops.extend(
|
552
|
+
RefactorToolkit.renameAttribute(
|
553
|
+
documents, "Physics1D.Interactions.VelocityMotor.desired_speed", "target_speed"
|
554
|
+
)
|
555
|
+
)
|
556
|
+
ops.extend(
|
557
|
+
RefactorToolkit.moveAndRenameModel(
|
558
|
+
documents,
|
559
|
+
"Physics3D.Signals.RotationalVelocityMotorVelocityInput",
|
560
|
+
"Physics.Signals",
|
561
|
+
"AngularVelocity1DInput",
|
562
|
+
)
|
563
|
+
)
|
564
|
+
ops.extend(
|
565
|
+
RefactorToolkit.renameAttribute(
|
566
|
+
documents, "Physics3D.Signals.RotationalVelocityMotorVelocityInput.motor", "source"
|
567
|
+
)
|
568
|
+
)
|
569
|
+
ops.extend(
|
570
|
+
RefactorToolkit.moveAndRenameModel(
|
571
|
+
documents,
|
572
|
+
"Physics1D.Signals.RotationalVelocityMotor1DVelocityInput",
|
573
|
+
"Physics.Signals",
|
574
|
+
"AngularVelocity1DInput",
|
575
|
+
)
|
576
|
+
)
|
577
|
+
ops.extend(
|
578
|
+
RefactorToolkit.renameAttribute(
|
579
|
+
documents, "Physics1D.Signals.RotationalVelocityMotor1DVelocityInput.motor", "source"
|
580
|
+
)
|
581
|
+
)
|
582
|
+
ops.extend(
|
583
|
+
RefactorToolkit.moveAndRenameModel(
|
584
|
+
documents,
|
585
|
+
"Physics3D.Signals.LinearVelocityMotorVelocityInput",
|
586
|
+
"Physics.Signals",
|
587
|
+
"LinearVelocity1DInput",
|
588
|
+
)
|
589
|
+
)
|
590
|
+
ops.extend(
|
591
|
+
RefactorToolkit.renameAttribute(
|
592
|
+
documents, "Physics3D.Signals.LinearVelocityMotorVelocityInput.motor", "source"
|
593
|
+
)
|
594
|
+
)
|
595
|
+
ops.extend(
|
596
|
+
RefactorToolkit.moveAndRenameModel(
|
597
|
+
documents,
|
598
|
+
"Physics1D.Signals.RotationalBodyAngularVelocityOutput",
|
599
|
+
"Physics.Signals",
|
600
|
+
"AngularVelocity1DOutput",
|
601
|
+
)
|
602
|
+
)
|
603
|
+
ops.extend(
|
604
|
+
RefactorToolkit.renameAttribute(
|
605
|
+
documents, "Physics1D.Signals.RotationalBodyAngularVelocityOutput.body", "source"
|
606
|
+
)
|
607
|
+
)
|
608
|
+
ops.extend(
|
609
|
+
RefactorToolkit.moveAndRenameModel(
|
610
|
+
documents,
|
611
|
+
"Physics1D.Signals.RotationalBodyAngleOutput",
|
612
|
+
"Physics.Signals",
|
613
|
+
"AngleOutput",
|
614
|
+
)
|
615
|
+
)
|
616
|
+
ops.extend(
|
617
|
+
RefactorToolkit.renameAttribute(
|
618
|
+
documents, "Physics1D.Signals.RotationalBodyAngleOutput.body", "source"
|
619
|
+
)
|
620
|
+
)
|
621
|
+
|
622
|
+
return [ReplaceOp(op) for op in ops]
|
623
|
+
|
624
|
+
|
459
625
|
def split_version(v):
|
460
626
|
match = re.match(r"^(\d+)\.(\d+)\.(\d+)", v)
|
461
627
|
|
openplx/openplx_application.py
CHANGED
@@ -12,7 +12,7 @@ from openplxbundles import bundle_path
|
|
12
12
|
# Import useful utilities to access the current simulation, graphics root and application
|
13
13
|
from agxPythonModules.utils.environment import init_app, simulation, application, root
|
14
14
|
|
15
|
-
from openplx import InputSignalListener, OutputSignalListener, OsgClickAdapter
|
15
|
+
from openplx import InputSignalQueue, OutputSignalQueue, InputSignalListener, OutputSignalListener, OsgClickAdapter
|
16
16
|
from openplx import load_from_file, OptParams, addVisuals, addDeformableVisualUpdaters, __version__, set_log_level, add_file_changed_listener
|
17
17
|
from openplx.versionaction import VersionAction
|
18
18
|
|
@@ -72,7 +72,7 @@ class OpenPlxApplication:
|
|
72
72
|
|
73
73
|
opt_params = OptParams()
|
74
74
|
if args.modelname is not None:
|
75
|
-
opt_params.with_model_name(args.modelname)
|
75
|
+
opt_params = opt_params.with_model_name(args.modelname)
|
76
76
|
|
77
77
|
result = load_from_file(simulation(), args.openplxfile if openplxfile is None else openplxfile, args.bundle_path, opt_params)
|
78
78
|
|
@@ -80,8 +80,10 @@ class OpenPlxApplication:
|
|
80
80
|
openplx_scene = result.scene()
|
81
81
|
|
82
82
|
# Add signal listeners so that signals are picked up from inputs
|
83
|
-
|
84
|
-
|
83
|
+
input_queue = InputSignalQueue.create()
|
84
|
+
output_queue = OutputSignalQueue.create()
|
85
|
+
input_signal_listener = InputSignalListener(assembly, input_queue)
|
86
|
+
output_signal_listener = OutputSignalListener(assembly, openplx_scene, output_queue)
|
85
87
|
|
86
88
|
simulation().add(input_signal_listener, InputSignalListener.RECOMMENDED_PRIO)
|
87
89
|
simulation().add(output_signal_listener, OutputSignalListener.RECOMMENDED_PRIO)
|
@@ -98,13 +100,14 @@ class OpenPlxApplication:
|
|
98
100
|
|
99
101
|
if "enable_click" in args:
|
100
102
|
click_adapter = globals()["click_adapter"]
|
101
|
-
click_adapter.add_listeners(application(), simulation(), args.click_addr, openplx_scene,
|
103
|
+
click_adapter.add_listeners(application(), simulation(), args.click_addr, openplx_scene,
|
104
|
+
input_queue, output_queue, output_signal_listener)
|
102
105
|
|
103
106
|
if not addVisuals(result, root(), args.debug_render_frames):
|
104
107
|
application().setEnableDebugRenderer(True)
|
105
108
|
simulation().add(assembly.get())
|
106
109
|
addDeformableVisualUpdaters(result, root())
|
107
|
-
return openplx_scene
|
110
|
+
return openplx_scene, input_queue, output_queue
|
108
111
|
|
109
112
|
@staticmethod
|
110
113
|
def ctrl_break_handler(_signum, _frame):
|
openplx/openplx_validate.py
CHANGED
@@ -20,11 +20,11 @@ def parse_args():
|
|
20
20
|
metavar="<bundle_path>", default=bundle_path())
|
21
21
|
parser.add_argument("--debug-render-frames", action='store_true', help="enable rendering of frames for mate connectors and rigid bodies.")
|
22
22
|
parser.add_argument("--loglevel", choices=["trace", "debug", "info", "warn", "error", "critical", "off"], help="Set log level", default="warn")
|
23
|
-
parser.add_argument("--modelname", help="The model to load (defaults to last model in file)", metavar="<name>", default=
|
23
|
+
parser.add_argument("--modelname", help="The model to load (defaults to last model in file)", metavar="<name>", default=None)
|
24
24
|
parser.add_argument("--version", help="Show version", action=VersionAction, nargs=0, default=SUPPRESS)
|
25
25
|
return parser.parse_args()
|
26
26
|
|
27
|
-
class AllowCtrlBreakListener(agxOSG.ExampleApplicationListener):
|
27
|
+
class AllowCtrlBreakListener(agxOSG.ExampleApplicationListener): # pylint: disable=too-few-public-methods
|
28
28
|
pass
|
29
29
|
|
30
30
|
def validate():
|
@@ -37,7 +37,7 @@ def validate():
|
|
37
37
|
|
38
38
|
opt_params = OptParams()
|
39
39
|
if args.modelname is not None:
|
40
|
-
opt_params.with_model_name(args.modelname)
|
40
|
+
opt_params = opt_params.with_model_name(args.modelname)
|
41
41
|
|
42
42
|
result = load_from_file(simulation, args.openplxfile, args.bundle_path, opt_params)
|
43
43
|
|
@@ -1,41 +0,0 @@
|
|
1
|
-
openplx/__init__.py,sha256=EArbIZbutmQl-IsSwvqFrSTNqL6iEDk6jWWdBg00450,2101
|
2
|
-
openplx/_AgxOpenPlxPyApi.cp39-win_amd64.pyd,sha256=xbUJXePkmnp-ItdI8Dl5LyoEulL0804hAbIb9ykSq4k,6322176
|
3
|
-
openplx/_CorePythonSwig.cp39-win_amd64.pyd,sha256=h_EAH2osNZN5YzbnPm3FpnkEqOM2MxwbjnoFZFU23vI,2550272
|
4
|
-
openplx/_DriveTrainSwig.cp39-win_amd64.pyd,sha256=IRxecez-v6HtPEJDWJ0rb0nTM8K3wqZny-solEy5JGI,2826752
|
5
|
-
openplx/_MathSwig.cp39-win_amd64.pyd,sha256=Urn4mLjI-nFswhUpJohfJ3JrhZOKtkGv9KR61yHrqWU,1313792
|
6
|
-
openplx/_Physics1DSwig.cp39-win_amd64.pyd,sha256=7IIjG5aLSMqzJLrPd5pG3ibL6duvZnBqrvRE5HoOGQc,2173440
|
7
|
-
openplx/_Physics3DSwig.cp39-win_amd64.pyd,sha256=xY4wZkd276KHG1eQLIQ8rceRihxH4U86xkaXM9rZNa4,12642816
|
8
|
-
openplx/_PhysicsSwig.cp39-win_amd64.pyd,sha256=o2LNHB9jTvbDKSyMK7wtrl49zyFMItR1jqYFeLgzqPY,9691136
|
9
|
-
openplx/_RoboticsSwig.cp39-win_amd64.pyd,sha256=rLb3fFgjgwE17FMiWv1L5yPRa7XrQjwVyHtpdtUu2no,5177344
|
10
|
-
openplx/_SimulationSwig.cp39-win_amd64.pyd,sha256=kOi89KwrKL2hnxE7q0UiQtnqAKAFJSvb-mo56VYjXCk,632320
|
11
|
-
openplx/_TerrainSwig.cp39-win_amd64.pyd,sha256=7_K9gTcwGtXMfbcJ25IU5KU41vhYJlvH1WUPhTvLtKQ,1536512
|
12
|
-
openplx/_UrdfSwig.cp39-win_amd64.pyd,sha256=tvi-k7CsI9VU0mrm0Pdu2s4JHepCd-WCejMVoXQ32LU,698368
|
13
|
-
openplx/_VehiclesSwig.cp39-win_amd64.pyd,sha256=F4kayBXSVXaVWsGmuAf4Q1z3UMNdzxYWyJSLhhdUglo,3124224
|
14
|
-
openplx/_VisualsSwig.cp39-win_amd64.pyd,sha256=8gGQkFBvL9Gnp2-hf59Rv8bWsIkAnkNACPkWkRxpPis,1281024
|
15
|
-
openplx/agxtoopenplx.py,sha256=LCt_tm9tffb0aA5ZsVAqvD1w276NKuq2MQ9vOZS1V1I,2477
|
16
|
-
openplx/anytoopenplx.py,sha256=ckINLkHMyraBaIhdJfVXcaeVNh6m7BnyEx9or3j7mxo,2318
|
17
|
-
openplx/api.py,sha256=XoU3a-t2bNxO71FeBpuGgENsVaR14DrlPpkCE4cJRn8,48252
|
18
|
-
openplx/Core.py,sha256=lQcUoerxSC-TjMSjdNFWGjnQ1eQKVpFJhGl0sTlPkE0,277824
|
19
|
-
openplx/DriveTrain.py,sha256=e3ntEsPnXXhw3LWqNsP78A5aZaMNwd_jDa9cjShmP_g,427468
|
20
|
-
openplx/Math.py,sha256=hi3zI0KfxZNqy8u78nEm55bZGo0ZoWgqA8piOE2e2B8,193933
|
21
|
-
openplx/migrate.py,sha256=3kupvPeccEGwoBxWEoLH4a-tkcl7fXaGKkVgYSfccJI,6587
|
22
|
-
openplx/migration_hint.py,sha256=JiD5f7DzCVNoN-N_VweRNIKnSmCRqxhRof4QiR-1rEs,617
|
23
|
-
openplx/migrations.py,sha256=KY1fIEwI6mgcw6ZHj-pJepzHHJj-R6xds68uIBs_RpE,16128
|
24
|
-
openplx/openplx_application.py,sha256=mVyv19mh18OqoqWdh15ouWFIDezr2IGLyn_dQRNfFrc,6536
|
25
|
-
openplx/openplx_serialize.py,sha256=0_hKFnBP8IQ4f22vW6RLHRRNxUZVSu21Lcrgy6lbqPc,1491
|
26
|
-
openplx/openplx_validate.py,sha256=PgbC1K0OzKC2rknUtqYWXyCca5TKnZdpkg_ZresGvOY,2112
|
27
|
-
openplx/openplx_view.py,sha256=Rmg2uWhaDQ4WMEsKlDTcMBSoPIFDNXXZzN7ytFU9ZgQ,365
|
28
|
-
openplx/Physics.py,sha256=uoxRlbDAfIJ-uWtAo3W33VXuv_79ZHco4Nw4KEj6Rl8,1920631
|
29
|
-
openplx/Physics1D.py,sha256=zumBcg-GGIW39BXkywKVldM3FtSWhUFX2aLbZFHRahU,352638
|
30
|
-
openplx/Physics3D.py,sha256=Zu70VSG1gbmnvageGT07xIQXXMmNvuICkCfpM0e_Y8I,2480375
|
31
|
-
openplx/Robotics.py,sha256=gaq0xM3ZuhvIINeoKP14xENZqTw_B5px_gh40-m-_mI,814741
|
32
|
-
openplx/Simulation.py,sha256=xab3Q6-d90xNuPk--zjTB-XO8BNEv48equ_Ms48PLf8,47374
|
33
|
-
openplx/Terrain.py,sha256=RhhE6CboZ88n5CbHlyhLzG78vwpjY1sViGgpg7HHuyU,188775
|
34
|
-
openplx/Urdf.py,sha256=Z9Q5dKrSPIEgXS9JE7cYKl4zgkhbrdlmV3vBcORE0KY,24434
|
35
|
-
openplx/Vehicles.py,sha256=ljYCuwGfA-qqQywHdcI530mIzqIq1DNgb1_d2Jmo5_4,458867
|
36
|
-
openplx/versionaction.py,sha256=u0rZ34x1-KtLHM93OBN2BsFAxEAv6HDLadvu14en5io,294
|
37
|
-
openplx/Visuals.py,sha256=xTDmvGIxyJPWSgH20CWwQRPDHwOFp48nBl8fo8sN0JY,190953
|
38
|
-
agx_openplx-0.15.1.dist-info/entry_points.txt,sha256=IyHBVBNuH_4ZhfWnB1ZVXYtpKG_QT7dwGIUMLWdyhrc,263
|
39
|
-
agx_openplx-0.15.1.dist-info/METADATA,sha256=dvmCfwyGWb7uK73YK3cGxhw-4__IGcZAB1_fqTicaFY,2128
|
40
|
-
agx_openplx-0.15.1.dist-info/WHEEL,sha256=T7hzPzFWHJiWCVylm2UCj5payilA7ulisMC0IiBEe3o,96
|
41
|
-
agx_openplx-0.15.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|