Skip to content

The Machathon 5.00 repository provides all the required tools and utilities for the simulation phase of the Machathon 5.00 autonomous car racing competition.

Notifications You must be signed in to change notification settings

Apolo151/machathon5.00-judge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Machathon 5.00

Website Website Website

Picture

This repository provides all the required tools and utilities for the Machathon 5.00 simulation phase. A gazebo world that contains the competition vehicle and the track. The car navigates in one direction, followed by navigating in the opposite direction. The time taken to complete each run, known as the lap time, is recorded.
After completing the track in both directions, the total lap time is send to the leaderboard if chosen to do so.

Links

Requirements

  • ROS2 installation using any of the following options

  • Gazebo and ROS-Gazebo packages Installation

sudo apt update
sudo apt -y install gazebo
## if you are using ros2-humble
sudo apt install ros-humble-gazebo-ros-pkgs
sudo apt install ros-humble-xacro
## if you are using ros2-foxy
sudo apt install ros-foxy-gazebo-ros-pkgs
sudo apt install ros-foxy-xacro
  • Python version 3.10 (humble) or 3.8 (foxy)
## check python version in terminal
python3 --version
  • keyboard package
sudo apt install pip
sudo pip install keyboard

Setting up the environment

1. Create a workspace

mkdir workspace_name

2. Create src folder inside workspace

cd workspace_name
mkdir src

3. Clone the repository inside the src folder

cd src
git clone https://github.com/Apolo151/machathon5.00.git --depth=1

4. Build the workspace

cd ..
colcon build --symlink-install

To run the scene

  • Open two terminal windows

1. Open Gazebo Scene

cd workspace_name
sudo su
source ~/.bashrc
source install/setup.bash
ros2 launch car_demo demo.launch.py

2. Run the Judge and Solution launch file

sudo su
source ~/.bashrc
source install/setup.bash
ros2 launch car_demo machathon.launch.py

Running the telep node to control the car via the keyboard (for testing)

  • open another terminal and run the following commands
sudo su
source ~/.bashrc
source install/setup.bash
ros2 run car_demo prius_teleop_keyboard.py

Project Hierarchy

machathon5.00-judge
├── car_demo
│   ├── car_demo
│   ├── CMakeLists.txt
│   ├── env-hooks
│   ├── launch
│   │   ├── demo.launch.py # launches gazebo and track scene
│   │   ├── machathon.launch.py # launches judge and solution nodes
│   │   └── spawn_prius.launch.py
│   ├── models
│   ├── package.xml
│   ├── plugins
│   ├── scripts
│   │   ├── data.py # teams data config
│   │   ├── despawn_prius.py
│   │   ├── judge.py # judge node
│   │   ├── prius_teleop_keyboard.py # keyboard telep node
│   │   ├── solution.py # your solution file
│   │   └── spawn_prius.py
│   └── worlds
│       └── MachathonTrack.world # The Gazebo track scene
├── prius_description # car's description
├── prius_msgs
└── README.md

Attribution

STP logo

This code was developed and maintained by Step Towards Progress STP, a non-profit organization focuses on developing youth in various fields personally and technically through academic programs, projects, and events. You can find more information about STP at https://stp-org.com/

This code was heavily based on osrf car_demo and NovoG93 car_demo, we wholeheartedly thank them for their invaluable contributions and open source code.

About

The Machathon 5.00 repository provides all the required tools and utilities for the simulation phase of the Machathon 5.00 autonomous car racing competition.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published