Skip to content

Commit 30d3e9a

Browse files
committed
changes
1 parent 13d9c44 commit 30d3e9a

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

lk_detect.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ def __init__(self, video_src):
5050
self.rhodotPub = rospy.Publisher('rho_dot', Float64, queue_size=10)
5151

5252
def sendCoord(self, x, y):
53-
self.xcoordPub.publish(x)
53+
x -= 640
54+
self.xcoordPub.publish(x)
5455
self.rhodotPub.publish(y)
5556

5657
def findBestCluster(self, clusters):
5758
id = 0
58-
minScore = 4
59+
minScore = np.inf
5960
DONE = False
6061
minDistance = self.globalMinDist
6162
mindiffScore = np.inf
@@ -164,7 +165,7 @@ def run(self):
164165

165166
if self.notDetected > 0:
166167
try:
167-
self.sendCoord(-1, self.rhoDot)
168+
self.sendCoord(9999+640, self.rhoDot)
168169
except rospy.ROSInterruptException:
169170
pass
170171

mbed-files/los.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "customPID.h"
1111
#include "Sabertooth.h"
1212

13-
#define NOT_DETECTED -1
13+
#define NOT_DETECTED 9999
1414

1515
class LOS {
1616
public:

startProgs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
screen -d -m -S Vision bash -c 'export ROS_MASTER_URI=$ROS_PC && ./lk_detect.py; exec bash'
2-
screen -d -m -S ROS bash -c 'export ROS_MASTER_URI=$ROS_PC && rosrun rosserial_python serial_node.py /dev/ttyACM0; exec bash'
2+
screen -d -m -S ROS bash -c 'export ROS_MASTER_URI=$ROS_PC && rosrun rosserial_python serial_node.py /dev/ttySAC0; exec bash'

0 commit comments

Comments
 (0)