Skip to content

Commit 2ca4120

Browse files
committed
Created a readme file for the perception team and wrote initial sensor fusion documentation and set up instructions
1 parent 7ace7ee commit 2ca4120

1 file changed

Lines changed: 70 additions & 0 deletions

File tree

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Perception Team
2+
This folder contains code that is used to detect objects in 3D space and subsequently notify other GEMstack components of the detected objects. It is split up into 3 main areas: Pedestrian detection code created at the beginning-middle of the course, Cone Detection code that is used to detect cones (optionally with orientation), and Sensor Fusion code which fuses YOLO + painted lidar data and PointPillars 3D bounding boxes to detect pedestrians.
3+
4+
## Cone Detection
5+
Description goes here.
6+
7+
### Relevant Files
8+
- cone_detection.py
9+
- perception_utils.py
10+
11+
12+
## Sensor Fusion
13+
To improve the quality of the detected pedestrians, we decided to fuse detections from multiple modalities to take advantage of the strengths each sensor (camera and lidar in our case) provides. We accomplished this by fusing the 3D bounding box detections of pedestrians generated by YOLO (model which detects pedestrians with camera data) + painted lidar data and PointPillars (model which detects pedestrians with only lidar data).
14+
15+
### Relevant Files
16+
#### Setup files to create PointPillars Cuda 11.1.1 Docker container:
17+
- build_point_pillars.sh
18+
- setup/docker-compose.yaml
19+
- setup/Dockerfile.cuda111
20+
21+
#### Code used to detect pedestrians:
22+
- combined_detection.py
23+
- point_pillars_node.py
24+
- yolo_node.py
25+
26+
#### Code used to analyze the results of detections and extract data from rosbags for further analysis:
27+
- eval_3d_bbox_performance.py
28+
- rosbag_processor.py
29+
- test_eval_3d_bbox_performance.py
30+
31+
### Local Installation Steps for PointPillars Docker Container
32+
#### READ BEFOREHAND:
33+
- Before perfoming installation steps, please make sure you source ALL terminal windows (except for docker terminal window).
34+
$ source /opt/ros/noetic/setup.bash
35+
$ source ~/catkin_ws/devel/setup.bash
36+
- These instructions were written with the assumption that you are running them inside of the outermost GEMstack folder.
37+
- If you have set up issues please read the "Set Up Issues Known Fixes" section at the bottom.
38+
39+
#### Steps:
40+
1. Install Docker
41+
2. Install Docker Compose
42+
3. A bash script was created to handle docker permissions issues and make the set up process simpler:
43+
$ bash GEMstack/onboard/perception/build_point_pillars.sh
44+
4. Start the container (use sudo if you run into permissions issues)
45+
$ docker compose -f GEMstack/onboard/perception/setup/docker-compose.yaml up
46+
5. Run roscore on local machine (make sure you source first)
47+
$ roscore
48+
6. Start up YOLO node (make sure you source first):
49+
$ python3 GEMstack/onboard/perception/yolo_node.py
50+
7. Run yaml file to start up the CombinedDetector3D GEMstack Component (make sure you source first):
51+
$ python3 main.py --variant=detector_only launch/combined_detection.yaml
52+
8. Run a rosbag on a loop (make sure you source first):
53+
$ rosbag play -l yourRosbagNameGoesHere.bag
54+
55+
### Vehicle Installation Steps for PointPillars Docker Container
56+
Perform the same setup steps as the above section with the below exceptions:
57+
1. Ensure you source instead with the following command:
58+
$ source ~/demo_ws/devel/setup.bash
59+
2. Initialize the sensors:
60+
$ roslaunch basic_launch sensor_init.launch
61+
3. Initialize GNSS (if you need it)
62+
$ roslaunch basic_launch visualization.launch
63+
4. Do not run a rosbag in Step 8 above (it's not needed since you'll be getting live data from the vehicle)
64+
65+
#### Known Fixes for Set Up Issues
66+
1. If you get a shape error when creating the "results_normal" variable in yolo_node.py, please downgrade your Ultralytics version to 8.1.5 (this is the version used on the car at the time of writing this):
67+
$ pip install 'ultralytics==8.1.5'
68+
2. If you run into communication issues with ROS, please make sure you have sourced EVERY terminal window (except for docker window there's no need to):
69+
$ source /opt/ros/noetic/setup.bash
70+
$ source ~/catkin_ws/devel/setup.bash

0 commit comments

Comments
 (0)