agx-openplx 0.15.1__cp39-cp39-macosx_12_0_arm64.whl → 0.15.2__cp39-cp39-macosx_12_0_arm64.whl

Sign up to get free protection for your applications and to get access to all the features.
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
- @migration("0.9.2", "0.9.3")
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
 
@@ -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
- input_signal_listener = InputSignalListener(assembly)
84
- output_signal_listener = OutputSignalListener(assembly, openplx_scene)
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, output_signal_listener)
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):
@@ -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/Core.py,sha256=8V0Y0pJANycjq8SpFEUmqb3cNiqQbFkRI8IagtcsMFE,270043
2
- openplx/DriveTrain.py,sha256=c7N8ivmXsfTeGnVSFaEM7-CzKpjOalZK7ZpQqxgjI1Y,418894
3
- openplx/Math.py,sha256=kTaoNjhQSmvVHmo1WV3z9GdjNvuzPSXFW6kd-UQpJAQ,188561
4
- openplx/Physics.py,sha256=A2TcVBtnpTh7WJjpRruH1Me70kTBKaIc2k0xCMZNtjs,1884436
5
- openplx/Physics1D.py,sha256=wix9M9SMRvmGSPrQyCKWdMM7IqdkkVI9Vi7eyrMrfIE,345906
6
- openplx/Physics3D.py,sha256=5YQwAXEAp-CMP8Ajqvj_QKgTj3Uvp7gWI9vyRsQ5D0A,2437851
7
- openplx/Robotics.py,sha256=NvqWJbCpk1jDZvJJVi0PijOwOpWZm2OZGZJ1_HegNj8,798979
8
- openplx/Simulation.py,sha256=mIuypCjz1O6c9_x4O_Ro6GLhOiXRzNlZlVjdgoGYq3U,46318
9
- openplx/Terrain.py,sha256=9CxizkDVf9UtPIyBumenXzfbxAL6yn2G_d0_ZWbv-JY,184884
10
- openplx/Urdf.py,sha256=JOryVyaFIROiyJ9V9OMrZAS3MoUwVmJW_2TTPSsRlH4,23780
11
- openplx/Vehicles.py,sha256=QmtdIawHlYcIRtJH4LotXSQNs06rCpxPl6e5gklUvWg,450074
12
- openplx/Visuals.py,sha256=lYBFzzPZvMeWaKzXQgzikmO-fuDshcgf5uCJJQ-WKTM,187052
13
- openplx/_AgxOpenPlxPyApi.cpython-39-darwin.so,sha256=Qtdjc8wXQ-e0mQ7O49zvAAowlQmUBwNIsS72qxXUIIg,12442370
14
- openplx/_CorePythonSwig.cpython-39-darwin.so,sha256=AC1Au-yZE8eefWcZh4iQ0Oq2LWExqJswpmOLl8T_5rM,3234113
15
- openplx/_DriveTrainSwig.cpython-39-darwin.so,sha256=S7K59t90bLKImeeDcs6pFN5dCryqv64tNesbnxHjQU4,6557505
16
- openplx/_MathSwig.cpython-39-darwin.so,sha256=sayquEba_a8Dz4oTlrHuTJW1NqeirzqeetLbHT4YO7g,2121771
17
- openplx/_Physics1DSwig.cpython-39-darwin.so,sha256=PJm_3eoDi4OuU6hp6FM_sDxrckT8Z0kP8pl9HjasHdM,4094304
18
- openplx/_Physics3DSwig.cpython-39-darwin.so,sha256=h7NsNvuDGXHtL0iVsJ_kbchUnfzmoKtrCgSLEa9i-AI,16812448
19
- openplx/_PhysicsSwig.cpython-39-darwin.so,sha256=V2snA_N-So-EKgROP1wTMP_FXwc3A3dgP-MMY_Xah_4,12399070
20
- openplx/_RoboticsSwig.cpython-39-darwin.so,sha256=qzsEP-XNczq2XByPFPnV7Ov_0qPwbB4nFss7fq5Sk-s,9431775
21
- openplx/_SimulationSwig.cpython-39-darwin.so,sha256=GLM3sAMVORYN_y4kMfW-sL5jkojHt-TNAyyd9-78Wm8,2310593
22
- openplx/_TerrainSwig.cpython-39-darwin.so,sha256=bWJ0k3fM4JtS3W09lOpExQlZetx7KTMcRXRDFX1KwNY,4833198
23
- openplx/_UrdfSwig.cpython-39-darwin.so,sha256=Uo_6kWz6hNJHI-a_oU0fbTYMvzjQkjcj-BA7mTO3FX8,3854011
24
- openplx/_VehiclesSwig.cpython-39-darwin.so,sha256=lRCt62LggLFZGR1oF4xSDRIvipX_ChivunOLrV4TPCY,6575247
25
- openplx/_VisualsSwig.cpython-39-darwin.so,sha256=n4R9qwQ6Y3f_1QkzJHW-8tFZgi9oilF7kOSYo5milEA,2249374
26
- openplx/__init__.py,sha256=q3hkfn5aNgyXksGZjKomJ2t1pPGNkIiHWSPBEbMadVI,2050
27
- openplx/agxtoopenplx.py,sha256=gxQgZ_Pgda_5scCCBBhyu8D-jjL1yxlE7bZLtxigKCs,2422
28
- openplx/anytoopenplx.py,sha256=qAZVnelFOVAQIpCQt3y9LlfCBHQcNmxUWXFbCZuNQUc,2274
29
- openplx/api.py,sha256=05ECQBudlYfrMh1OgAYbq8VDsj_UlZKlPxx31RGnES0,46915
30
- openplx/migrate.py,sha256=bPnhmYv22k52bQf_H34IvW89Ep3ekziiEhJPPZOJemQ,6431
31
- openplx/migration_hint.py,sha256=2Xs2OB_HikmiynDAk4xHKhmU5N4pqOnPFPpeIWhK37Y,603
32
- openplx/migrations.py,sha256=bvz7ZTUwQ-_84UEPf20TmGaZuZTtWFO93R3Slv1leGQ,15591
33
- openplx/openplx_application.py,sha256=ZJFq2RgfW01IhE4o0qoEMPuwYIc6W6gYqnowcJWTdSA,6401
34
- openplx/openplx_serialize.py,sha256=Uul2-6_BwyJzg26JdgAz2MjR37mQJ6kWKjPbmE-sJzk,1456
35
- openplx/openplx_validate.py,sha256=pqBg9WBh7OUi63dOmmCpDWt_jTn8OhCSmtgL-nmb1XY,2055
36
- openplx/openplx_view.py,sha256=GCFQSl4W-dPRWL0qLQmfJ69OEwgTMKL05J62YyKSb64,351
37
- openplx/versionaction.py,sha256=Obj_q69dn5GnFMZs2as87ZScPMLaLAduPppmXUzLB6I,283
38
- agx_openplx-0.15.1.dist-info/METADATA,sha256=HMmjVYcn7l1cUbXgnS1xEGk9-PD-CyXB8Z7kyECu-QE,2077
39
- agx_openplx-0.15.1.dist-info/WHEEL,sha256=O5AT1Qb1jPpISLjIwxiRxhUaN9TX1BFXuc9iRVvoPmk,104
40
- agx_openplx-0.15.1.dist-info/entry_points.txt,sha256=IyHBVBNuH_4ZhfWnB1ZVXYtpKG_QT7dwGIUMLWdyhrc,263
41
- agx_openplx-0.15.1.dist-info/RECORD,,