Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
ff71467
slow walk
budzianowski Jan 17, 2025
e18ce11
better gait
budzianowski Jan 21, 2025
b827d68
update xml
budzianowski Jan 22, 2025
dcb2b13
update to terrain too
budzianowski Jan 22, 2025
ba15420
testing original rewards
budzianowski Jan 22, 2025
4afe19d
Merge branch 'update_kbot' of github.com:kscalelabs/sim into update_kbot
budzianowski Jan 22, 2025
dc91fa4
add uneven terrain
budzianowski Jan 23, 2025
a392ac9
mv
WT-MM Jan 24, 2025
7b8e211
Merge branch 'update_kbot' into gpr-headless
WT-MM Jan 24, 2025
58ad1a2
urdf
WT-MM Jan 24, 2025
f58f66f
s
WT-MM Jan 24, 2025
79bc78a
fix imu
WT-MM Jan 24, 2025
d958866
first run
WT-MM Jan 24, 2025
89514ab
policy
WT-MM Jan 24, 2025
7a1d967
sim2sim
WT-MM Jan 24, 2025
3bd7aaf
latest
WT-MM Jan 25, 2025
4960fc8
xml
WT-MM Jan 25, 2025
4bd8709
s
WT-MM Jan 26, 2025
14c2272
new urdf
WT-MM Jan 26, 2025
f510d99
new class
WT-MM Jan 26, 2025
e34eef3
fix path
WT-MM Jan 26, 2025
10baccb
more path
WT-MM Jan 26, 2025
17a7255
same name
WT-MM Jan 27, 2025
a1ea33f
save
WT-MM Jan 27, 2025
08b1a54
updated urdf
WT-MM Feb 1, 2025
50437be
fix new urdf
WT-MM Feb 1, 2025
e3914e5
flexible lims
WT-MM Feb 1, 2025
5558178
lower res sim + 50hz policy
WT-MM Feb 1, 2025
02269f1
fix signs?
WT-MM Feb 2, 2025
ac421c3
fiz heights
WT-MM Feb 2, 2025
b24f92e
rename
WT-MM Feb 2, 2025
222e365
termination contacts and flipping some signs just cause
WT-MM Feb 2, 2025
2bb5fe3
nvm lol
WT-MM Feb 2, 2025
b523d01
ONE. MORE. TRYgit status!
WT-MM Feb 2, 2025
af1c48f
headless xml
WT-MM Feb 2, 2025
583d949
policy
WT-MM Feb 2, 2025
123210a
lint
WT-MM Feb 2, 2025
0489cea
loosen
WT-MM Feb 2, 2025
3ef659e
lint
WT-MM Feb 2, 2025
2b052a4
no ang vel, shorter history, higher effort lim, 200hz sim time
WT-MM Feb 4, 2025
c0556c2
Merge branch 'gpr-headless' of https://github.com/kscalelabs/sim into…
WT-MM Feb 4, 2025
791153c
separate pd decimation
WT-MM Feb 4, 2025
11e99c6
new setup
WT-MM Feb 4, 2025
74fcc5a
minor rewrite
WT-MM Feb 4, 2025
680132e
parameterize export
WT-MM Feb 4, 2025
dda2857
temp latency config
WT-MM Feb 5, 2025
59c05e7
oneshot lol
WT-MM Feb 5, 2025
5bbdd51
use buffers
WT-MM Feb 5, 2025
614ab80
ang vel
WT-MM Feb 5, 2025
a223c6e
fix
WT-MM Feb 5, 2025
f41a312
higher drop
WT-MM Feb 5, 2025
9167259
Merge commit 'f41a31263258ba41500a73456b26622874ba13db' into latency
WT-MM Feb 5, 2025
a8cc17e
draft
WT-MM Feb 5, 2025
f58b409
clean
WT-MM Feb 5, 2025
be44840
pd decimatino
WT-MM Feb 5, 2025
5df0b2d
motor randomizations (and link mass)
WT-MM Feb 5, 2025
468dcf2
initialize vars
WT-MM Feb 5, 2025
4b58826
param optimization
WT-MM Feb 6, 2025
6de7824
clean
WT-MM Feb 6, 2025
151601c
lint
WT-MM Feb 6, 2025
785a418
Merge branch 'latency' of https://github.com/kscalelabs/sim into latency
WT-MM Feb 6, 2025
72cd252
ignore
WT-MM Feb 6, 2025
26d3ef2
ang vel
WT-MM Feb 6, 2025
a5a5a44
match noise
WT-MM Feb 6, 2025
72ab08f
fix pd init
WT-MM Feb 6, 2025
dd07ae4
curriculum + energy rewards
WT-MM Feb 7, 2025
9629cb5
update urdf
WT-MM Feb 11, 2025
2be2264
backup
WT-MM Feb 13, 2025
ef4696b
save
WT-MM Feb 13, 2025
c9c40e4
Merge branch 'latency' of https://github.com/kscalelabs/sim into latency
WT-MM Feb 14, 2025
4a47369
output positions and velocities
WT-MM Feb 14, 2025
d8bb308
fix playing
WT-MM Feb 14, 2025
e87fd4d
export num_joints
WT-MM Feb 14, 2025
1df18b7
mv
WT-MM Feb 18, 2025
0143635
up to date with vel-test-ideal
WT-MM Feb 18, 2025
a8ae77d
port in vel-test-ideal
WT-MM Feb 19, 2025
812ff4e
fix play
WT-MM Feb 19, 2025
69363c7
fix
WT-MM Feb 19, 2025
9be3598
add new updated urdf for latency env
WT-MM Feb 19, 2025
82d27a9
fix headless latency run
WT-MM Feb 19, 2025
bb9778c
move latency env to separate base class
WT-MM Feb 19, 2025
aa3bd59
update headless normal
WT-MM Feb 19, 2025
9b833d8
fix headless
WT-MM Feb 19, 2025
5223d9a
update logging
WT-MM Feb 19, 2025
2dc36e0
headless ideal training config
WT-MM Feb 19, 2025
f2e86e8
add termination contacts and reduce noise
WT-MM Feb 19, 2025
c7acc8c
update urdfs
WT-MM Feb 19, 2025
518fc8e
add termination contacts
WT-MM Feb 19, 2025
3263364
update termination conds
WT-MM Feb 19, 2025
e2d0c9b
update term height
WT-MM Feb 19, 2025
95986f1
increase height
WT-MM Feb 19, 2025
b4e7cd7
increase term height
WT-MM Feb 19, 2025
9c21a6a
Merge branch 'latency-vel' of https://github.com/kscalelabs/sim into …
WT-MM Feb 19, 2025
4e5999b
really high term
WT-MM Feb 19, 2025
802a61c
Merge branch 'latency-vel' of https://github.com/kscalelabs/sim into …
WT-MM Feb 19, 2025
5369d5f
kneel less noisy
WT-MM Feb 19, 2025
50c9873
port in old vel setup
WT-MM Feb 19, 2025
95e7ace
register vel
WT-MM Feb 19, 2025
b252e13
noise
WT-MM Feb 19, 2025
b3b64bf
add headless pos
WT-MM Feb 19, 2025
ba12e67
fix
WT-MM Feb 19, 2025
8ebe74a
fix vel play
WT-MM Feb 19, 2025
d4f7963
higher kp kds
WT-MM Feb 20, 2025
7df40c4
wean off traj + more noise
WT-MM Feb 20, 2025
13bad17
slightly bigger pushes
WT-MM Feb 20, 2025
b3de2b4
rewards etc
WT-MM Feb 20, 2025
7bfaf70
more smoothing, slightly easier
WT-MM Feb 20, 2025
49d8d1d
clean up
WT-MM Mar 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ isaacgym/

