1 of 13

Lab 2: Bad Robot Surgeon

Ankush and Jaden

CS 123

2 of 13

Inspiration

2

3 of 13

Lab Overview

Lab Spec and Document detailed in Course Website

Part One: Bad Robot Surgeon

  1. Build two robot arms (Per Group)
    1. Follow YouTube videos
  2. Configure your arms to work in a leader/follower setup (As a group)
  3. Make the arms bidirectional (As a group)

Part Two: Forward Kinematics

  1. Program forward kinematics (As a group)
  2. Create a safety box
  3. Program haptic feedback (As a group)

3

4 of 13

Quick Tips

Safety

    • Be careful about your computers next to hardware, the arm may start slapping back and forth

Building the Robot Arms

  • NOTE: the video makes a right and a left leg, be sure to make two right-sided legs instead
    • 3D printed parts are engraved with R and L
    • Square screw nuts must be perfectly aligned - do not use brute force or you may break the parts
    • When calibrating the motors, make sure to calibrate before the legs are attached so make sure that they are calibrated correctly without any load

4

5 of 13

Quick Tips

Forward Kinematics

    • FK is implemented in the kinematics.h file. Use that when writing FK
    • In the FK function, you should return a BLA::Matrix<3> for the cartesian coordinates as x, y, z. Always keep in mind the coordinate frame (Slide 38 of FK Lecture)
    • Remember to use C++ syntax
    • We suggest decomposing this function into smaller pieces for testing and readability, do it as makes sense to you. For example, Solve FK one joint at a time

5

6 of 13

Quick Tips

Initialization

    • Always initialize vertically, with the same reference to the PCB

CAN Bus

    • There are two CAN buses for the Pupper, that help the Teensy communicate with the motor controllers
    • Check the top of main.cpp to see how these are initialized

6

CAN 2 bus_back

(IDs 1-3)

CAN 1 bus_front

(IDs 1-3)

7 of 13

Deliverables

All deliverables are marked in bold. Keep these in mind as you progress through the lab, taking videos as you complete milestones

    • Once you are done, upload all deliverables (outlined in Lab document) to Gradescope in a zip file
      1. Lab Document answers
      2. Videos
      3. Completed code

7

8 of 13

Please ask the TAs if you have any questions, and come to OH if you need help/more time

Thanks, and have fun!

Due Date: 1:30pm, October 16

8

Jasmyn Lopez

Megan Liu

Elijah Kim

Mikul Rai

Brian Amaro

Rohan Cherivirala

Jason Lin

Jack Le

Jeremy Tian

Jasmine Bilir

Nattakit Tankongchamruskul

Akemi Sabatier

Katherine Wong

Abhinav Sinha

Akemi Sabatier

Ashna Khetan

Zara Rutherford

Ethan Hans Harianto

Viraj Mehta

Evan Saracay

Zachary Cadiz

Siddharth Potti

Flora Huang

Daniel Acks

1

2

5

4

3

6

9 of 13

TA Checklist

  • Kits unassebled
  • Screwdrivers
  • USB-Teensy adapters
  • Send a form for the prereqs
  • Working demo of each lab before lab times

9

10 of 13

10

11 of 13

11

12 of 13

12

13 of 13

13