Skip to content
Snippets Groups Projects
Commit 20e0f0d2 authored by Emil Harlan's avatar Emil Harlan
Browse files

a

parent 0240d2b2
No related branches found
No related tags found
No related merge requests found
......@@ -23,10 +23,8 @@ import ping3
class vel_from_ros_node(Node):
def __init__(self, my_ep_chassis):
threading.Timer(1, self.check_connection)
super().__init__("vel_from_ros")
self.hostname = "192.168.1.77"
self.response = False
self.timer = threading.Timer(1, self.check_connection)
self.timer.start()
......@@ -35,14 +33,13 @@ class vel_from_ros_node(Node):
def check_connection(self):
print("ja")
self.response = self.isConnected()
self.response = self.check_ip_reachability()
if(self.response != True):
self.my_ep_chassis.drive_speed(x = 0, y = 0, z = 0.5)
def check_ip_reachability(self):
response = ping3.ping("192.168.1.5")
response = ping3.ping("192.168.1.77")
if response is not None:
return True
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment