Skip to content
Open

demo #17

Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def setupParam(self, param_name, default_value=rospy.client._Unspecified):
def fake_tag(self):
try:
r = requests.get(f"http://autolab-control-center.local:8080/v1/duckiebot/{os.uname()[1]}/position").json()
intersection_id = str(r["data"]["intersectionId"])
intersection_id = str(r["data"]["atDirection"])
except Exception as e:
print("error")
tags_msg = AprilTagDetectionArray()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,20 @@ def on_shutdown(self):
rospy.loginfo(f"[{self.node_name}] Shutting down.")

def get_chosen_turn(self): # stub
return 0
r = requests.get(f"http://autolab-control-center.local:8080/v1/duckiebot/{os.uname()[1]}/position").json()
turn_side = str(r["data"]["atDirection"])
d = {
"north": 1,
"south": 1,
"east": 0,
"west": 2
}
turn_id = 1
try:
turn_id = d[turn_side]
except:
pass
return turn_id

def get_intersection_id(self):
try:
Expand Down