# dev
ref/
*.csv
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "third_party/isaacgym"]
path = third_party/isaacgym
url = ../../kscalelabs/isaacgym.git
[submodule "third_party/kinfer"]
path = third_party/kinfer
url = https://github.com/kscalelabs/kinfer.git
Binary file added examples/new.kinfer
Binary file not shown.
Binary file added examples/randomization.kinfer
Binary file not shown.
35 changes: 32 additions & 3 deletions sim/envs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,33 @@
from sim.envs.humanoids.g1_env import G1FreeEnv
from sim.envs.humanoids.gpr_config import GprCfg, GprCfgPPO, GprStandingCfg
from sim.envs.humanoids.gpr_env import GprFreeEnv
from sim.envs.humanoids.gpr_headless_config import GprHeadlessCfg, GprHeadlessCfgPPO
from sim.envs.humanoids.gpr_headless_env import GprHeadlessEnv
from sim.envs.humanoids.gpr_headless_latency_config import (
GprHeadlessLatencyCfg,
GprHeadlessLatencyCfgPPO,
)
from sim.envs.humanoids.gpr_headless_latency_env import GprHeadlessLatencyEnv
from sim.envs.humanoids.gpr_headless_pos_config import (
GprHeadlessPosCfg,
GprHeadlessPosCfgPPO,
GprHeadlessPosStandingCfg,
)
from sim.envs.humanoids.gpr_headless_pos_env import GprHeadlessPosEnv
from sim.envs.humanoids.gpr_latency_config import (
GprLatencyCfg,
GprLatencyCfgPPO,
GprLatencyStandingCfg,
)
from sim.envs.humanoids.gpr_latency_env import GprLatencyEnv
from sim.envs.humanoids.gpr_vel_config import GprVelCfg, GprVelCfgPPO
from sim.envs.humanoids.gpr_vel_env import GprVelEnv
from sim.envs.humanoids.h1_config import H1Cfg, H1CfgPPO
from sim.envs.humanoids.h1_env import H1FreeEnv
from sim.envs.humanoids.xbot_config import XBotCfg, XBotCfgPPO
from sim.envs.humanoids.xbot_env import XBotLFreeEnv
from sim.envs.humanoids.zbot2_config import ZBot2Cfg, ZBot2CfgPPO, ZBot2StandingCfg
from sim.envs.humanoids.zbot2_env import ZBot2Env
from sim.envs.humanoids.zeroth_config import ZerothCfg, ZerothCfgPPO
from sim.envs.humanoids.zeroth_env import ZerothEnv
from sim.utils.task_registry import TaskRegistry # noqa: E402

