-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem Description
in mpc_utils.py
hip = jnp.tile(p, n_contact) + foot0 @ jax.scipy.linalg.block_diag(*([Ryaw] * n_contact)).T
The variable is named hip
but actually computes foot positions in global coordinates, not hip joint positions. This causes:
- Semantic mismatch and confusion
- Poor code readability
- Maintenance difficulties
What the calculation does
p
: Robot base position in global framefoot0
: Foot positions in local coordinatesRyaw
: Base yaw rotation matrix- Result: Foot positions in global frame
Proposed Solution
Rename the variable to accurately reflect its purpose:
# Recommended
foot_global_pos = jnp.tile(p, n_contact) + foot0 @ jax.scipy.linalg.block_diag(*([Ryaw] * n_contact)).T
# Alternative
feet_world_positions = jnp.tile(p, n_contact) + foot0 @ jax.scipy.linalg.block_diag(*([Ryaw] * n_contact)).T
Labels
bug
code quality
good first issue
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request