Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions path_planning_ws/src/maze_bot/maze_bot/maze_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,19 @@ def __init__(self):
self.debugging = Debugging()

def get_video_feed_cb(self,data):
frame = self.bridge.imgmsg_to_cv2(data,'bgr8')
try:
frame = self.bridge.imgmsg_to_cv2(data,'bgr8')
except CvBridgeError as e:
print(e)
return
self.sat_view = frame

def process_data_bot(self, data):
self.bot_view = self.bridge.imgmsg_to_cv2(data,'bgr8') # performing conversion

try:
self.bot_view = self.bridge.imgmsg_to_cv2(data,'bgr8') # performing conversion
except CvBridgeError as e:
print(e)
return
def get_bot_speed(self,data):
# We get the bot_turn_angle in simulation Using same method as Gotogoal.py
self.bot_speed = -(data.twist.twist.linear.x)
Expand Down Expand Up @@ -274,4 +281,4 @@ def main(args =None):


if __name__ == '__main__':
main()
main()