MCPcopy Create free account
hub / github.com/Simple-Robotics/Simple / SimulationArgs

Class SimulationArgs

sandbox/simulation_args.py:4–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2
3
4class SimulationArgs(tap.Tap):
5 num_repetitions: int = 1
6 display: bool = False
7 display_com: bool = False
8 debug: bool = False
9 debug_step: int = 1
10 display_collision_model: bool = False
11 display_step: bool = False
12 display_state: bool = False
13 display_contacts: bool = False
14 debug_transparency: float = 0.5
15 max_fps: int = 120
16 Kp: float = 0 # baumgarte proportional term
17 Kd: float = 0 # baumgarte derivative term
18 compliance: float = 0
19 material: str = "metal"
20 horizon: int = 1000
21 dt: float = 1e-3
22 tol: float = 1e-6
23 tol_rel: float = 1e-6
24 mu_prox: float = 1e-4
25 maxit: int = 1000
26 warm_start: int = 1
27 contact_solver: str = "ADMM"
28 plot_metrics: bool = False
29 plot_hist: bool = False
30 plot_title: str = "NO TITLE"
31 seed: int = 1234
32 random_initial_velocity: bool = False
33 add_damping: bool = False
34 damping_factor: float = 0.0
35 admm_update_rule: str = "spectral"
36 mujoco_show_ui: bool = False
37 max_patch_size: int = 4
38 patch_tolerance: float = 1e-3
39
40 def process_args(self):
41 if self.debug:
42 self.display = True
43 self.display_contacts = True
44 self.display_state = True
45 self.display_com = True
46
47
48class ControlArgs(SimulationArgs):

Callers 1

cartpole.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected