|
30 | 30 |
|
31 | 31 |
|
32 | 32 |
|
33 | | - |
34 | 33 | @pytest.fixture(scope="module") |
35 | 34 | def reach_goal_proc(): |
36 | 35 | reach_goal = Node( |
@@ -141,20 +140,6 @@ def sim(): |
141 | 140 | robot_velocity.to_csv("output/robot_velocity.csv") |
142 | 141 | print("✓ Exported velocity data to output/robot_velocity.csv") |
143 | 142 |
|
144 | | - goal_x, goal_y = 0.8, -0.5 |
145 | | - |
146 | | - # Create waypoint pose for the navigation goal in custom_odom frame |
147 | | - goal_waypoint = Pose( |
148 | | - x=goal_x, y=goal_y, z=0.0, roll=0.0, pitch=0.0, yaw=0.0, frame="custom_odom" |
149 | | - ) |
150 | | - |
151 | | - # Calculate distance to goal using the new waypoint feature |
152 | | - distance_to_goal_metric = robot.distance_to(goal_waypoint) |
153 | | - # Export waypoint distance to CSV |
154 | | - distance_to_goal_metric.to_csv("output/robot_distance_to_goal_waypoint.csv") |
155 | | - print( |
156 | | - "✓ Exported waypoint distance data to output/robot_distance_to_goal_waypoint.csv" |
157 | | - ) |
158 | 143 |
|
159 | 144 | # Export robot xy position in custom_odom frame |
160 | 145 | robot.pose(frame_id="custom_odom").to_csv( |
@@ -242,6 +227,12 @@ def validate_goal_output(output): |
242 | 227 | # Check if assertion should pass |
243 | 228 | artefacts_metrics["distance_to_goal"] = waypoint_dist |
244 | 229 | # asserts |
| 230 | + |
| 231 | + # Export waypoint distance to CSV |
| 232 | + distance_to_goal_metric.to_csv("output/robot_distance_to_goal_waypoint.csv") |
| 233 | + print( |
| 234 | + "✓ Exported waypoint distance data to output/robot_distance_to_goal_waypoint.csv" |
| 235 | + ) |
245 | 236 | assert waypoint_dist < 0.5, ( |
246 | 237 | f"Robot did not reach close enough to goal, distance: {waypoint_dist:.3f}m" |
247 | 238 | ) |
0 commit comments