Replies: 3 comments
-
Thanks for posting this. Could you verify that the input of the command manager is correct, verify the mapping for the keys is ok? |
Beta Was this translation helpful? Give feedback.
-
@RandomOakForest Thanks for your suggestion. By
The values get set in IsaacLab/scripts/demos/h1_locomotion.py Line 148 in 6183e15 I managed to stabilize the movement a bit by changing these lines. I don't fully understand what values to put where and they take values from 1 to -1. Is it possible to pass a vector of floating points instead of binding the buttons to a fixed vector? Kindly advise, I am new to this
|
Beta Was this translation helpful? Give feedback.
-
Thank you for following up. I will move this to our Discussions section. A summary that I'm still reviewing with a few things to consider follows. The original H1 control tensor # [forward_vel, lateral_vel, vertical_vel, yaw_rate]
self._key_to_control = {
"UP": [T, 0, 0, 0], # Forward
"LEFT": [T, 0, 0, -R], # Forward + CCW rotation
"RIGHT": [T, 0, 0, R] # Forward + CW rotation
} This works for bipeds because:
For stable quadruped turning: # Recommended structure for ANYmal:
# [lin_vel_x, lin_vel_y, lin_vel_z, ang_vel_z]
self._key_to_control = {
"UP": [T, 0, 0, 0], # Forward
"LEFT": [0, S, 0, -R], # Lateral left + CCW rotation
"RIGHT": [0, -S, 0, R] # Lateral right + CW rotation
} Where:
Critical Implementation Differences
# Bad (H1 style):
"LEFT": [T, 0, 0, -R] # Combines forward + yaw
# Good (Anymal):
"LEFT": [0, S, 0, -R] # Pure lateral + yaw # Example from ANYmal rough terrain policy
command:
lin_vel_x: [-1.0, 1.0] # Forward/backward
lin_vel_y: [-0.5, 0.5] # Lateral
ang_vel_yaw: [-1.0, 1.0] # Rotation Scale commands accordingly: T = 0.5 # 50% of max forward velocity
S = 0.3 # 60% of max lateral velocity
R = 0.4 # 40% of max yaw rate
# Required for ANYmal rough terrain policy [^7][^9]
obs = [
terrain_height, # Missing in H1 implementation
base_lin_vel,
base_ang_vel,
joint_positions
] Recommended Fixes
self._key_to_control = {
"UP": torch.tensor([T, 0.0, 0.0, 0.0], device=device),
"LEFT": torch.tensor([0.0, S, 0.0, -R], device=device),
"RIGHT": torch.tensor([0.0, -S, 0.0, R], device=device),
"DOWN": torch.tensor([-T, 0.0, 0.0, 0.0], device=device),
"ZEROS": torch.zeros(4, device=device)
} # Rough terrain recommended limits
MAX_LIN_VEL = 0.8 # m/s (vs H1's 1.5 m/s)
MAX_ANG_VEL = 0.6 # rad/s (vs H1's 1.0 rad/s)
# Add to observation computation
terrain_height = self._get_terrain_height_samples()
obs = torch.cat([base_vel, ang_vel, terrain_height, joint_pos]) These changes account for the ANYmal's quadrupedal dynamics and rough terrain requirements. Monitor the lateral foot forces during turns - they should stay below 150N for stable operation 31. References Footnotes
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
I am trying to creative an intteractive demo similar to the humanoid robot as shown in https://github.com/isaac-sim/IsaacLab/blob/main/scripts/demos/h1_locomotion.py but for Anymal on Rough terrain. I modified and have the following script. Although it is working properly, selecting a robot and pressing the the UP button it is proceeding forward. But when and trying to go left or right by pressing LEFT and RIGHT buttons it is falling down.
I am guessing it has something to do with how the direction commands are specified here
IsaacLab/scripts/demos/h1_locomotion.py
Line 134 in 6183e15
Beta Was this translation helpful? Give feedback.
All reactions