diff --git a/waypoint_manager/scripts/lib/__pycache__/__init__.cpython-38.pyc b/waypoint_manager/scripts/lib/__pycache__/__init__.cpython-38.pyc index 0227a91..5902db6 100644 --- a/waypoint_manager/scripts/lib/__pycache__/__init__.cpython-38.pyc +++ b/waypoint_manager/scripts/lib/__pycache__/__init__.cpython-38.pyc Binary files differ diff --git a/waypoint_manager/scripts/lib/__pycache__/mymaplib.cpython-38.pyc b/waypoint_manager/scripts/lib/__pycache__/mymaplib.cpython-38.pyc index 5048aa5..58d700d 100644 --- a/waypoint_manager/scripts/lib/__pycache__/mymaplib.cpython-38.pyc +++ b/waypoint_manager/scripts/lib/__pycache__/mymaplib.cpython-38.pyc Binary files differ diff --git a/waypoint_manager/scripts/lib/__pycache__/waypointlib.cpython-38.pyc b/waypoint_manager/scripts/lib/__pycache__/waypointlib.cpython-38.pyc index f8c3b92..fce0978 100644 --- a/waypoint_manager/scripts/lib/__pycache__/waypointlib.cpython-38.pyc +++ b/waypoint_manager/scripts/lib/__pycache__/waypointlib.cpython-38.pyc Binary files differ diff --git a/waypoint_manager/scripts/manager_GUI.py b/waypoint_manager/scripts/manager_GUI.py index b9dab30..d8b6f5b 100755 --- a/waypoint_manager/scripts/manager_GUI.py +++ b/waypoint_manager/scripts/manager_GUI.py @@ -39,9 +39,12 @@ self.fp_menu = tk.Menu(self.show_menu, tearoff=tk.OFF) self.fp_menu.add_command(label="Set model", command=self.menu_set_footprint) self.show_fp = tk.BooleanVar() - self.fp_menu.add_checkbutton(label="Show footprint", command=self.menu_show_footprint, variable=self.show_fp) + self.fp_menu.add_checkbutton(label="Show footprint", command=self.menu_show_footprint, + variable=self.show_fp, accelerator="Ctrl+F" + ) self.show_menu.add_cascade(label="Footprint", menu=self.fp_menu) self.menu_bar.add_cascade(label="View", menu=self.show_menu) + self.bind_all("", self.menu_show_footprint) self.master.config(menu=self.menu_bar) # 大元に作成したメニューバーを設定 @@ -141,6 +144,7 @@ self.open_menu.entryconfigure("Map", state=tk.DISABLED) self.open_menu.entryconfigure("Waypoints", state=tk.NORMAL) self.message("Please open waypoints file ") + self.menu_open_waypoints() return @@ -258,6 +262,7 @@ """ def menu_show_footprint(self, event=None): if not self.waypoints: return + if event: self.show_fp.set(not self.show_fp.get()) # create polygon as footprint def create_footprint(x, y, nx, ny): polygon = [] @@ -273,13 +278,13 @@ self.footprint_id.append(id) return ## - if self.show_fp.get(): + if (self.show_fp.get()): for i in range(len(self.waypoints.get_waypoint()) - 1): wp = self.waypoints.get_waypoint(num=i+1) next_wp = self.waypoints.get_waypoint(num=i+2) - create_footprint(wp["x"], wp["y"], next_wp["x"], next_wp["y"]) + create_footprint(float(wp["x"]), float(wp["y"]), float(next_wp["x"]), float(next_wp["y"])) # last waypoint - create_footprint(next_wp["x"], next_wp["y"], self.finish_pose.x, self.finish_pose.y) + create_footprint(float(next_wp["x"]), float(next_wp["y"]), self.finish_pose.x, self.finish_pose.y) else: for id in self.footprint_id: self.canvas.delete(id) @@ -797,4 +802,4 @@ try: app.mainloop() except KeyboardInterrupt as e: - print(e) + app.destroy()