Skip to content

Gopalkrishnbiradar/arms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robocook Robot Control System

A C++ robot control system for a dual-arm cooking robot with 6 motor actuators (3 per arm).

Features

  • 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

Architecture

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)

Building

Prerequisites

sudo apt-get update
sudo apt-get install -y build-essential cmake libglfw3-dev

Build Steps

# 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

Running

GUI Control Application (Recommended)

# From project root
./run_gui.sh

# Or directly
./build/gui_app/robocook_gui

Controls:

  • 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.

Command-Line Application

./build/app/myapp

Robot Specifications

Arms

  • Left Arm: Pick and place operations
  • Right Arm: Stirring and manipulation tasks

Motors (per arm)

  • Motor 0: Shoulder/Base rotation (-180° to +180°)
  • Motor 1: Elbow joint (-180° to +180°)
  • Motor 2: Wrist/End effector (-180° to +180°)

Development

Technology Stack

  • Language: C++23
  • Build System: CMake 3.22+
  • GUI Framework: Dear ImGui
  • Graphics: OpenGL 3.3 + GLFW
  • Threading: C++20 std::thread, mutex, atomic

Code Structure

  • 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)

Quick Start Example

#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
Screenshot from 2025-11-05 00-14-08 Screenshot from 2025-11-05 00-14-33

About

A basic UI to controll the robot arms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published