task_registry = TaskRegistry()
Expand All @@ -33,4 +52,14 @@
task_registry.register("XBotL_free", XBotLFreeEnv, XBotCfg(), XBotCfgPPO())
task_registry.register("zbot2", ZBot2Env, ZBot2Cfg(), ZBot2CfgPPO())
task_registry.register("zbot2_standing", ZBot2Env, ZBot2StandingCfg(), ZBot2CfgPPO())
task_registry.register("zeroth", ZerothEnv, ZerothCfg(), ZerothCfgPPO())
task_registry.register("gpr_headless", GprHeadlessEnv, GprHeadlessCfg(), GprHeadlessCfgPPO())
task_registry.register("gpr_latency", GprLatencyEnv, GprLatencyCfg(), GprLatencyCfgPPO())
task_registry.register("gpr_latency_standing", GprLatencyEnv, GprLatencyStandingCfg(), GprLatencyCfgPPO())
task_registry.register(
"gpr_headless_latency", GprHeadlessLatencyEnv, GprHeadlessLatencyCfg(), GprHeadlessLatencyCfgPPO()
)
task_registry.register("gpr_vel", GprVelEnv, GprVelCfg(), GprVelCfgPPO())
task_registry.register("gpr_headless_pos", GprHeadlessPosEnv, GprHeadlessPosCfg(), GprHeadlessPosCfgPPO())
task_registry.register(
"gpr_headless_pos_standing", GprHeadlessPosEnv, GprHeadlessPosStandingCfg(), GprHeadlessPosCfgPPO()
)
1 change: 1 addition & 0 deletions sim/envs/base/base_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def __init__(self, cfg, sim_params, physics_engine, sim_device, headless):
self.num_obs = cfg.env.num_observations
self.num_privileged_obs = cfg.env.num_privileged_obs
self.num_actions = cfg.env.num_actions
self.num_joints = cfg.env.num_joints

# optimization flags for pytorch JIT
torch._C._jit_set_profiling_mode(False)
Expand Down
24 changes: 14 additions & 10 deletions sim/envs/base/legged_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def reset(self):
"""Reset all robots"""

self.reset_idx(torch.arange(self.num_envs, device=self.device))

obs, privileged_obs, _, _, _ = self.step(
torch.zeros(self.num_envs, self.num_actions, device=self.device, requires_grad=False)
)
Expand Down Expand Up @@ -412,7 +412,9 @@ def _reset_root_states(self, env_ids):
self.root_states[env_ids] = self.base_init_state
self.root_states[env_ids, :3] += self.env_origins[env_ids]
# base velocities
# self.root_states[env_ids, 7:13] = torch_rand_float(-0.05, 0.05, (len(env_ids), 6), device=self.device) # [7:10]: lin vel, [10:13]: ang vel
self.root_states[env_ids, 7:13] = torch_rand_float(
-0.05, 0.05, (len(env_ids), 6), device=self.device
) # [7:10]: lin vel, [10:13]: ang vel
if self.cfg.asset.fix_base_link:
self.root_states[env_ids, 7:13] = 0
self.root_states[env_ids, 2] += 1.8
Expand Down Expand Up @@ -521,13 +523,13 @@ def _init_buffers(self):
)
self.forward_vec = to_torch([1.0, 0.0, 0.0], device=self.device).repeat((self.num_envs, 1))
self.torques = torch.zeros(
self.num_envs, self.num_actions, dtype=torch.float, device=self.device, requires_grad=False
self.num_envs, self.num_joints, dtype=torch.float, device=self.device, requires_grad=False
)
self.p_gains = torch.zeros(
self.num_envs, self.num_actions, dtype=torch.float, device=self.device, requires_grad=False
self.num_envs, self.num_joints, dtype=torch.float, device=self.device, requires_grad=False
)
self.d_gains = torch.zeros(
self.num_envs, self.num_actions, dtype=torch.float, device=self.device, requires_grad=False
self.num_envs, self.num_joints, dtype=torch.float, device=self.device, requires_grad=False
)
self.actions = torch.zeros(
self.num_envs, self.num_actions, dtype=torch.float, device=self.device, requires_grad=False
Expand Down Expand Up @@ -612,11 +614,13 @@ def _prepare_reward_function(self):

# remove zero scales + multiply non-zero ones by dt
for key in list(self.reward_scales.keys()):
scale = self.reward_scales[key]
if scale == 0:
self.reward_scales.pop(key)
else:
self.reward_scales[key] *= self.dt
if key != "termination":
scale = self.reward_scales[key]
if scale == 0:
self.reward_scales.pop(key)
else:
self.reward_scales[key] *= self.dt

# prepare list of functions
self.reward_functions = []
self.reward_names = []
Expand Down
Loading