Skip to content

Commit

Permalink
* try to show video
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliusHendrix committed May 7, 2022
1 parent d3d4fb4 commit 5845a4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Main/straight.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def start(self):
# object detection
if self.mode == 2:
feed, frame = vcap.read()
obj, avoid_direction = self.detector.check_for_object(frame=frame, distance_to_dodge=25)
obj, avoid_direction = self.detector.check_for_object(frame=frame, distance_to_dodge=25,
show_video=True)
if obj is not None:
self.robot.move(0)
self.timer.pause_timer()
Expand All @@ -82,7 +83,8 @@ def start(self):
# object detection
if self.mode == 2:
feed, frame = vcap.read()
obj, avoid_direction = self.detector.check_for_object(frame=frame, distance_to_dodge=25)
obj, avoid_direction = self.detector.check_for_object(frame=frame, distance_to_dodge=25,
show_video=True)
if obj is not None:
self.robot.move(0)
self.timer.pause_timer()
Expand Down
2 changes: 1 addition & 1 deletion RobotControl/plot_distance_vs_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def distance_to_time(distance):
:param distance:
:return:
"""
p = np.array([ 0.03314466, -0.07916051])
p = np.array([0.03314466, -0.07916051])
return p[0] * distance + p[1]


Expand Down

0 comments on commit 5845a4d

Please sign in to comment.