This project implements a professional-grade AI-powered street-walking humanoid robot control system with advanced navigation capabilities. The system is designed to provide smooth and adaptive walking motion, sensor fusion for environmental awareness, and intelligent decision-making modules for safe autonomous navigation in urban environments.
Try it online: Wokwi Simulation - AI StreetWalker Robot
Experience the robot's capabilities in a virtual environment before building the physical hardware. The simulation includes all the advanced AI features including traffic light detection, pedestrian awareness, and autonomous navigation.
- Inverse Kinematics: Precise joint control for natural humanoid movement
- PID Controllers: Adaptive gains for different joint types (arms vs legs)
- Multi-Sensor Fusion: IMU, force, proximity, and vision sensors
- Adaptive Gait Generation: Smooth walking with terrain adaptation
- Traffic Light Detection: Automatic compliance with traffic signals
- Pedestrian Awareness: Density-based speed adjustment
- Predictive Collision Avoidance: 8-directional obstacle detection
- ZMP Balance Control: Zero Moment Point stability analysis
- Terrain Adaptation: Automatic gait adjustment for rough surfaces
- Arduino Mega 2560 (48 servo support)
- 24 Servo Motors (6 per arm, 6 per leg)
- IMU Sensors (2 analog pins)
- Force Sensors (4 analog pins for foot contact)
- Proximity Sensors (8 analog pins for obstacle detection)
- Vision System (2 analog + 2 digital pins)
Servo Motors (24 total):
- Left Arm: Pins 2-7
- Right Arm: Pins 8-13
- Left Leg: Pins 22-27
- Right Leg: Pins 28-33
Sensors:
- IMU: A0, A1
- Force: A2-A5
- Proximity: A6-A13
- Vision Analog: A14, A15
- Vision Digital: 34, 35
- Assemble the robot according to the mechanical design
- Connect all sensors to the appropriate pins on the Arduino Mega 2560
- Connect the servos to their respective pins as defined in the
servo_pins
array - Ensure proper power supply for all components
- Open the Arduino IDE
- Go to
File
>Open
- Select the
EnhancedHumanoidRobot.ino
file from thesrc
directory - Connect your Arduino Mega 2560 to your computer via USB
- Select the correct board and port in the
Tools
menu - Click on the
Upload
button to upload the sketch to the Arduino
- Modify the
robot.config.json
file to adjust system parameters - Calibrate sensors according to your specific hardware setup
- Test individual components before full system integration
Connect to the robot's serial monitor at 115200 baud rate to send commands:
walk
- Start walking gaitstop
- Stop walking and standemergency
- Emergency stop (halts all motion)reset
- Reset system after emergency
status
- Show detailed system statusbalance
- Check balance and COM positionjoints
- Display all joint statesenv
- Show environmental sensor dataspeed
- Display speed and gait parametershelp
- Show command reference
1. Upload the code to Arduino Mega 2560
2. Open Serial Monitor at 115200 baud
3. Send 'walk' command to start walking
4. Monitor status with 'status' command
5. Use 'stop' to halt movement
- Sensor Fusion: Update all sensor data
- Balance Control: Compute ZMP and stability
- Decision Making: Evaluate environment and safety
- Gait Generation: Generate foot trajectories
- Inverse Kinematics: Solve joint angles
- PID Control: Execute joint movements
- Status Reporting: Update system status
- EnhancedPID: Advanced PID controller with feedforward
- InverseKinematics: 6-DOF leg inverse kinematics solver
- TrajectoryGenerator: Smooth foot trajectory generation
- ZMPBalanceController: Zero Moment Point balance control
- SensorFusion: Multi-sensor data integration
- DecisionMaker: AI-based decision making
- GaitController: Adaptive gait generation
- Emergency Stop: Immediate halt of all motion
- Obstacle Detection: 8-directional proximity sensing
- Traffic Light Compliance: Automatic stop at red lights
- Pedestrian Awareness: Speed adjustment based on density
- Balance Monitoring: Continuous stability assessment
- Joint Limits: Hardware and software joint limits
- Fault Detection: Automatic fault detection and reporting
- Servo Jitter: Check power supply and PID tuning
- Balance Problems: Verify IMU calibration and COM estimation
- Sensor Errors: Check wiring and pin assignments
- Communication Issues: Verify baud rate and USB connection
- Use
joints
to check individual joint status - Use
balance
to verify stability calculations - Use
env
to check sensor readings - Monitor serial output for error messages
- IMU Calibration: Ensure robot is level during startup
- Force Sensors: Adjust thresholds in configuration
- Proximity Sensors: Test range and sensitivity
- Vision System: Calibrate traffic light detection thresholds
- Control Frequency: 100 Hz
- Walking Speed: 0.58 m/s (adjustable)
- Step Length: 0.35 m
- Step Height: 0.06 m
- Joint Resolution: 1 degree
- Balance Accuracy: ±3 cm ZMP margin
- Sensor Update Rate: 100 Hz
- Traffic light detection and compliance
- Pedestrian density analysis
- Terrain roughness assessment
- Predictive collision avoidance
- Adaptive speed control
- Complementary filtering for IMU data
- Force sensor integration for foot contact
- Multi-directional obstacle detection
- Vision-based environment analysis
- Smooth trajectory generation
- Phase-based gait control
- Arm swing coordination
- Terrain adaptation
- Speed modulation
This project is licensed under the MIT License.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
For technical support and questions:
- Check the troubleshooting section
- Review the API documentation
- Test with debug commands
- Verify hardware connections
- Enhanced sensor fusion
- Improved balance control
- Advanced AI decision making
- Better error handling
- Optimized performance
- Basic walking gait
- Simple PID control
- Basic sensor integration