ROS practice using MORAI simulator
The scenario files, sensor files, network configuration files, and weight files for the models used in the ROS packages are available on Google Drive.
These packages primarily focus on perception tasks and are compatible with ROS1 Noetic.
ROS-simulator-practice/
├── get_GT/ # Scripts for extracting GT data
├── pedestrian_detection/ # ROS package folder for object detection
├── traffic_classification/ # ROS package folder for image classification
This folder contains scripts for extracting ground truth (GT) data from the simulator:
capture_sensor_data.py
: Leverages the sensor capture feature of the MORAI simulator.save_traffic_img.py
: Subscribes to traffic information topics, organizes traffic data into folders categorized by traffic classes, and saves the images for classification tasks.
This is a ROS package:
- Preparation:
- Before running, place the
ped_weight.pt
file (download from Google Drive) into thesrc
folder.
- Before running, place the
- Functionality:
- The
bbox_publisher.py
script subscribes to image topics, processes them using a YOLO model, and publishes real-time bounding box information.
- The
This is another ROS package:
- Preparation:
- Before running, place the
traffic_weight.pt
file (download from Google Drive) into thesrc
folder.
- Before running, place the
- Functionality:
- The
traffic_publisher.py
script subscribes to image topics, processes them using the AlexNet model, and publishes real-time traffic classification information.
- The
Below is an example for using the pedestrian_detection
package:
- Copy the package to your ROS workspace:
cp -r pedestrian_detection/ {your_ros_workspace}/src
- Build the package:
cd {your_ros_workspace} && catkin_make && source devel/setup.bash
- Launch the package:
roslaunch pedestrian_detection run.launch
The same workflow applies to the traffic_classification
package.