Skip to content

Session 17: Documentation & Portfolio Submission

Week: 17 Element: ICTPRG430 Element 3.1, ICTPRG439 Element 3.3 Duration: 4 hours Phase: GO2 Capstone Project


Session Introduction

This is the final session of the GO2 Capstone Project. You'll finalize your documentation, complete your portfolio evidence, and submit your work. This session focuses on professional documentation standards and reflective practice.

Good documentation is as important as good code - it ensures your work can be understood, maintained, and extended by others (including your future self).


Portfolio 2 Submission

Session 17 is your final submission opportunity for Portfolio 2. This session focuses on professional documentation, demo videos, and portfolio evidence compilation. All code development should be complete by the end of Session 16.

Learning Objectives

By the end of this session, you will be able to:

  • Document code with professional standards (README, API docs)
  • Compile portfolio evidence demonstrating competency
  • Reflect on learning journey and technical decisions
  • Present work in a clear, professional manner
  • Submit completed assessment deliverables

Session Structure

  1. README Documentation - Create comprehensive project README
  2. API Documentation - Generate and review API docs
  3. Portfolio Finalization - Complete evidence collection
  4. Reflection Writing - Technical reflection on project
  5. Submission - Final checks and submission

Part 1: README Documentation

1.1 Create Professional README

Create go2_wave/README.md:

# go2_wave Package

A ROS2 Python package for the Unitree GO2 quadruped robot, providing:
- A high-level `GO2Controller` class (wraps ROS2 services/topics)
- A `HighFiveServer` ROS2 action server for a custom high five behavior

## Overview

This package demonstrates:

- Object-oriented programming (encapsulation, methods, docstrings)
- ROS2 Actions (Goal/Feedback/Result for long-running behaviors)
- Integration with `go2_ros2_sim_py` simulation component
- Sim-to-real portability via topic remapping

## Installation

### Prerequisites

- ROS2 Jazzy (Ubuntu 24.04 in WSL2)
- Gazebo simulation (installed via `~/go_sim/go2_sim_setup.sh`)
- `quadropted_msgs` (included in `go2_ros2_sim_py`)

### Build

```bash
cd ~/go_sim/src
git clone <your-repo-url> go2_wave
cd ~/go_sim
colcon build --packages-select go2_wave
source ~/go_sim/go2_sim.env

Usage

Basic Example

import rclpy
from go2_wave.controller import GO2Controller

rclpy.init()
controller = GO2Controller('robot1')

controller.stand()
controller.sit()

controller.destroy_node()
rclpy.shutdown()

Running the High Five Action

# Terminal 1: Start simulation
source ~/go_sim/go2_sim.env
ros2 launch gazebo_sim launch.py

# Terminal 2: Start the action server
ros2 run go2_wave high_five_server

# Terminal 3: Send a goal (or use your high_five_client)
ros2 action send_goal --feedback /high_five go2_wave/action/HighFive \
  "{target_height: 0.4, hold_seconds: 2}"

Sim-to-Real (topic remapping)

# On real robot hardware, remap topics to match simulator interface
ros2 run go2_wave high_five_server \
  --ros-args \
  --remap /robot1/joint_states:=/go2/joint_states \
  --remap /robot1/joint_command:=/go2/joint_command

API Reference

GO2Controller

Constructor

  • GO2Controller(namespace: str = "robot1") — Create controller for specified robot

Methods

Method Description Returns
sit() Make robot sit down bool
stand() Make robot stand bool
walk() Enable walking mode bool
move(linear_x, angular_z) Send velocity command None
stop() Stop all movement None

Properties

Property Description Type
is_ready Check if controller ready bool

HighFiveServer (Action)

Action name: /high_five
Action type: go2_wave/action/HighFive

Goal

Field Type Description
target_height float32 How high to raise the front leg
hold_seconds int32 How long to hold the raised position

Feedback

Field Type Description
phase string "raising", "ready", "lowering", "complete"
progress float32 0.0 → 1.0

Result

Field Type Description
success bool True if behavior completed
message string Status message

Configuration

Behavior parameters via config/go2_params.yaml:

high_five_server:
  ros__parameters:
    high_five:
      default_target_height: 0.4
      default_hold_seconds: 2
      raise_duration: 1.0
      lower_duration: 0.8

Testing

# Unit tests
colcon test --packages-select go2_wave
colcon test-result --verbose

# Integration test
python3 src/go2_wave/scripts/integration_test.py

Architecture

go2_wave/
├── go2_wave/
│   ├── __init__.py
│   ├── controller.py          # GO2Controller class
│   └── high_five_server.py    # HighFiveServer action server
├── action/
│   └── HighFive.action        # Custom action definition
├── config/
│   └── go2_params.yaml
├── launch/
│   └── high_five.launch.py    # Launch with remap support
├── scripts/
│   ├── high_five_client.py    # Action client demo
│   └── integration_test.py
├── test/
│   └── test_controller.py
├── package.xml
├── setup.py
└── README.md

Dependencies

  • rclpy — ROS2 Python client library
  • geometry_msgs — Twist for velocity commands
  • sensor_msgs — JointState messages
  • quadropted_msgs — Custom GO2 service definitions
  • go2_ros2_sim_py — Simulation runtime

Author

[Your Name]

License

[Your License]

### 1.2 Add CHANGELOG

Create `go2_wave/CHANGELOG.md`:

```markdown
# Changelog

