Skip to content

Commit 6f8aabe

Browse files
committed
Add image
1 parent 3a2ba0c commit 6f8aabe

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ python drive.py
3232

3333
Mã nguồn điều khiển sẽ nhận hình ảnh từ giả lập và trả về tín hiệu điều khiển cho xe.
3434

35+
![](images/control.png)
36+
3537
## 2. Đăng ký và nộp bài trên hệ thống
3638

3739
Thông tin này sẽ được cập nhật trong thời gian tới

auto_control/drive.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ async def process_image(websocket, path):
6767
# Send back throttle and steering angle
6868
message = json.dumps(
6969
{"throttle": throttle, "steering": steering_angle})
70+
print(message)
7071
await websocket.send(message)
7172

7273

auto_control/lane_line_detection.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,10 @@ def calculate_control_signal(img, draw=None):
114114
# You can apply some advanced control algorithm here
115115
# For examples, PID
116116
steering_angle = - float(center_diff * 0.01)
117-
print("I: ", steering_angle)
118117

119118
# Clip steering angle
120119
steering_angle = max(-1, min(1, steering_angle))
121120
if abs(steering_angle) < 0.05:
122121
steering_angle = 0
123122

124-
print(steering_angle)
125-
126123
return throttle, steering_angle

images/control.png

3.69 MB
Loading

0 commit comments

Comments
 (0)