This repository contains the code for a remake of the rc-automobile project. The project aims to modify the original project and make it controllable through ROS via Micro-ROS.
The following diagram shows the communication between the Micro-ROS automobile and the ROS 2 control node:
- ROS Humble
- Micro-ROS
- PlatformIO installed in your computer or the PlatformIO extension in Visual Studio Code
- Clone the repository in your workspace
- Open the project in Visual Studio Code
- Build the project using the PlatformIO extension
-
Clone the repository in your workspace
-
Open the terminal in the project directory
-
Run the following command to build the project:
pio run
-
Connect the microcontroller to the computer using a USB cable
-
Run the following command to upload the code to the microcontroller:
pio run --target upload
-
Open a new terminal and run the following command to start the Micro-ROS agent:
ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888 # or whatever you specified in Credentials.h
Please check the Micro-ROS documentation for more information on how to set up the Micro-ROS agent.
For this project, setting up the agent is explained here.