-
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
+
+
-
-
-
-
+
-
+
+
+
-
+
-
+
+
+
+
+
+
-
+
-
-
+
+
-
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
+
+
-
-
+
-
-
+
+
-
+
-
+
+
+
+
-
-
+
+
+
+
+
-
+
-
-
+
+
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
+
-
-
+
+
-
-
-
-
-
+
-
-
+
+
+
+
+
-
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
-
-
-
+
-
-
-
-
-
-
+
-
-
-
-
+
+
+
+
-
+
+
+
-
+
+
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.travis.yml b/.travis.yml
index 61161cac..4f8b11f2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,6 +25,7 @@
# Travis environment variables in general.
#
# Author: Felix Duvallet
+# Modified by: Neil Nie
# NOTE: The build lifecycle on Travis.ci is something like this:
# before_install
@@ -78,43 +79,44 @@ before_install:
- sudo rosdep init
- rosdep update
+# >>>>>>>>>>>>>>>> travis doesn't work from here on >>>>>>>>>>>>>>>>>>>>>>>>>>
# Create a catkin workspace with the package under integration.
-install:
- - mkdir -p ~/catkin_ws/src
- - cd ~/catkin_ws/src
- - catkin_init_workspace
- # Create the devel/setup.bash (run catkin_make with an empty workspace) and
- # source it to set the path variables.
- - cd ~/catkin_ws
- - catkin_make
- - source devel/setup.bash
- # Add the package under integration to the workspace using a symlink.
- - cd ~/catkin_ws/src
- - ln -s $CI_SOURCE_PATH/ros .
-
-# Install all dependencies, using wstool first and rosdep second.
-# wstool looks for a ROSINSTALL_FILE defined in the environment variables.
-before_script:
- # source dependencies: install using wstool.
- - cd ~/catkin_ws/src
- - wstool init
- - if [[ -f $ROSINSTALL_FILE ]] ; then wstool merge $ROSINSTALL_FILE ; fi
- - wstool up
- # package depdencies: install using rosdep.
- - cd ~/catkin_ws
- - rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
-
-# Compile and test (mark the build as failed if any step fails). If the
-# CATKIN_OPTIONS file exists, use it as an argument to catkin_make, for example
-# to blacklist certain packages.
+#install:
+# - mkdir -p ~/catkin_ws/src
+# - cd ~/catkin_ws/src
+# - catkin_init_workspace
+# # Create the devel/setup.bash (run catkin_make with an empty workspace) and
+# # source it to set the path variables.
+# - cd ~/catkin_ws
+# - catkin_make
+# - source devel/setup.bash
+# # Add the package under integration to the workspace using a symlink.
+# - cd ~/catkin_ws/src
+# - ln -s $CI_SOURCE_PATH/ros .
#
-# NOTE on testing: `catkin_make run_tests` will show the output of the tests
-# (gtest, nosetest, etc..) but always returns 0 (success) even if a test
-# fails. Running `catkin_test_results` aggregates all the results and returns
-# non-zero when a test fails (which notifies Travis the build failed).
-script:
- - source /opt/ros/$ROS_DISTRO/setup.bash
- - cd ~/catkin_ws
- - catkin_make $( [ -f $CATKIN_OPTIONS ] && cat $CATKIN_OPTIONS )
- # Run the tests, ensuring the path is set correctly.
- - source devel/setup.bash
+## Install all dependencies, using wstool first and rosdep second.
+## wstool looks for a ROSINSTALL_FILE defined in the environment variables.
+#before_script:
+# # source dependencies: install using wstool.
+# - cd ~/catkin_ws/src
+# - wstool init
+# - if [[ -f $ROSINSTALL_FILE ]] ; then wstool merge $ROSINSTALL_FILE ; fi
+# - wstool up
+# # package depdencies: install using rosdep.
+# - cd ~/catkin_ws
+# - rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
+#
+## Compile and test (mark the build as failed if any step fails). If the
+## CATKIN_OPTIONS file exists, use it as an argument to catkin_make, for example
+## to blacklist certain packages.
+##
+## NOTE on testing: `catkin_make run_tests` will show the output of the tests
+## (gtest, nosetest, etc..) but always returns 0 (success) even if a test
+## fails. Running `catkin_test_results` aggregates all the results and returns
+## non-zero when a test fails (which notifies Travis the build failed).
+#script:
+# - source /opt/ros/$ROS_DISTRO/setup.bash
+# - cd ~/catkin_ws
+# - catkin_make $( [ -f $CATKIN_OPTIONS ] && cat $CATKIN_OPTIONS )
+# # Run the tests, ensuring the path is set correctly.
+# - source devel/setup.bash
diff --git a/ros/README.md b/ros/README.md
new file mode 100755
index 00000000..b3959c34
--- /dev/null
+++ b/ros/README.md
@@ -0,0 +1,117 @@
+# Important ROS Information
+Below you will find information about all the ROS packages, nodes, topics used in this project.
+
+## Packages & Nodes
+Here is a list of packages. Underneath each package are nodes in that package.
+
+------------------------------
+
+### autopilot
+The autopilot node is the brain of the self-driving car. It uses end-to-end
+deep learning to predict the steering, acceleration and braking commands of
+the vehicle. while subscribes to the camera feed. (Node currently functioning) The Arduino subsribes to the steering_cmds and controls the steering accordingly.
+
+##### Nodes:
+- `autopilot`
+- `visualization`
+
+##### Publishes
+- `/vehicle/dbw/steering_cmds/`
+- `/vehicle/dbw/cruise_cmds/`
+
+##### Subscribes
+- `/cv_camera_node/image_raw`
+- `/cv_camera_node/image_sim`
+
+------------------------------
+
+### object_detection
+YOLO (You Only Look Once) realtime object detection system.
+
+#### Nodes:
+- `object_detection_node`
+
+#### Publishes
+- `/detection/object/detection_visualization/`
+- `/detection/object/detection_result`
+
+#### Subscribes:
+- `/cv_camera_node/image_raw`
+
+------------------------------
+
+### segmentation
+Semantic segmentation node. Deep learning, ConvNets
+
+##### Nodes:
+- `segmentation_node`
+
+##### Publishes
+- `/segmentation/visualization/`
+- `/segmentation/output`
+
+##### Subscribes
+- `/cv_camera_node/image_raw`
+
+------------------------------
+
+### cv_camera
+The cameras are the main sensors of the self-driving car.
+
+##### Nodes:
+- `cv_camera_node`
+
+##### Publishes
+- `/cv_camera_node/image_raw`
+
+------------------------------
+
+### driver
+This is the main package of the project. It pulls together all the individual nodes to create a complete self-driving system.
+
+##### Nodes:
+- `drive`
+
+------------------------------
+
+### gps
+Used for localization. Currently using the Adafruit GPS module, serial communication.
+
+##### Nodes:
+- `gps_receiver`
+- `nmea_topic_driver`
+- `nmea_topic_serial_reader`
+
+The GPS package manages and publishes the data received from a GPS module connected via serial. The package
+
+#### Publishes:
+
+- `/sensor/gps/fix`
+- `/sensor/gps/vel`
+
+------------------------------
+
+### data_logger
+The logger node records and compiles a dataset for supervised machine learning purposes. The future is to use rosbag instead of the data_loggar node. (Node currently functioning)
+
+##### Nodes:
+- `logger`
+
+------------------------------
+
+### osm_cartography
+
+#### Nodes:
+- `osm_client`
+- `osm_server`
+- `viz_osm`
+
+This package broadcasts and processes .osm files. OSM files are OpenStreetMap files which contain detailed information about the environment,
+such as coordinates of roads, building and landmarks. Currently, the main function of the package is to broadcast the osm info to rviz for
+visualization. (Node currently functioning)
+
+### topics for visualization
+- /visual/steering/angle_img
+- /visual/detection/object/bbox_img
+- /visual/detection/lane/marking_img
+- /visual/segmentation/seg_img
\ No newline at end of file
diff --git a/ros/src/.DS_Store b/ros/src/.DS_Store
index 30f58587..0349a8c2 100755
Binary files a/ros/src/.DS_Store and b/ros/src/.DS_Store differ
diff --git a/ros/src/CMakeLists.txt b/ros/src/CMakeLists.txt
deleted file mode 120000
index 66dd650a..00000000
--- a/ros/src/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-/opt/ros/melodic/share/catkin/cmake/toplevel.cmake
\ No newline at end of file
diff --git a/ros/src/README.md b/ros/src/README.md
deleted file mode 100755
index 48553fd3..00000000
--- a/ros/src/README.md
+++ /dev/null
@@ -1,85 +0,0 @@
-# ROS Info
-Below you will find all the packages, nodes, topics and other information about ROS in this project.
-
-## Packages & Nodes
-Here is a list of packages. Underneath each package are nodes in that package.
-
-### localization
-
-### path_planning
-
-### cruise_control
-
-- cruise_controller
-
-### tl_detection
-
-- tl_detection
-
-### lane_detection
-
-- lane_detection
-
-### object_detection
-
-- object_detection
-
-### segmentation
-
-- segmentation
-
-### gps
-
-- gps_receiver
-- nmea\_topic\_driver
-- nmea\_topic\_serial_reader
-
-The GPS package manages and publishes the data received from a GPS module connected via serial. The package publishes:
-
-- /sensor/gps/fix
-- /sensor/gps/vel
-
-### steering_control
-
-- steering_control
-
-The steering control package controls the steering system of the vehicle. If publishes `/vehicle/dbw/steering_cmds/` while subscribes to the camera feed. (Node currently functioning) The Arduino subsribes to the steering_cmds and controls the steering accordingly.
-
-### data_logger
-- logger
-
-The logger node records and compiles a dataset for supervised machine learning purposes. The future is to use rosbag instead of the data_loggar node. (Node currently functioning)
-
-### cv_camera
-
-- cv\_camera_node
-
-This is the camera (perception sensor) package
-
-### driver
-
-- drive
-
-The driver package is will run entire self-driving software. There are two launch files: `display.launch` & `drive.launch`. The display launch file runs rviz. The drive launch file will run the self-driving systems, i.e. steering control, cruise control, sensors... (drive.launch under development. display.launch functioning)
-
-### osm_cartography
-
-- osm_client
-- osm_server
-- viz_osm
-
-This package broadcasts and processes .osm files. OSM files are OpenStreetMap files which contain detailed information about the environment, such as coordinates of roads, building and landmarks. Currently, the main function of the package is to broadcast the osm info to rviz for visualization. (Node currently functioning)
-
-## Topics
-
-### topics for the vehicle
-- /cv\_camera\_node/image_raw
-- /vehicle/dbw/steering_cmds/
-- /vehicle/dbw/accel_cmds/
-- /sensor/steering_encoder/value
-
-### topics for visualization
-- /visual/steering/angle_img
-- /visual/detection/object/bbox_img
-- /visual/detection/lane/marking_img
-- /visual/segmentation/seg_img
\ No newline at end of file
diff --git a/ros/src/autopilot/scripts/visualization/visualization.py b/ros/src/autopilot/scripts/visualization/visualization.py
index b84a59a4..6ef52676 100755
--- a/ros/src/autopilot/scripts/visualization/visualization.py
+++ b/ros/src/autopilot/scripts/visualization/visualization.py
@@ -1,10 +1,13 @@
#!/usr/bin/python
#
-# Results video generator Udacity Challenge 2
+# The AutoPilot module node
+# Part of the self-driving golf cart project
+#
# Original By: Comma.ai and Chris Gundling
# Revised and used by Neil Nie
#
+# General Dependencies
import numpy as np
from skimage import transform as tf
from vis.visualization import visualize_cam
@@ -12,7 +15,8 @@
from PIL import Image as PILImage
from PIL import ImageFont
from PIL import ImageDraw
-# ROS
+
+# ROS Dependencies
import rospy
from sensor_msgs.msg import Image
from std_msgs.msg import Float32
@@ -163,8 +167,9 @@ def __init__(self):
self.bridge = CvBridge()
self.steering_angle = 0.0
self.accel_cmds = -1
- # Please note that the visualization node listens to either the raw
- # camera input or the simulated camera input. Please change this
+
+ # Please note that the visualization node listens to either the
+ # *raw camera* or the *simulated camera* . Please change this
# setting in the launch file (/launch/steering_control.launch)
# or specify this parameter in your command line input.
simulation = rospy.get_param("/autopilot_node/simulation")
diff --git a/ros/src/detection/lane_detection/scripts/lane_detector.py b/ros/src/detection/lane_detection/scripts/lane_detector.py
index e9cf8404..fc6f30b1 100755
--- a/ros/src/detection/lane_detection/scripts/lane_detector.py
+++ b/ros/src/detection/lane_detection/scripts/lane_detector.py
@@ -1,13 +1,16 @@
#
+# Lane Detection Class
+# Part of the node
+# The module
#
-#
-#
+# The self-driving-golf cart
+# (c) Neil Nie
import numpy as np
import cv2
import glob
import matplotlib.pyplot as plt
-from detection.lane import utils
+import utils
class LaneDetector():
diff --git a/ros/src/detection/lane_detection/scripts/utils.py b/ros/src/detection/lane_detection/scripts/utils.py
index e9ba5082..b5250ff6 100755
--- a/ros/src/detection/lane_detection/scripts/utils.py
+++ b/ros/src/detection/lane_detection/scripts/utils.py
@@ -7,7 +7,10 @@
import cv2
import numpy as np
import glob
-from detection.lane import configs
+import configs
+
+# TODO: update the test images
+# TODO: update the path to the test images.
def get_test_images():