Skip to content

Commit

Permalink
important small documentary updates
Browse files Browse the repository at this point in the history
- rewrote readme for ros.
- updated some script headers.
- other small changes.
  • Loading branch information
NeilNie committed Dec 23, 2018
1 parent 1ec8e33 commit bed80af
Show file tree
Hide file tree
Showing 12 changed files with 429 additions and 280 deletions.
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
detection/traffic-light/scripts/ckpt/tiny-yolo-udacity-8987.data-00000-of-00001 filter=lfs diff=lfs merge=lfs -text
steering/weights/own/trained-nvd-v7-c8.h5 filter=lfs diff=lfs merge=lfs -text
src/detection/traffic-light/scripts/ckpt/tiny-yolo-udacity-8987.data-00000-of-00001 filter=lfs diff=lfs merge=lfs -text
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/self-driving-golf-cart.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

394 changes: 251 additions & 143 deletions .idea/workspace.xml

Large diffs are not rendered by default.

78 changes: 40 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
# Travis environment variables in general.
#
# Author: Felix Duvallet <[email protected]>
# Modified by: Neil Nie <[email protected]>

# NOTE: The build lifecycle on Travis.ci is something like this:
# before_install
Expand Down Expand Up @@ -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
117 changes: 117 additions & 0 deletions ros/README.md
Original file line number Diff line number Diff line change
@@ -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
Binary file modified ros/src/.DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion ros/src/CMakeLists.txt

This file was deleted.

85 changes: 0 additions & 85 deletions ros/src/README.md

This file was deleted.

13 changes: 9 additions & 4 deletions ros/src/autopilot/scripts/visualization/visualization.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
#!/usr/bin/python
#
# Results video generator Udacity Challenge 2
# The AutoPilot module <visualization> 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
import cv2
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
Expand Down Expand Up @@ -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")
Expand Down
9 changes: 6 additions & 3 deletions ros/src/detection/lane_detection/scripts/lane_detector.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#
# Lane Detection Class
# Part of the <lane_detection> node
# The <detection> 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():
Expand Down
5 changes: 4 additions & 1 deletion ros/src/detection/lane_detection/scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit bed80af

Please sign in to comment.