diff --git a/App/RobobinApp/Views/MainPage.xaml.cs b/App/RobobinApp/Views/MainPage.xaml.cs index 0f7f925bb919a7903116a75ae3e6a798ae291184..533e36ad3deccfbb9d762b15e0ab72f50a9c730a 100644 --- a/App/RobobinApp/Views/MainPage.xaml.cs +++ b/App/RobobinApp/Views/MainPage.xaml.cs @@ -52,6 +52,11 @@ namespace RobobinApp.Views private void OnGraphicsViewTapped(object sender, TappedEventArgs e) { + if (App.WifiManager.Mode != "Call") + { + DisplayAlert("NO CALL","Bin must be in call mode to use this feature!","Sorry!"); + return; + } var tapPoint = e.GetPosition(GraphicsView); var drawable = (GraphicsDrawable)Resources["drawable"]; diff --git a/App/RobobinApp/Views/MainPage_Android.xaml.cs b/App/RobobinApp/Views/MainPage_Android.xaml.cs index 99c1a14f8f5ba2a82926d27e5ede9e8d201debf8..f7059f4065ca2314d5558c12d3d66f1efee7a807 100644 --- a/App/RobobinApp/Views/MainPage_Android.xaml.cs +++ b/App/RobobinApp/Views/MainPage_Android.xaml.cs @@ -26,6 +26,11 @@ namespace RobobinApp.Views private void OnGraphicsViewTapped(object sender, TappedEventArgs e) { + if (App.WifiManager.Mode != "Call") + { + DisplayAlert("NO CALL", "Bin must be in call mode to use this feature!", "Sorry!"); + return; + } var tapPoint = e.GetPosition(GraphicsView); var drawable = (GraphicsDrawable)Resources["drawable"]; diff --git a/ros2/src/robobin/robobin/uwb_navigation_node.py b/ros2/src/robobin/robobin/uwb_navigation_node.py index 5972d856df9e8ad37323d7f539889700722e4748..56ff5210a3f190397a329dbe8aeb34fed8ff0b12 100644 --- a/ros2/src/robobin/robobin/uwb_navigation_node.py +++ b/ros2/src/robobin/robobin/uwb_navigation_node.py @@ -66,6 +66,7 @@ class UWBNode(Node): super().__init__('uwb_navigation_node') self.publisher = self.create_publisher(Point, '/tag1_location', 10) + self.start_publisher = self.create_publisher(Point, '/start_location', 10) self.target_location_pub = self.create_publisher(Point, '/target_location', 10) self.api_pub = self.create_publisher(String, '/api_command', 10) @@ -167,9 +168,9 @@ class UWBNode(Node): # Extract yaw from quaternion using transforms3d orientation_q = msg.orientation orientation_list = [orientation_q.w, orientation_q.x, orientation_q.y, orientation_q.z] - roll, pitch, yaw = quat2euler(orientation_list) # Converts quaternion to Euler angles + # roll, pitch, yaw = quat2euler(orientation_list) # Converts quaternion to Euler angles - self.current_yaw = yaw # Update current yaw + self.current_yaw = 0 # Update current yaw # self.get_logger().info(f"IMU Yaw: {yaw:.2f} radians") def determine_anchor_coords(self, measured_distances): @@ -304,7 +305,7 @@ class UWBNode(Node): # Publish current position position_msg = Point(x=self.current_tag1_position[0], y=self.current_tag1_position[1], z=0.0) - self.publisher.publish(position_msg) + self.start_publisher.publish(position_msg) # Publish target position target_msg = Point(x=target_pos[0], y=target_pos[1], z=0.0) diff --git a/ros2/src/robobin/robobin/uwb_pathing_node.py b/ros2/src/robobin/robobin/uwb_pathing_node.py index 6c4324422e5de8b9ff9508df76b1c35ccaeffd60..dec8b95597d81d37e8cc8f3d74aef15b9c7702c8 100644 --- a/ros2/src/robobin/robobin/uwb_pathing_node.py +++ b/ros2/src/robobin/robobin/uwb_pathing_node.py @@ -13,7 +13,7 @@ class UWBPathingNode(Node): self.cmd_vel_pub = self.create_publisher(Twist, '/cmd_vel', 10) # Subscriptions - self.create_subscription(Point, '/tag1_location', self.current_location_callback, 10) + self.create_subscription(Point, '/start_location', self.current_location_callback, 10) self.create_subscription(Point, '/target_location', self.target_location_callback, 10) # Current and target positions