SwayForm/Learning Hub
Learning Hub/Student Labs

Student Labs

Student labs are guided activities where students edit code, run the robot, observe the result, and answer a short reflection question. Begin with 10 structured labs, with the curriculum expanding to 40.

Available now (Level 1 — Control)

Planned (Levels 2–4)

30 more labs are planned to complete the 40-lab curriculum. Level 2 working titles are listed below; Level 3 and 4 titles will be finalized as development continues — see Curriculum for the full roadmap.

11
Simple State Machines
12
Custom Motion Presets
13
Camera-Based User Greeting
14
Object Position Mapping
15
Two-Arm Coordination
16
Speaker Prompts and Timing
17
Classroom Challenge: Helpful Robot
18
Intro to Robot Debug Logs
19
Build Your Own Interaction
20
Final Showcase Demo
21–30
Level 3 — Perceive: vision, tracking, state design
31–40
Level 4 — Create: original project, final showcase

Lab 01: Hello Robot Motion

Status Available
Level Beginner
Time 20–30 minutes

Goal: Run your first safe robot motion and understand that code sends target positions to robot joints.

What students edit: Students change a small motion value or timing value after running the starter version.

Concepts

  • Motion commands
  • Neutral pose
  • Safe movement
  • Terminal command
  • Observation before editing

Starter command

Terminal
ros2 run swayform_labs lab_01_hello_motion

Steps

  1. Connect to the robot through VS Code and SSH.
  2. Open the lab file in your student project.
  3. Run the starter command without editing anything.
  4. Observe which part of the robot moves.
  5. Change one allowed value.
  6. Submit through the queue and wait for approval.
  7. Return the robot to idle.

Expected result

The robot performs a small safe motion, such as moving an arm or head, then returns to a neutral pose.

Reflection question

What changed physically when you changed the code value?

Extension challenge

Add a second safe motion after the first one, then return the robot to idle.

Lab 02: Servo Angles and Safe Limits

Status Available
Level Beginner
Time 25–35 minutes

Goal: Understand that each joint has safe angle limits and that robot motion should stay inside tested ranges.

What students edit: Students adjust allowed servo target values inside a provided safe range.

Concepts

  • Servo range
  • Joint limits
  • Mechanical safety
  • Angle values
  • Safe testing

Starter command

Terminal
ros2 run swayform_labs lab_02_servo_limits

Steps

  1. Open the lab file and find the safe angle range.
  2. Run the starter motion.
  3. Change the angle slightly within the allowed range.
  4. Run the motion again.
  5. Compare small changes to larger changes.
  6. Return the joint to neutral.
  7. Write down why random angles are unsafe.

Expected result

Students see that small code changes can create visible joint movement, but only within safe mechanical limits.

Reflection question

Why should a robot program use safe limits instead of sending any angle directly to a servo?

Extension challenge

Create a helper function that rejects values outside the safe range.

Lab 03: Build a Gesture Sequence

Status Available
Level Beginner+
Time 30–40 minutes

Goal: Create a small gesture by combining multiple safe poses with timing delays.

What students edit: Students reorder poses, adjust delays, and add one extra gesture step.

Concepts

  • Sequences
  • Timing
  • Poses
  • Reusable functions
  • Human-readable robot behavior

Starter command

Terminal
ros2 run swayform_labs lab_03_gesture_sequence

Steps

  1. Run the starter gesture.
  2. Identify each pose in the sequence.
  3. Change one delay value.
  4. Add one new pose from the provided safe pose list.
  5. Run the new sequence.
  6. Check whether the gesture still looks smooth.
  7. Return the robot to idle.

Expected result

The robot performs a short custom gesture using multiple poses.

Reflection question

How does timing change the way a robot gesture feels to a person watching it?

Extension challenge

Create two versions of the same gesture: one that looks calm and one that looks excited.

Lab 04: Head Tracking Basics

Status Available
Level Beginner+
Time 30–45 minutes

Goal: Move the robot head left, center, or right based on a simple target position.

What students edit: Students adjust zone thresholds and head yaw values.

Concepts

  • Neck yaw
  • Neck pitch
  • Camera target position
  • Mapping input to motion
  • Simple tracking behavior

Starter command

Terminal
ros2 run swayform_labs lab_04_head_tracking

Steps

  1. Run the starter head tracking script.
  2. Move the target between left, center, and right zones.
  3. Observe how the head responds.
  4. Change one threshold value.
  5. Change one head yaw value within the safe range.
  6. Run the script again.
  7. Return the head to center.

Reflection question

What is the difference between detecting where something is and deciding how far the robot should move?

Extension challenge

Add a small delay so the head movement feels smoother and less twitchy.

Lab 05: Button-to-Motion Control

Status Available
Level Beginner+
Time 25–40 minutes

Goal: Connect a keyboard input or simple button event to a robot motion.

What students edit: Students map different inputs to different safe robot actions.