All notable changes to this project are documented here.

## [1.0.0] - YYYY-MM-DD

### Added
- `GO2Controller` class: sit, stand, walk, move, stop
- `HighFive.action` — custom ROS2 action definition
- `HighFiveServer` — action server with Goal/Feedback/Result
- `HighFiveClient` — action client demo
- Action cancellation handling with safe robot recovery
- ROS2 parameter support via `config/go2_params.yaml`
- Launch file with topic remap support for sim-to-real
- Integration tests verifying full action sequence
- Unit tests with mocked ROS2 interfaces

### Technical Details
- Built on ROS2 Jazzy, Ubuntu 24.04 (WSL2)
- Tested with Gazebo Harmonic simulation
- Compatible with prgrobots/go2_ros2_sim_py

Part 2: Portfolio Evidence

2.1 Complete Evidence Document

Finalize your PORTFOLIO-EVIDENCE.md with:

  1. All required screenshots with captions
  2. Code snippets for key implementations
  3. Test results showing all tests passing
  4. Video link to demonstration

2.2 Evidence Checklist

ICTPRG430 - Object-Oriented Programming:

Element Evidence Collected
2.1 Create classes GO2Controller class definition
2.1 Encapsulation Private attributes/methods
2.2 Implement methods HighFiveServer._execute_callback
2.2 Custom action HighFive.action definition
2.2 Documentation Docstrings with type hints
2.3 Testing Unit tests passing
2.3 Debugging Integration test with feedback output

ICTPRG439 - Component Integration:

Element Evidence Collected
1.1 Requirements Component evaluation notes
2.1 Integration quadropted_msgs dependency in package.xml
2.1 Wrapper code GO2Controller service client usage
3.2 Testing Integration test results
3.2 Verification Simulation demo with feedback phases visible
3.3 Documentation README and API docs

2.3 Evidence Organization

Organize your portfolio folder:

portfolio/
├── README.md                    # Evidence index
├── PORTFOLIO-EVIDENCE.md        # Main evidence document
├── screenshots/
│   ├── 01-controller-class.png
│   ├── 02-highfive-action-def.png
│   ├── 03-action-server-impl.png
│   ├── 04-unit-tests-pass.png
│   ├── 05-integration-test-feedback.png
│   └── 06-simulation-demo.png
├── code/
│   ├── controller.py
│   ├── high_five_server.py
│   └── test_controller.py
└── video/
    └── high-five-demo.mp4       # Or link to cloud video

Part 3: Technical Reflection

3.1 Reflection Questions

