Unverified Commit 36ad090d authored by AutonomousHansen's avatar AutonomousHansen Committed by GitHub

Fixes duplicate robots in the quadruped demo (#298)

Removes 2 repeated quadrupeds and increased scaling factor of random joint
movements so that they are visually apparent

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./orbit.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent ffd9a163
...@@ -106,16 +106,6 @@ def design_scene() -> tuple[dict, list[list[float]]]: ...@@ -106,16 +106,6 @@ def design_scene() -> tuple[dict, list[list[float]]]:
# -- Robot # -- Robot
unitree_go2 = Articulation(UNITREE_GO2_CFG.replace(prim_path="/World/Origin6/Robot")) unitree_go2 = Articulation(UNITREE_GO2_CFG.replace(prim_path="/World/Origin6/Robot"))
# Origin 5 with Unitree Go1
prim_utils.create_prim("/World/Origin5", "Xform", translation=origins[4])
# -- Robot
unitree_go1 = Articulation(UNITREE_GO1_CFG.replace(prim_path="/World/Origin5/Robot"))
# Origin 6 with Unitree Go2
prim_utils.create_prim("/World/Origin6", "Xform", translation=origins[5])
# -- Robot
unitree_go2 = Articulation(UNITREE_GO2_CFG.replace(prim_path="/World/Origin6/Robot"))
# return the scene information # return the scene information
scene_entities = { scene_entities = {
"anymal_b": anymal_b, "anymal_b": anymal_b,
...@@ -156,7 +146,7 @@ def run_simulator(sim: sim_utils.SimulationContext, entities: dict[str, Articula ...@@ -156,7 +146,7 @@ def run_simulator(sim: sim_utils.SimulationContext, entities: dict[str, Articula
# apply default actions to the quadrupedal robots # apply default actions to the quadrupedal robots
for robot in entities.values(): for robot in entities.values():
# generate random joint positions # generate random joint positions
joint_pos_target = robot.data.default_joint_pos + torch.randn_like(robot.data.joint_pos) * 0.01 joint_pos_target = robot.data.default_joint_pos + torch.randn_like(robot.data.joint_pos) * 0.1
# apply action to the robot # apply action to the robot
robot.set_joint_position_target(joint_pos_target) robot.set_joint_position_target(joint_pos_target)
# write data to sim # write data to sim
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment