BASCORRO
Getting Started

System Architecture

Arsitektur sistem dan struktur ROS 2 nodes BASCORRO

System Architecture

Dokumentasi arsitektur sistem robot BASCORRO, termasuk struktur workspace, ROS 2 nodes, dan aliran data.


Workspace Structure

motion_webots/
├── ros_ws/                    # ROS 2 Workspace
│   ├── src/                   # Source packages
│   │   ├── ROBOTIS-OP3/       # OP3 control modules
│   │   ├── ROBOTIS-OP3-Common/       # Shared utilities
│   │   ├── ROBOTIS-OP3-msgs/         # Message definitions
│   │   ├── ROBOTIS-OP3-Simulations/  # Webots/Gazebo
│   │   ├── ROBOTIS-OP3-Tools/        # Utilities
│   │   ├── humanoid_navigation/      # Localization
│   │   ├── soccer_vision/            # Vision system
│   │   └── walking_imu_to_odometry/  # Odometry
│   ├── build/                 # Build artifacts
│   ├── install/               # Installed packages
│   └── log/                   # Build/test logs
├── run/                       # Launch scripts
├── assets/                    # Images, resources
└── README.md

High-Level Architecture

┌─────────────────────────────────────────────────────────────┐
│                         BASCORRO                            │
├─────────────────────────────────────────────────────────────┤
│  ┌─────────┐  ┌──────────┐  ┌──────────┐  ┌─────────────┐  │
│  │ Vision  │→ │ Strategy │→ │ Motion   │→ │  Hardware   │  │
│  │ System  │  │    AI    │  │ Control  │  │  Interface  │  │
│  └─────────┘  └──────────┘  └──────────┘  └─────────────┘  │
│       ↑                                          ↓          │
│  ┌─────────┐                              ┌─────────────┐   │
│  │ Camera  │                              │  Actuators  │   │
│  │  IMU    │←─────── Feedback ───────────│   Sensors   │   │
│  └─────────┘                              └─────────────┘   │
└─────────────────────────────────────────────────────────────┘

Core ROS 2 Packages

1. ROBOTIS-OP3 (Control Modules)

PackageFungsi
op3_managerMain controller, orchestrates all modules
op3_walking_moduleStandard walking gait
op3_online_walking_moduleReal-time walking control
op3_action_modulePre-programmed actions (kick, getup)
op3_balance_controlDynamic balance during movement
op3_head_control_moduleHead/camera pan-tilt
op3_direct_control_moduleDirect servo control
op3_kinematics_dynamicsForward/inverse kinematics

2. soccer_vision (Vision System)

soccer_vision/
├── detector_node.py     # Main vision node
├── ball_detector.py     # Ball detection (orange color)
├── field_detector.py    # Field lines, landmarks
└── launch/
    └── soccer_vision.launch.py

Features:

  • Color-based ball detection (HSV filtering)
  • Field line detection (white lines)
  • Optional YOLO integration for ML detection
  • Ground plane projection for 3D localization

3. walking_imu_to_odometry (Odometry)

Mengkonversi data IMU dan langkah kaki menjadi odometry:

# Input
- IMU data (orientation, acceleration)
- Walking step commands

# Output
- nav_msgs/Odometry (position, velocity)
- TF transforms (odom → base_link)

4. humanoid_navigation (Localization)

PackageFungsi
op3_localizationPosition estimation
humanoid_localizationProbabilistic localization
humanoid_planner_2d2D path planning
footstep_plannerFootstep sequence planning
gridmap_2dOccupancy grid for navigation

ROS 2 Node Graph

                    ┌──────────────┐
                    │   Webots     │
                    │  Simulator   │
                    └──────┬───────┘

              ┌────────────┴────────────┐
              ▼                         ▼
      ┌──────────────┐          ┌──────────────┐
      │    Camera    │          │     IMU      │
      │    Node      │          │    Node      │
      └──────┬───────┘          └──────┬───────┘
             │                         │
             ▼                         ▼
      ┌──────────────┐          ┌──────────────┐
      │ Soccer Vision│          │   Odometry   │
      │    Node      │          │    Node      │
      └──────┬───────┘          └──────┬───────┘
             │                         │
             └──────────┬──────────────┘

                ┌──────────────┐
                │   Strategy   │
                │     Node     │
                └──────┬───────┘


                ┌──────────────┐
                │   Walking    │
                │   Module     │
                └──────┬───────┘


                ┌──────────────┐
                │  Dynamixel   │
                │  Controller  │
                └──────────────┘

Key Topics

TopicTypeDeskripsi
/camera/image_rawsensor_msgs/ImageRaw camera feed
/ball_positiongeometry_msgs/PointDetected ball position
/imu/datasensor_msgs/ImuIMU measurements
/odomnav_msgs/OdometryRobot odometry
/cmd_velgeometry_msgs/TwistVelocity commands
/walking/commandCustomWalking step commands

TF Tree

world
  └── odom
        └── base_link
              ├── head_link
              │     └── camera_link
              ├── l_leg_link
              │     └── l_foot_link
              └── r_leg_link
                    └── r_foot_link

Communication Patterns

Publisher-Subscriber

Digunakan untuk streaming data (kamera, sensor):

Camera → /image_raw → Vision Node → /ball_position → Strategy

Service-Client

Digunakan untuk request-response:

Strategy → GetBallPosition → Vision
Strategy → SetWalkingParams → Walking Module

Action

Digunakan untuk long-running tasks:

Strategy → WalkToGoal → Walking Module (with feedback)

Next Steps

On this page