|
| 1 | +# Voice-Controlled 3+1 DOF Robotic Arm using ROS 2, MoveIt 2, and Amazon Alexa |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +This project implements a **3+1 DOF robotic arm** (3 revolute arm joints + 1 gripper actuation controlling both fingers) that can be controlled using voice commands via **Amazon Alexa Developer Test Console** as well as **ROS2 actions**. |
| 6 | +The system is built on **ROS2** and **MoveIt2**, and supports both **Python and C++ MoveIt APIs**, depending on the ROS2 distribution. |
| 7 | + |
| 8 | +The project is designed to be modular and extensible, making it suitable for learning, experimentation, and further research in **robot manipulation**, **motion planning**, and **voice-based human–robot interaction**. |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## Key Features |
| 13 | + |
| 14 | +* 3+1 DOF robotic arm with synchronized gripper actuation |
| 15 | +* Motion planning and execution using **MoveIt2** |
| 16 | +* Voice-based control using **Amazon Alexa** |
| 17 | +* ROS 2 Action–based task execution via a dedicated **Task Server** |
| 18 | +* Supports both simulation and extension to real hardware |
| 19 | + |
| 20 | +--- |
| 21 | + |
| 22 | +## Technologies Used |
| 23 | + |
| 24 | +* **ROS 2** |
| 25 | + |
| 26 | + * Humble: C++ MoveIt APIs |
| 27 | + * Iron and newer: Python MoveIt APIs |
| 28 | +* **MoveIt 2** |
| 29 | +* **Python** and **C++** |
| 30 | +* **URDF / SRDF** for robot modeling and semantic description |
| 31 | +* **Amazon Alexa Developer Console** (custom skill) |
| 32 | +* **ROS 2 Actions** for task execution |
| 33 | + |
| 34 | +--- |
| 35 | + |
| 36 | +## Control Interfaces |
| 37 | + |
| 38 | +### 1. Voice Control (Amazon Alexa) |
| 39 | + |
| 40 | +Voice commands are processed via a custom Alexa skill. |
| 41 | +The skill backend communicates with ROS 2 and triggers predefined manipulation tasks. |
| 42 | + |
| 43 | +> **Note:** |
| 44 | +> The Alexa Skill ID is intentionally replaced with a placeholder in the code. |
| 45 | +> You must create your own skill using the Amazon Alexa Developer Console and insert your Skill ID manually. |
| 46 | +
|
| 47 | +--- |
| 48 | + |
| 49 | +### 2. ROS 2 Action Interface (Task Server) |
| 50 | + |
| 51 | +A dedicated **Task Server** exposes a ROS 2 action interface that allows commanding the arm directly using ROS tools. |
| 52 | + |
| 53 | +Example tasks are mapped using an integer-based interface: |
| 54 | + |
| 55 | +* `task_number: 0` |
| 56 | +* `task_number: 1` |
| 57 | +* `task_number: 2` |
| 58 | + |
| 59 | +Each task corresponds to a predefined arm or gripper motion. |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +## Setup and Build Instructions |
| 64 | + |
| 65 | +### 1️⃣ Clone the repository into your ROS 2 workspace |
| 66 | + |
| 67 | +```bash |
| 68 | +cd ~/<your_ws>/ |
| 69 | +git clone https://github.com/naitikpahwa18/moveit_arm.git |
| 70 | +``` |
| 71 | + |
| 72 | +--- |
| 73 | + |
| 74 | +### 2️⃣ Add your Alexa Skill ID |
| 75 | + |
| 76 | +Create a custom skill using the **Amazon Alexa Developer Console**, then edit the following file: |
| 77 | + |
| 78 | +👉 **[`alexa_interface.py`](https://github.com/naitikpahwa18/moveit_arm/blob/main/src/manipulator_remote/manipulator_remote/alexa_interface.py#L126)** |
| 79 | + |
| 80 | +Replace: |
| 81 | + |
| 82 | +```python |
| 83 | +skill_id = "YOUR_ALEXA_SKILL_ID_HERE" |
| 84 | +``` |
| 85 | +--- |
| 86 | + |
| 87 | +### 3️⃣ Go to your workspace root and build the workspace |
| 88 | + |
| 89 | +```bash |
| 90 | +cd ~/<your_ws> |
| 91 | +colcon build |
| 92 | +``` |
| 93 | + |
| 94 | +--- |
| 95 | + |
| 96 | +### 4️⃣ Source the workspace |
| 97 | + |
| 98 | +```bash |
| 99 | +. install/setup.bash |
| 100 | +``` |
| 101 | + |
| 102 | +--- |
| 103 | + |
| 104 | +### 5️⃣ Launch the simulated robot |
| 105 | + |
| 106 | +```bash |
| 107 | +ros2 launch manipulator_bringup simulated_robot.launch.py |
| 108 | +``` |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## Controlling the Robot |
| 113 | + |
| 114 | +### Method 1: Voice Control via Amazon Alexa |
| 115 | + |
| 116 | +* Use the **Alexa Developer Console test interface** |
| 117 | +* Invoke your skill and issue supported voice commands |
| 118 | +* The commands are translated into ROS 2 tasks and executed by MoveIt |
| 119 | + |
| 120 | +--- |
| 121 | + |
| 122 | +### Method 2: ROS 2 Action Command |
| 123 | + |
| 124 | +Send a task goal directly to the Task Server: |
| 125 | + |
| 126 | +```bash |
| 127 | +ros2 action send_goal /task_server manipulator_msgs/action/ManipulatorTask "task_number: 0" |
| 128 | +``` |
| 129 | + |
| 130 | +Replace `0` with `1` or `2` to trigger different tasks. |
| 131 | + |
| 132 | +--- |
| 133 | + |
| 134 | +## Project Structure (High-Level) |
| 135 | + |
| 136 | +```text |
| 137 | +manipulator_ws/ |
| 138 | +├── manipulator_description/ # URDF, SRDF, meshes |
| 139 | +├── manipulator_bringup/ # Launch files |
| 140 | +├── manipulator_controller/ # Controllers and configs |
| 141 | +├── manipulator_remote/ # Alexa interface and remote control |
| 142 | +├── manipulator_task_server/ # ROS 2 action server |
| 143 | +└── manipulator_msgs/ # Custom messages and actions |
| 144 | +``` |
| 145 | +--- |
| 146 | + |
0 commit comments