In road-transport terminology, a lane departure warning system is a mechanism designed to warn the driver when the vehicle begins to move out of its lane
- Detect the lanes on the road even if they are curved
- Detect the departure from the center
- Publish the departure to ROS topic
- Warn the driver if the departure is above some threshold
The project will detect these objects(^) and will print instructions to the autonoums car
You can download the demo video by clicking here
You can see the whole research & coding process by viewing this python notebook
You can download the HIT poster by clicking here
We are providing two scripts that integrates the system into ROS:
ros_video_publisher.py
- Should be used to publish the video from the file system into ROS topic calledlanes_video
.ros_lane_consumer.py
- Should be used to consume the content from the topiclanes_video
, this script will use our system to process the input video and publish the processed image and departure from center into the following topics:image_lane_detector
,image_lane_departure
So first run the ros_video_publisher.py
and then run the ros_lane_consumer.py
After running these nodes you can subscribe to the departure data by subscribing to the image_lane_departrue
, for example:
def callback(data):
data = int(data)
# Get the departure direction:
direction = ""
if (data > 0): # Right
direction = "right"
else: # Left
direction = "left"
magnitude = abs(data)
# Play a sound that notifies the driver
# if the departure is greater than 50 cm
if (magnitude > 0.5):
text_to_speech("Move to the " + direction)
rospy.Subscriber("image_lane_departure", String, callback)
rospy.spin()
- OpenCV
- RosPy
- Ros CVBridge