Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for kbot walking setup. #9

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Conversation

alik-git
Copy link
Contributor

@alik-git alik-git commented Jan 27, 2025

this is an updated setup for kbot walking.

  • add a script to convert urdf to usd

updates:

Robot stuff:

  • updated usd for updated urdf
  • updated joint names for above usd
  • no more frozen arms
  • updated actuator configs
  • updated starting pose

Algorithm Stuff:

  • updated entropy coef for the PPO (0.005 -> 0.008)

Termination Stuff:

  • this one is still not "stable" we are experimenting with changes
  • current setup is episode terminates if anything except the feet detect a force

Randomization Stuff:

  • basically no randomization at all

Reward Stuff

  • instead of beerkely humanoid definitions, use default isaaclab definitions for following rewards
  • feet_air_time_positive_biped, feet_slide, track_lin_vel_xy_yaw_frame_exp, track_ang_vel_z_world_exp
  • comment out the beerkley definitions of those rewards in our local config (we might need them later)
  • new version of tracking xy vel and z ang vel that accounts for heading
  • current reward setup
[INFO] Reward Manager:  <RewardManager> contains 14 active terms.
+----------------------------------------------------+
|                Active Reward Terms                 |
+-------+--------------------------------+-----------+
| Index | Name                           |    Weight |
+-------+--------------------------------+-----------+
|   0   | termination_penalty            |    -200.0 |
|   1   | track_lin_vel_xy_yaw_frame_exp |       1.0 |
|   2   | track_ang_vel_z_world_exp      |       2.0 |
|   3   | lin_vel_z_l2                   |       0.0 |
|   4   | ang_vel_xy_l2                  |     -0.05 |
|   5   | joint_torques_l2               |  -1.5e-07 |
|   6   | dof_acc_l2                     | -1.25e-07 |
|   7   | action_rate_l2                 |    -0.005 |
|   8   | feet_air_time_positive_biped   |      0.25 |
|   9   | feet_slide                     |      -0.1 |
|   10  | dof_pos_limits                 |      -1.0 |
|   11  | joint_deviation_arms           |      -0.1 |
|   12  | joint_deviation_hip            |      -0.1 |
|   13  | flat_orientation_l2            |      -1.0 |
+-------+--------------------------------+-----------+

Observation Stuff

  • no more imu
  • current obs are as follows
[INFO] Observation Manager: <ObservationManager> contains 2 groups.
+---------------------------------------------------------+
| Active Observation Terms in Group: 'policy' (shape: (66,)) |
+-----------+---------------------------------+-----------+
|   Index   | Name                            |   Shape   |
+-----------+---------------------------------+-----------+
|     0     | velocity_commands               |    (3,)   |
|     1     | projected_gravity               |    (3,)   |
|     2     | joint_pos                       |   (20,)   |
|     3     | joint_vel                       |   (20,)   |
|     4     | actions                         |   (20,)   |
+-----------+---------------------------------+-----------+
+----------------------------------------------------------+
| Active Observation Terms in Group: 'critic' (shape: (259,)) |
+-----------+--------------------------------+-------------+
|   Index   | Name                           |    Shape    |
+-----------+--------------------------------+-------------+
|     0     | base_lin_vel                   |     (3,)    |
|     1     | base_ang_vel                   |     (3,)    |
|     2     | projected_gravity              |     (3,)    |
|     3     | velocity_commands              |     (3,)    |
|     4     | joint_pos                      |    (20,)    |
|     5     | joint_vel                      |    (20,)    |
|     6     | actions                        |    (20,)    |
|     7     | height_scan                    |    (187,)   |
+-----------+--------------------------------+-------------+

@alik-git alik-git marked this pull request as draft January 27, 2025 04:01
@alik-git alik-git changed the title Updates for both zbot and kbot Updates for kbot walking setup. Jan 27, 2025
@alik-git alik-git marked this pull request as ready for review January 27, 2025 20:14
@@ -58,28 +58,43 @@
max_depenetration_velocity=1.0,
),
articulation_props=sim_utils.ArticulationRootPropertiesCfg(
enabled_self_collisions=True, solver_position_iteration_count=4, solver_velocity_iteration_count=0
enabled_self_collisions=True,
solver_position_iteration_count=8,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unitree's velocity solver has 4 steps fyi.

        articulation_props=sim_utils.ArticulationRootPropertiesCfg(
            enabled_self_collisions=False, solver_position_iteration_count=8, solver_velocity_iteration_count=4
        ),
    ),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm not sure what solver does/is. put a TODO to try 4 steps

# Unify joints and use positions
joint_pos = ObsTerm(
func=mdp.joint_pos_rel,
noise=Unoise(n_min=-0.05, n_max=0.05),
noise=Unoise(n_min=-0.01, n_max=0.01),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Increase default ones.

func=mdp.generated_commands, params={"command_name": "base_velocity"}
)

# kscale_imu_euler = ObsTerm(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove if unused?

@configclass
class RandomizationCfg:
class EventsCfg:
"""Configuration for randomization."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you adding randomization in the PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, everything is zeroed out, its a TODO to increase the params to see how robust it can be

print(f"- Props: {dst_meshes}")

while True:
print("\nHow would you like to proceed?")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make it run through config.

@alik-git
Copy link
Contributor Author

great feedback thank you, I will get through this after mujoco integration

Copy link
Member

@WT-MM WT-MM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does isaaclab have latency for stuff? experimenting with sensor, motor, and command latency in isaacgym rn

@alik-git
Copy link
Contributor Author

alik-git commented Feb 5, 2025

Not built in, no. I could only find this convo about it

isaac-sim/IsaacLab#431

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants