Skip to content

Commit 17f3d52

Browse files
authored
Merge pull request #25 from daniel-s-ingram/master
Made follower node runnable from anywhere
2 parents e2f0881 + a54d6d3 commit 17f3d52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

turtlebot3_follower/scripts/follower.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class follower:
1010
def __init__(self):
1111
rospy.loginfo('Follower node initialized')
1212
self.pub = rospy.Publisher('/cmd_vel', Twist, queue_size = 1)
13-
self.clf = pickle.load( open( "clf", "rb"))
14-
self.clf2 = pickle.load( open( "clf2", "rb"))
13+
self.clf = pickle.load(open(os.path.join(os.path.dirname(__file__), "clf"), "rb"))
14+
self.clf2 = pickle.load(open(os.path.join(os.path.dirname(__file__), "clf2"), "rb"))
1515
self.labels = {'30_0':0, '30_l':1, '30_r':2, '45_0':3, '45_l':4, '45_r':5,'15_0':6, 'empty':7}
1616
rospy.loginfo('Tree initialized')
1717
self.follow()

0 commit comments

Comments
 (0)