robosim.constants

constants.py - constant globals used throughout this project Import level: 1. Should not import anything from robosim.

 1"""
 2constants.py - constant globals used throughout this project
 3Import level: 1. Should not import anything from robosim.
 4"""
 5from pathlib import Path
 6import os
 7import raylib as rl
 8
 9CONFIGS_PATH = Path(__file__).parents[1] / "configs"
10
11FPV_WIDTH = 400
12FPV_HEIGHT = 400
13SCREEN_WIDTH = 800
14SCREEN_HEIGHT = 800
15DEFAULT_BACKGROUND = rl.RAYWHITE
16SOCKET_TIMEOUT_S = int(os.getenv("SOCKET_TIMEOUT_S", "1000")) # big number so we can breakpoint w/o timeouts.
17CONNECT_CMD = "connect"
18
19HZ = 60
20DT = 1 / HZ
21EPS = 1e-6
22
23MAX_SUBTICKS_PER_RENDER_TICK = 3 # used in clock to avoid spiral of death thingy
24TICK_STATS_LEN = 600 # used in the simulator singleton to create a window for the effective physics and render durations
25N_DOF = 6 # all the robots in this simulator operate at vectors of 6 degrees of freedom. In some cases (N<6), values==0
26# motion stuff
27LVL2_MAX_ACCELERATIONS = (3, 3, 3, 3, 3, 3) # [m/s^2]
28LVL2_DRAG_COEFF = 1 # [m/s^2] snappy drag coefficient: so it goes to 0 quite fast
29# lvl2: max velocity (terminal) = MAX_ACCELERATIONS / DRAG_COEFF. For 0.5/5 => 0.1 max velocity!
30LVL1_MAX_VELOCITIES = (4.2, 4.2, 4.2, 1.8, 1.8, 1.8) # [m/s, rad/s]
CONFIGS_PATH = PosixPath('/builds/video-representations-extractor/robosim/configs')
FPV_WIDTH = 400
FPV_HEIGHT = 400
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 800
DEFAULT_BACKGROUND = (245, 245, 245, 255)
SOCKET_TIMEOUT_S = 1000
CONNECT_CMD = 'connect'
HZ = 60
DT = 0.016666666666666666
EPS = 1e-06
MAX_SUBTICKS_PER_RENDER_TICK = 3
TICK_STATS_LEN = 600
N_DOF = 6
LVL2_MAX_ACCELERATIONS = (3, 3, 3, 3, 3, 3)
LVL2_DRAG_COEFF = 1
LVL1_MAX_VELOCITIES = (4.2, 4.2, 4.2, 1.8, 1.8, 1.8)