Concepts

  • Events
  • Input handling
  • Calling robot actions
  • Safety stop
  • Simple control interface

Starter command

Terminal
ros2 run swayform_labs lab_05_button_motion

Steps

  1. Run the starter input script.
  2. Press the provided key to trigger a motion.
  3. Find where the input is checked in the code.
  4. Add a second input option.
  5. Map the second input to a different safe pose.
  6. Test both inputs.
  7. Use the stop key before ending the lab.

Reflection question

Why is it useful to separate input handling from the actual robot motion function?

Extension challenge

Add a simple menu that shows which keys trigger which motions.

Lab 06: RealSense Detection Basics

Status Available
Level Intermediate
Time 35–45 minutes

Goal: Use RealSense camera data as a trigger for a simple robot behavior.

What students edit: Students adjust a detection zone or distance threshold.

Concepts

  • Camera input
  • Detection zones
  • Depth and distance
  • Perception-triggered motion
  • False positives

Starter command

Terminal
ros2 run swayform_labs lab_06_realsense_detection

Steps

  1. Start the camera-based lab.
  2. Place a target or user inside the detection area.
  3. Observe when the robot triggers a response.
  4. Adjust the detection distance or zone.
  5. Run the test again.
  6. Compare reliable and unreliable trigger conditions.
  7. Return the robot to idle.

Reflection question

Why should camera-based triggers be conservative when the robot is near people?

Extension challenge

Add a timeout so the robot returns to idle if the target disappears.

Lab 07: Hand Pose Timing

Status Available
Level Intermediate
Time 30–45 minutes

Goal: Adjust hand and finger timing to understand how small delays affect robot gestures.

What students edit: Students change finger pose timing, open/close delays, or gesture order.

Concepts

  • Finger servo poses
  • Timing
  • Grip and release
  • Gesture realism
  • Small motion changes

Starter command

Terminal
ros2 run swayform_labs lab_07_hand_pose_timing

Steps

  1. Run the starter hand pose.
  2. Observe how quickly the fingers move.
  3. Change one timing delay.
  4. Run the gesture again.
  5. Change the order of two finger movements.
  6. Compare which version looks more natural.
  7. Return the hand to relaxed pose.

Reflection question

Why can timing make a robot motion feel more natural even if the final pose is the same?

Extension challenge

Create a small hand gesture that looks like a count-in or signal.

Lab 08: Base Rotation Basics

Status Available
Level Intermediate
Time 30–45 minutes

Goal: Command the robot's rotating base to turn left or right safely.

What students edit: Students adjust direction, duration, or speed values inside safe limits.

Concepts

  • Base yaw
  • Motor control
  • Direction
  • Speed
  • Stop command

Starter command

Terminal
ros2 run swayform_labs lab_08_base_rotation

Steps

  1. Make sure the robot base area is clear.
  2. Run the starter base rotation command.
  3. Observe direction and stopping behavior.
  4. Change the direction.
  5. Change the duration slightly.
  6. Run the test again.
  7. Send the stop command.

Reflection question

Why should base motion always include a clear stop condition?

Extension challenge

Create a turn-left, pause, turn-right sequence.

Lab 09: Behavior Priority and Motion Locking

Status Available
Level Intermediate
Time 35–45 minutes

Goal: Understand why one robot behavior should not interrupt another motion at the wrong time.

What students edit: Students test simple behavior priority rules and see how a motion lock protects a running action.

Concepts

  • Motion lock
  • Behavior priority
  • State control
  • Safe cancellation
  • Competing commands

Starter command

Terminal
ros2 run swayform_labs lab_09_motion_locking

Steps

  1. Run the starter behavior.
  2. Trigger a second behavior while the first is active.
  3. Observe whether the second behavior is blocked or delayed.
  4. Find the motion lock in the code.
  5. Change the priority of one behavior.
  6. Run the test again.
  7. Return the robot to idle.

Reflection question

What could go wrong if two scripts tried to control the same arm at the same time?

Extension challenge

Add a low-priority idle behavior that pauses when a higher-priority demo starts.

Lab 10: Mini Demo Challenge

Status Available
Level Intermediate
Time 40–60 minutes

Goal: Combine motion, timing, and optional perception into a small custom robot demo.

What students edit: Students create their own short behavior using safe poses and at least one idea from earlier labs.

Concepts

  • Project planning
  • Code reuse
  • Debugging
  • Demo presentation
  • Behavior design

Starter command

Terminal
ros2 run swayform_labs lab_10_mini_demo_challenge

Steps

  1. Choose a simple demo idea.
  2. Pick which robot parts will move.
  3. Start from a provided safe template.
  4. Add two or more motion steps.
  5. Add timing between steps.
  6. Test one part at a time.
  7. Prepare a short explanation of how the demo works.

Expected result

Students build and run a short custom robot behavior that they can explain.

Reflection question

What part of your demo was easiest to control, and what part needed the most debugging?

Extension challenge

Add camera input or user input to trigger the demo.