A C++ robot control system for a dual-arm cooking robot with 6 motor actuators (3 per arm).
- Dual Arm Control: 2 independent robotic arms (Left & Right)
- 6 Motor Actuators: 3 motors per arm (Shoulder/Base, Elbow, Wrist)
- GUI Control Panel: ImGui-based graphical interface with real-time visualization
- Motion Planning: Coordinated multi-motor movements
- Thread Safety: Mutex-protected operations for concurrent control
Robocook2/
├── app/ # Command-line application
├── gui_app/ # GUI control application ⭐
│ ├── gui_control.cpp # Main GUI with visualization
│ └── CMakeLists.txt
├── lib/ # Core robot library
│ ├── include/ # Header files
│ │ ├── motor.h
│ │ ├── controller.h
│ │ ├── motion_planner.h
│ │ └── robot/
│ │ └── motor_controller.h
│ └── src/ # Implementation
│ ├── motor_controller.cpp
│ ├── controller.cpp
│ └── ...
├── external/ # Third-party dependencies
│ └── imgui/ # ImGui library
└── build/ # Build output (generated)
sudo apt-get update
sudo apt-get install -y build-essential cmake libglfw3-dev# Create build directory
mkdir -p build
cd build
# Configure with CMake
cmake ..
# Build all targets
make -j$(nproc)
# Or build specific targets
make myapp # Command-line app
make robocook_gui # GUI application# From project root
./run_gui.sh
# Or directly
./build/gui_app/robocook_guiControls:
- Arrow Keys: ↑↓ adjust motor angle, ←→ select motor, TAB switch arms
- Mouse: Drag sliders, click buttons for preset positions
- Visual Feedback: Real-time 2D arm visualization
See GUI_README.md for detailed GUI documentation.
./build/app/myapp- Left Arm: Pick and place operations
- Right Arm: Stirring and manipulation tasks
- Motor 0: Shoulder/Base rotation (-180° to +180°)
- Motor 1: Elbow joint (-180° to +180°)
- Motor 2: Wrist/End effector (-180° to +180°)
- Language: C++23
- Build System: CMake 3.22+
- GUI Framework: Dear ImGui
- Graphics: OpenGL 3.3 + GLFW
- Threading: C++20 std::thread, mutex, atomic
- robot::Motor: Individual motor control with angle simulation
- robot::Arm: 3-motor arm with coordinated movements
- robot::Controller: Dual-arm coordination with synchronization barriers
- robot::Activator: Semaphore-based resource locking
- robot::MotionPlanner: Step-based motion planning (legacy)
#include "robot/motor_controller.h"
robot::Arm leftArm("LeftArm");
robot::Arm rightArm("RightArm");
// Move individual joint
leftArm.moveJoint(0, 45.0); // Motor 0 to 45 degrees
// Move to position (all 3 motors)
leftArm.moveToAngles({10.0, 20.0, 5.0});
// Use preset actions
leftArm.pick("pan");
rightArm.stir(120, 4); // 120 RPM for 4 seconds