Write 300-500 words addressing:

  1. Design Decisions
  2. Why did you structure the class the way you did?
  3. What trade-offs did you make?
  4. What would you do differently?

  5. Challenges Faced

  6. What was the hardest part of the project?
  7. How did you solve unexpected problems?
  8. What debugging techniques were most useful?

  9. Learning Outcomes

  10. What new skills did you develop?
  11. How did this project connect theory to practice?
  12. What would you like to explore further?

  13. Professional Growth

  14. How did you apply software engineering practices?
  15. What documentation habits will you continue?
  16. How has your approach to testing changed?

3.2 Reflection Template

# Technical Reflection: GO2 High Five Project

## Design Decisions

When designing the GO2Controller and HighFiveServer, I chose to...

Using an Action instead of a Service made sense because...

The main trade-off I made was...

If I were to redo this project, I would...

## Challenges and Solutions

The most challenging aspect was...

I solved this by...

The debugging technique that helped most was...

## Learning Outcomes

Through this project, I learned to...

This connected to earlier course concepts by...

I would like to explore further...

## Professional Growth

I applied professional practices including...

I will continue the habit of...

My approach to testing has changed because...

Part 4: Final Submission

4.1 Submission Checklist

Before submitting, verify:

Item Location Complete
Source code go2_wave/ package
HighFive.action action/HighFive.action
README.md Package root
Unit tests test/test_controller.py
Integration tests scripts/integration_test.py
Config file config/go2_params.yaml
Launch file launch/high_five.launch.py
Portfolio evidence portfolio/ folder
Technical reflection In portfolio
Demo video Linked in portfolio

4.2 Code Quality Check

Run final checks:

cd ~/go_sim

# Build without warnings
colcon build --packages-select go2_wave 2>&1 | grep -i warning

# All tests pass
colcon test --packages-select go2_wave
colcon test-result --verbose

# Code style
flake8 src/go2_wave/go2_wave/ --count --show-source

# Documentation check
python3 -c "from go2_wave.controller import GO2Controller; help(GO2Controller)"
python3 -c "from go2_wave.high_five_server import HighFiveServer; help(HighFiveServer)"

4.3 Submission Format

Package your submission:

cd ~/go_sim/src

# Create submission archive
tar -czvf go2_wave_submission.tar.gz go2_wave/ portfolio/

# Verify contents
tar -tzf go2_wave_submission.tar.gz | head -20

4.4 Submit

Submit via your institution's submission system: 1. Upload go2_wave_submission.tar.gz 2. Include any required cover sheets 3. Verify submission receipt


Part 5: Demonstration (Optional)

5.1 Live Demo Preparation

If presenting to class:

  1. Test full sequence before presentation
  2. Have backup video in case of technical issues
  3. Prepare talking points:
  4. What problem does this solve?
  5. How does the class design work?
  6. What's interesting about the high five behavior?
  7. What would you add if you had more time?

5.2 Demo Script

"This is the go2_wave package — a ROS2 Python package for 
controlling the Unitree GO2 quadruped robot.

There are two main components:
- GO2Controller: wraps ROS2 services in a clean Python API
- HighFiveServer: a ROS2 action server for a high five behavior

Let me show you the high five action..."

[Start action server and send goal]

"The action server uses Goal/Feedback/Result — unlike a service,
it sends back progress updates as the robot executes each phase:
raising, ready, then lowering.

It also handles cancellation — if I cancel mid-execution,
the robot safely returns to standing.

And the same action server works on the real GO2 dog — 
we just remap the topic names at launch time.

Questions?"

Summary

You have completed the GO2 Capstone Project! You've demonstrated:

  • ICTPRG430: Object-oriented programming through class design, encapsulation, ROS2 action server implementation, documentation, and testing
  • ICTPRG439: Component integration through evaluating, integrating, and testing the go2_ros2_sim_py component

What's Next?

Possible extensions for future work: - Add more behaviors (spin, bow, dance) - Implement real robot deployment - Create a behavior sequencer - Add voice control with speech recognition - Integrate computer vision for reactive behaviors


← Week 16 - Integration | Learning Plan