Lab 5 - Virtual Twin

Mini-lecture - TBD

  • Video: Available soon

Lab instructions

These instructions assume you are running mac or linux. If you have Windows 10 or lower, I recommend dual-booting linux. If you have Windows 11, try using the Windows Linux Subsystem

Step 1. Set up simulation environment

  1. Clone the simulator repository git clone https://github.com/jietan/puppersim.git

  2. Follow the instructions in the Conda setup link section and Getting the code ready section of the puppersim README.

  3. Install dependencies pip3 install numpy transforms3d pyserial. Use pip if pip3 doesn’t work.

Step 2. Try out the simulator

  1. Follow the instructions in the Simulating the heuristic controller section.

  2. Check out these keyboard controls:
    • wasd: –> moves robot forward/back left/right.

    • arrow keys: –> turns robot left/right

    • q: –> activates robot

    • e: –> starts trotting

    • ijkl: –> tilts robot

  3. To activate the robot, press q. To start trotting, press e.

  4. Enjoy the simulator!

  5. To close the simulator, do not press use the usual close button in the top left of the simulator window. Instead do Ctrl-C in both terminal tabs/windows.

Expected result:

../_images/sim.png

Expected simulator window.

../_images/terminal.png

Expected output from python3 run_djipupper_sim.py.

Step 4. Experiment

  1. Try changing self.overlap_time (line 52) in StanfordQuadruped/djipupper/Config.py. This controls the amount of time in which all four legs are on the ground for the trot.

  2. Try changing self.swing_time (line 53) in StanfordQuadruped/djipupper/Config.py. This controls the amount of time in which just two legs are on the ground for the trot.

  3. Mess around with other things [tbd]