Skip to content

SmallBotic/rc-automobile-ros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS AUTOMOBILE

Description

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.

Table of Contents

Communication Diagram

The following diagram shows the communication between the Micro-ROS automobile and the ROS 2 control node: Communication Model

Installation

Dependencies

  • ROS Humble
  • Micro-ROS
  • PlatformIO installed in your computer or the PlatformIO extension in Visual Studio Code

Building

Using PlatformIO in Visual Studio Code

  1. Clone the repository in your workspace
  2. Open the project in Visual Studio Code
  3. Build the project using the PlatformIO extension

Using PlatformIO in the terminal

  1. Clone the repository in your workspace

  2. Open the terminal in the project directory

  3. Run the following command to build the project:

    pio run

Usage

Running the project

  1. Connect the microcontroller to the computer using a USB cable

  2. Run the following command to upload the code to the microcontroller:

    pio run --target upload
  3. 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

Note

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.