├── LICENSE ├── README.md ├── microROS_bot ├── include │ └── README ├── lib │ ├── README │ ├── motor_control │ │ ├── motor_control.cpp │ │ └── motor_control.h │ ├── oled_display │ │ ├── oled_display.cpp │ │ └── oled_display.h │ └── ros_communication │ │ ├── ros_communication.cpp │ │ └── ros_communication.h ├── platformio.ini ├── src │ └── main.cpp └── test │ └── README └── resources ├── 1_microROS_bot_circuit.gif ├── 2_basic_programing.gif ├── 3_microROS_integeration.gif ├── 3d models ├── base.stl ├── caster_holder.stl ├── cover.stl └── motor_holder.stl ├── ciruit_design.png ├── robot_above.jpg ├── robot_below.jpg ├── robot_model.png └── thumbnail.png /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Muhammad Luqman 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MicroROS ESP32 WiFi Controlled Robot 2 | 3 | Welcome to the MicroROS ESP32 WiFi controlled robot project! This repository contains all the necessary files and instructions to build, program, and integrate a fully functional robot using the ESP32 and MicroROS with ROS2. 4 | ![main](https://github.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/blob/main/resources/thumbnail.png) 5 | - **[[Get course Access]](https://robotisim.com/project-based-course/)** 6 | ## Introduction 7 | 8 | If you're passionate about robotics and eager to dive into hands-on hardware and ROS2 projects, this course is perfect for you. We'll guide you step-by-step in building a fully functional robot using the ESP32 and MicroROS with ROS2 over Wifi. 9 | 10 | ### Course Overview 11 | 12 | **Section 1: Building the Robot** 13 | - Assemble your robot from the ground up 14 | - Utilize 3D-printed parts and resources we provide 15 | - Learn about electronic connections and power distribution 16 | ![main](https://github.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/blob/main/resources/1_microROS_bot_circuit.gif) 17 | **Section 2: Basic Programming** 18 | - Get started with programming using PlatformIO to control your robot's movements 19 | - Write simple code to drive the robot and navigate basic paths 20 | - Create your custom libraries for motor driving 21 | - Integrate the OLED display into your robot 22 | ![main](https://github.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/blob/main/resources/2_basic_programing.gif) 23 | **Section 3: MicroROS Integration** 24 | - Integrate MicroROS with your ESP32 robot 25 | - Enhance your robot’s capabilities with advanced communication using ROS2 26 | ![main](https://github.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/blob/main/resources/3_microROS_integeration.gif) 27 | By the end of this course, you'll have a deeper understanding of robotics, from hardware assembly to software integration, and you'll walk away with a robot that you built and programmed yourself. 28 | 29 | ### Directory Details 30 | 31 | - **microROS_bot/include**: This directory contains the README file for the include directory, where you can provide information about the headers and any specific instructions or documentation. 32 | 33 | - **microROS_bot/lib**: This directory houses different libraries used in the project. 34 | - **motor_control**: Contains `motor_control.cpp` and `motor_control.h` files for controlling the robot's motors. 35 | - **oled_display**: Contains `oled_display.cpp` and `oled_display.h` files for managing the OLED display integration. 36 | - **ros_communication**: Contains `ros_communication.cpp` and `ros_communication.h` files for integrating ROS communication capabilities. 37 | - **README**: Provides information about the libraries and their usage. 38 | 39 | - **microROS_bot/platformio.ini**: This is the PlatformIO configuration file, which contains the settings and dependencies for the project. 40 | 41 | - **microROS_bot/src**: Contains the main source code file `main.cpp`, which is the entry point of the robot's program. 42 | 43 | - **microROS_bot/test**: Contains a README file for providing information about any tests or testing framework used in the project. 44 | 45 | - **resources**: This directory includes all the resources needed for building the robot. 46 | - **3d models**: Contains STL files for 3D printing the robot parts. 47 | - `base.stl`, `caster_holder.stl`, `cover.stl`, `motor_holder.stl` 48 | - **circuit_design.png**: Image of the circuit design for the robot. 49 | - **robot_model.png**: Image of the complete robot model. 50 | 51 | ## How to Run 52 | 53 | 1. **Assemble the Robot**: Follow the instructions provided in the `resources` directory. Use the 3D models and the circuit design to assemble your robot. 54 | 55 | 2. **Set Up Your Development Environment**: 56 | - Install [PlatformIO](https://platformio.org/install/ide?install=vscode) in your preferred IDE (e.g., VSCode). 57 | - Clone this repository to your local machine. 58 | - Open the project folder in your IDE. 59 | 60 | 3. **Program the Robot**: 61 | - Navigate to the `microROS_bot` directory. 62 | - Modify the `src/main.cpp` file as needed to customize the robot's behavior. 63 | - Use PlatformIO to build and upload the code to your ESP32. 64 | 65 | 4. **Integrate MicroROS**: 66 | - Ensure you have ROS2 installed on your computer. 67 | - Follow the instructions in the `lib/ros_communication` directory to integrate MicroROS with your ESP32 robot. 68 | 69 | -------------------------------------------------------------------------------- /microROS_bot/include/README: -------------------------------------------------------------------------------- 1 | 2 | This directory is intended for project header files. 3 | 4 | A header file is a file containing C declarations and macro definitions 5 | to be shared between several project source files. You request the use of a 6 | header file in your project source file (C, C++, etc) located in `src` folder 7 | by including it, with the C preprocessing directive `#include'. 8 | 9 | ```src/main.c 10 | 11 | #include "header.h" 12 | 13 | int main (void) 14 | { 15 | ... 16 | } 17 | ``` 18 | 19 | Including a header file produces the same results as copying the header file 20 | into each source file that needs it. Such copying would be time-consuming 21 | and error-prone. With a header file, the related declarations appear 22 | in only one place. If they need to be changed, they can be changed in one 23 | place, and programs that include the header file will automatically use the 24 | new version when next recompiled. The header file eliminates the labor of 25 | finding and changing all the copies as well as the risk that a failure to 26 | find one copy will result in inconsistencies within a program. 27 | 28 | In C, the usual convention is to give header files names that end with `.h'. 29 | It is most portable to use only letters, digits, dashes, and underscores in 30 | header file names, and at most one dot. 31 | 32 | Read more about using header files in official GCC documentation: 33 | 34 | * Include Syntax 35 | * Include Operation 36 | * Once-Only Headers 37 | * Computed Includes 38 | 39 | https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html 40 | -------------------------------------------------------------------------------- /microROS_bot/lib/README: -------------------------------------------------------------------------------- 1 | 2 | This directory is intended for project specific (private) libraries. 3 | PlatformIO will compile them to static libraries and link into executable file. 4 | 5 | The source code of each library should be placed in a an own separate directory 6 | ("lib/your_library_name/[here are source files]"). 7 | 8 | For example, see a structure of the following two libraries `Foo` and `Bar`: 9 | 10 | |--lib 11 | | | 12 | | |--Bar 13 | | | |--docs 14 | | | |--examples 15 | | | |--src 16 | | | |- Bar.c 17 | | | |- Bar.h 18 | | | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html 19 | | | 20 | | |--Foo 21 | | | |- Foo.c 22 | | | |- Foo.h 23 | | | 24 | | |- README --> THIS FILE 25 | | 26 | |- platformio.ini 27 | |--src 28 | |- main.c 29 | 30 | and a contents of `src/main.c`: 31 | ``` 32 | #include 33 | #include 34 | 35 | int main (void) 36 | { 37 | ... 38 | } 39 | 40 | ``` 41 | 42 | PlatformIO Library Dependency Finder will find automatically dependent 43 | libraries scanning project source files. 44 | 45 | More information about PlatformIO Library Dependency Finder 46 | - https://docs.platformio.org/page/librarymanager/ldf.html 47 | -------------------------------------------------------------------------------- /microROS_bot/lib/motor_control/motor_control.cpp: -------------------------------------------------------------------------------- 1 | #include "motor_control.h" 2 | int l_pwm , r_pwm,integral_error,base_pwm=120; 3 | float kp=10,ki=0.5,total_error,proportional_error; 4 | 5 | void motor_setup(){ 6 | ledcSetup(pwm_channel_mr_a , 5000, 8 ); //2^8 = 256 , 0-255 7 | ledcSetup(pwm_channel_mr_b , 5000, 8 ); //2^8 = 256 , 0-255 8 | ledcSetup(pwm_channel_ml_a , 5000, 8 ); //2^8 = 256 , 0-255 9 | ledcSetup(pwm_channel_ml_b , 5000, 8 ); //2^8 = 256 , 0-255 10 | 11 | 12 | ledcAttachPin(motor_right_a,pwm_channel_mr_a); 13 | ledcAttachPin(motor_right_b,pwm_channel_mr_b); 14 | ledcAttachPin(motor_left_a,pwm_channel_ml_a); 15 | ledcAttachPin(motor_left_b,pwm_channel_ml_b); 16 | } 17 | 18 | void forward(int speed) { 19 | ledcWrite(pwm_channel_mr_a, speed); 20 | ledcWrite(pwm_channel_ml_a, speed); 21 | ledcWrite(pwm_channel_mr_b, 0); 22 | ledcWrite(pwm_channel_ml_b, 0); 23 | } 24 | 25 | void reverse(int speed) { 26 | ledcWrite(pwm_channel_mr_b, speed); 27 | ledcWrite(pwm_channel_ml_b, speed); 28 | ledcWrite(pwm_channel_mr_a, 0); 29 | ledcWrite(pwm_channel_ml_a, 0); 30 | } 31 | 32 | void stop() { 33 | ledcWrite(pwm_channel_mr_a, 0); 34 | ledcWrite(pwm_channel_ml_a, 0); 35 | ledcWrite(pwm_channel_mr_b, 0); 36 | ledcWrite(pwm_channel_ml_b, 0); 37 | } 38 | 39 | void right(int speed) { 40 | ledcWrite(pwm_channel_mr_a, 0); 41 | ledcWrite(pwm_channel_ml_a, speed); 42 | ledcWrite(pwm_channel_mr_b, 0); 43 | ledcWrite(pwm_channel_ml_b, 0); 44 | } 45 | 46 | void left(int speed) { 47 | ledcWrite(pwm_channel_mr_a, speed); 48 | ledcWrite(pwm_channel_ml_a, 0); 49 | ledcWrite(pwm_channel_mr_b, 0); 50 | ledcWrite(pwm_channel_ml_b, 0); 51 | } 52 | 53 | std::pair error_motor_drive(int error){ 54 | // Dynamic Speed Adjustment 55 | int dynamic_base_pwm = base_pwm; 56 | if(abs(error) == 0) { // For faster straight Line Movement 57 | dynamic_base_pwm = base_pwm + 120; 58 | } 59 | 60 | integral_error = constrain(integral_error + error, -100, 100); 61 | integral_error = ki * integral_error; 62 | proportional_error = kp * error; 63 | total_error = proportional_error + integral_error; 64 | 65 | l_pwm = dynamic_base_pwm - total_error; 66 | r_pwm = dynamic_base_pwm + total_error; 67 | 68 | l_pwm = constrain(l_pwm+5, 70, 255); 69 | r_pwm = constrain(r_pwm, 70, 255); 70 | 71 | ledcWrite(pwm_channel_mr_a, r_pwm); 72 | ledcWrite(pwm_channel_ml_a, l_pwm); 73 | ledcWrite(pwm_channel_mr_b, 0); 74 | ledcWrite(pwm_channel_ml_b, 0); 75 | 76 | return std::make_pair(l_pwm, r_pwm); 77 | } 78 | -------------------------------------------------------------------------------- /microROS_bot/lib/motor_control/motor_control.h: -------------------------------------------------------------------------------- 1 | #ifndef MOTOR_CONTROL_H 2 | #define MOTOR_CONTROL_H 3 | 4 | #include 5 | 6 | // Pin Definitions 7 | #define motor_right_b 12 8 | #define motor_right_a 13 9 | #define motor_left_a 14 10 | #define motor_left_b 27 11 | 12 | // Channels 13 | #define pwm_channel_mr_a 0 14 | #define pwm_channel_mr_b 1 15 | #define pwm_channel_ml_a 2 16 | #define pwm_channel_ml_b 3 17 | 18 | // Functions 19 | void forward(int speed); 20 | void stop(); 21 | void left(int speed); 22 | void right(int speed); 23 | void reverse(int speed); 24 | void motor_setup(); 25 | std::pair error_motor_drive(int error); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /microROS_bot/lib/oled_display/oled_display.cpp: -------------------------------------------------------------------------------- 1 | #include "oled_display.h" 2 | 3 | 4 | void setupDisplay(Adafruit_SSD1306 &display){ 5 | display.begin(SSD1306_SWITCHCAPVCC, 0x3C); 6 | display.clearDisplay(); 7 | display.setTextSize(2); 8 | display.setCursor(10,10); 9 | display.setTextColor(SSD1306_WHITE); 10 | display.print("MicroROS"); 11 | display.drawRect(5,9,120,20,WHITE); 12 | display.display(); 13 | delay(2000); 14 | } 15 | 16 | void displayLineFollowing(Adafruit_SSD1306 &display,int &lpwm,int &rpwm){ 17 | display.clearDisplay(); 18 | display.setTextSize(2); 19 | display.setCursor(0,0); 20 | display.setTextColor(SSD1306_WHITE); 21 | 22 | 23 | display.print("lpwm :");display.println(lpwm); 24 | display.print("rpwm :");display.println(rpwm); 25 | display.display(); 26 | } 27 | 28 | 29 | 30 | void drawRightArrow(Adafruit_SSD1306 &display) { 31 | display.clearDisplay(); 32 | 33 | 34 | for (int i = -1; i <= 1; i++) { 35 | display.drawLine(30, 15 + i, 80, 15 + i, WHITE); 36 | } 37 | // Upper diagonal 38 | for (int i = -1; i <= 1; i++) { 39 | for (int j = -1; j <= 1; j++) { 40 | display.drawLine(80, 15, 60 + i, 10 + j, WHITE); 41 | } 42 | } 43 | // Lower diagonal 44 | for (int i = -1; i <= 1; i++) { 45 | for (int j = -1; j <= 1; j++) { 46 | display.drawLine(80, 15, 60 + i, 20 + j, WHITE); 47 | } 48 | }display.display(); 49 | } 50 | void drawLeftArrow(Adafruit_SSD1306 &display) { 51 | display.clearDisplay(); 52 | 53 | for (int i = -1; i <= 1; i++) { 54 | display.drawLine(80, 15 + i, 30, 15 + i, WHITE); 55 | } 56 | // Upper diagonal 57 | for (int i = -1; i <= 1; i++) { 58 | for (int j = -1; j <= 1; j++) { 59 | display.drawLine(30, 15, 50 + i, 10 + j, WHITE); 60 | } 61 | } 62 | // Lower diagonal 63 | for (int i = -1; i <= 1; i++) { 64 | for (int j = -1; j <= 1; j++) { 65 | display.drawLine(30, 15, 50 + i, 20 + j, WHITE); 66 | } 67 | } 68 | display.display(); 69 | } 70 | void drawForwardArrow(Adafruit_SSD1306 &display) { 71 | display.clearDisplay(); 72 | 73 | // up 74 | for (int i = -1; i <= 1; i++) { 75 | display.drawLine(55 + i, 5, 55 + i, 25, WHITE); 76 | } 77 | // Left diagonal 78 | for (int i = -1; i <= 1; i++) { 79 | for (int j = -1; j <= 1; j++) { 80 | display.drawLine(45, 15, 55 + i, 5 + j, WHITE); 81 | } 82 | } 83 | // Right diagonal 84 | for (int i = -1; i <= 1; i++) { 85 | for (int j = -1; j <= 1; j++) { 86 | display.drawLine(65, 15, 55 + i, 5 + j, WHITE); 87 | } 88 | }display.display(); 89 | } 90 | void drawBackwardArrow(Adafruit_SSD1306 &display) { 91 | display.clearDisplay(); 92 | 93 | 94 | // Vertical line 95 | for (int i = -1; i <= 1; i++) { 96 | display.drawLine(55 + i, 5, 55 + i, 20, WHITE); 97 | } 98 | // Left diagonal 99 | for (int i = -1; i <= 1; i++) { 100 | for (int j = -1; j <= 1; j++) { 101 | display.drawLine(45, 15, 55 + i, 20 + j, WHITE); 102 | } 103 | } 104 | // Right diagonal 105 | for (int i = -1; i <= 1; i++) { 106 | for (int j = -1; j <= 1; j++) { 107 | display.drawLine(65, 15, 55 + i, 20 + j, WHITE); 108 | } 109 | }display.display(); 110 | } 111 | void drawStopCircle(Adafruit_SSD1306 &display) { 112 | display.clearDisplay(); 113 | 114 | for (int i = -1; i <= 1; i++) { 115 | display.drawCircle(64, 15, 10 + i, WHITE); 116 | }display.display(); 117 | } 118 | -------------------------------------------------------------------------------- /microROS_bot/lib/oled_display/oled_display.h: -------------------------------------------------------------------------------- 1 | #ifndef OLED_DISPLAY_H 2 | #define OLED_DISPLAY_H 3 | 4 | #include 5 | #include 6 | 7 | 8 | void drawRightArrow(Adafruit_SSD1306 &display); 9 | void drawLeftArrow(Adafruit_SSD1306 &display); 10 | void drawForwardArrow(Adafruit_SSD1306 &display); 11 | void drawBackwardArrow(Adafruit_SSD1306 &display); 12 | void drawStopCircle(Adafruit_SSD1306 &display); 13 | 14 | void setupDisplay(Adafruit_SSD1306 &display); 15 | void displayLineFollowing(Adafruit_SSD1306 &display,int &lpwm,int &rpwm); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /microROS_bot/lib/ros_communication/ros_communication.cpp: -------------------------------------------------------------------------------- 1 | #include "ros_communication.h" 2 | #include "motor_control.h" 3 | #include "oled_display.h" 4 | 5 | rcl_subscription_t cmd_vel_sub; 6 | geometry_msgs__msg__Twist cmd_vel_msg; 7 | 8 | rclc_executor_t executor; 9 | rclc_support_t support; 10 | rcl_allocator_t allocator; 11 | rcl_node_t node; 12 | 13 | Adafruit_SSD1306 display; 14 | 15 | RosCommunication::RosCommunication(){ 16 | } 17 | 18 | void RosCommunication::initialize(){ 19 | Serial.begin(115200); 20 | Serial.println("ROS Communication node started"); 21 | setupDisplay(display); 22 | 23 | 24 | 25 | // Adding Wifi 26 | IPAddress agent_ip(192, 168, 100, 21); 27 | size_t agent_port = 8888; 28 | 29 | char ssid[] = "Jhelum.net [Luqman House]"; 30 | char psk[]= "7861234786"; 31 | 32 | set_microros_wifi_transports(ssid, psk, agent_ip, agent_port); 33 | // set_microros_serial_transports(Serial); 34 | 35 | delay(2000); 36 | 37 | allocator = rcl_get_default_allocator(); 38 | rclc_support_init(&support, 0, NULL, &allocator); 39 | rclc_node_init_default(&node, "cmd_vel_sub", "", &support); 40 | } 41 | 42 | 43 | void RosCommunication::executors_start(){ 44 | rclc_executor_init(&executor, &support.context, 1, &allocator); 45 | rclc_executor_add_subscription(&executor, &cmd_vel_sub, &cmd_vel_msg,&RosCommunication::cmd_vel_callback, ON_NEW_DATA); 46 | 47 | Serial.println("Executors Started"); 48 | } 49 | void RosCommunication::subscriber_define(){ 50 | 51 | rclc_subscription_init_default( 52 | &cmd_vel_sub, 53 | &node, 54 | ROSIDL_GET_MSG_TYPE_SUPPORT(geometry_msgs, msg, Twist), 55 | "/cmd_vel"); 56 | 57 | } 58 | 59 | void RosCommunication::cmd_vel_callback(const void *msg_recv){ 60 | const geometry_msgs__msg__Twist * recieved_data = (const geometry_msgs__msg__Twist *) msg_recv ; 61 | float linear_vel = recieved_data->linear.x; 62 | float angular_vel = recieved_data->angular.z; 63 | 64 | Serial.print(linear_vel);Serial.print(" / ");Serial.println(angular_vel); 65 | 66 | if(linear_vel > 0) { 67 | Serial.println("Forward"); 68 | forward(linear_vel * 255); 69 | drawForwardArrow(display); 70 | } else if(linear_vel < 0) { 71 | Serial.println("Reverse"); 72 | reverse(-linear_vel * 255); 73 | drawBackwardArrow(display); 74 | } else if(angular_vel < 0) { 75 | Serial.println("right"); 76 | right(-angular_vel *255); 77 | drawRightArrow(display); 78 | } else if(angular_vel > 0) { 79 | Serial.println("left"); 80 | drawLeftArrow(display); 81 | left(angular_vel *255); 82 | } else { 83 | Serial.println("Stop"); 84 | stop(); 85 | drawStopCircle(display); 86 | } 87 | 88 | 89 | 90 | 91 | } 92 | void RosCommunication::start_receiving_msgs(){ 93 | rclc_executor_spin_some(&executor, RCL_MS_TO_NS(100)); 94 | delay(100); 95 | } -------------------------------------------------------------------------------- /microROS_bot/lib/ros_communication/ros_communication.h: -------------------------------------------------------------------------------- 1 | #ifndef ROS_COMMUNICATION_H 2 | #define ROS_COMMUNICATION_H 3 | 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | 11 | class RosCommunication{ 12 | public: 13 | RosCommunication(); 14 | void initialize(); 15 | void subscriber_define(); 16 | static void cmd_vel_callback(const void *msg_recv); 17 | void start_receiving_msgs(); 18 | void executors_start(); 19 | 20 | 21 | private: 22 | 23 | static float linear_vel; 24 | static float angular_vel; 25 | 26 | }; 27 | 28 | 29 | #endif -------------------------------------------------------------------------------- /microROS_bot/platformio.ini: -------------------------------------------------------------------------------- 1 | ; PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; https://docs.platformio.org/page/projectconf.html 10 | 11 | [env:esp32doit-devkit-v1] 12 | platform = espressif32 13 | board = esp32doit-devkit-v1 14 | framework = arduino 15 | 16 | monitor_speed = 115200 17 | monitor_rts = 0 18 | monitor_dtr = 0 19 | monitor_port = /dev/ttyUSB0 20 | 21 | board_microros_distro = humble 22 | board_microros_transport = wifi 23 | lib_deps = 24 | https://github.com/micro-ROS/micro_ros_platformio 25 | adafruit/Adafruit SSD1306@^2.5.7 26 | 27 | -------------------------------------------------------------------------------- /microROS_bot/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "ros_communication.h" 3 | #include "motor_control.h" 4 | RosCommunication ros_communication ; 5 | 6 | 7 | void setup() { 8 | motor_setup(); 9 | ros_communication.initialize(); 10 | ros_communication.subscriber_define(); 11 | ros_communication.executors_start(); 12 | } 13 | 14 | void loop() { 15 | ros_communication.start_receiving_msgs(); 16 | 17 | } -------------------------------------------------------------------------------- /microROS_bot/test/README: -------------------------------------------------------------------------------- 1 | 2 | This directory is intended for PlatformIO Test Runner and project tests. 3 | 4 | Unit Testing is a software testing method by which individual units of 5 | source code, sets of one or more MCU program modules together with associated 6 | control data, usage procedures, and operating procedures, are tested to 7 | determine whether they are fit for use. Unit testing finds problems early 8 | in the development cycle. 9 | 10 | More information about PlatformIO Unit Testing: 11 | - https://docs.platformio.org/en/latest/advanced/unit-testing/index.html 12 | -------------------------------------------------------------------------------- /resources/1_microROS_bot_circuit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/9acc212e75470f7630d153b3e81b791e2e91d230/resources/1_microROS_bot_circuit.gif -------------------------------------------------------------------------------- /resources/2_basic_programing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/9acc212e75470f7630d153b3e81b791e2e91d230/resources/2_basic_programing.gif -------------------------------------------------------------------------------- /resources/3_microROS_integeration.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/9acc212e75470f7630d153b3e81b791e2e91d230/resources/3_microROS_integeration.gif -------------------------------------------------------------------------------- /resources/3d models/base.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/9acc212e75470f7630d153b3e81b791e2e91d230/resources/3d models/base.stl -------------------------------------------------------------------------------- /resources/3d models/caster_holder.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/9acc212e75470f7630d153b3e81b791e2e91d230/resources/3d models/caster_holder.stl -------------------------------------------------------------------------------- /resources/3d models/cover.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/9acc212e75470f7630d153b3e81b791e2e91d230/resources/3d models/cover.stl -------------------------------------------------------------------------------- /resources/3d models/motor_holder.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/9acc212e75470f7630d153b3e81b791e2e91d230/resources/3d models/motor_holder.stl -------------------------------------------------------------------------------- /resources/ciruit_design.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/9acc212e75470f7630d153b3e81b791e2e91d230/resources/ciruit_design.png -------------------------------------------------------------------------------- /resources/robot_above.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/9acc212e75470f7630d153b3e81b791e2e91d230/resources/robot_above.jpg -------------------------------------------------------------------------------- /resources/robot_below.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/9acc212e75470f7630d153b3e81b791e2e91d230/resources/robot_below.jpg -------------------------------------------------------------------------------- /resources/robot_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/9acc212e75470f7630d153b3e81b791e2e91d230/resources/robot_model.png -------------------------------------------------------------------------------- /resources/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshluk2/MicroROS-ESP32-WiFi-Controlled-Robot/9acc212e75470f7630d153b3e81b791e2e91d230/resources/thumbnail.png --------------------------------------------------------------------------------