Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests sequentially and enforce tests in ROS 2 #28024

Merged
merged 3 commits into from
Sep 6, 2024
Merged
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
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@

# Tools: ros2: Run ament_black on all files
85172b56467668bee9fa0e68081027b13bc18c4a

# Tools: ros2: Reformat
4d9822131354dc7dc3351f24660969f58720a1de
2 changes: 1 addition & 1 deletion .github/workflows/colcon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ jobs:
shell: 'bash'
run: |
source install/setup.bash
colcon test --packages-select ardupilot_dds_tests --event-handlers=console_cohesion+
colcon test --executor sequential --parallel-workers 0 --base-paths src/ardupilot --event-handlers=console_cohesion+
- name: Report colcon test results
run: |
colcon test-result --all --verbose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def achieved_goal(goal_global_pos, cur_geopose):
p2 = (cur_pos.latitude, cur_pos.longitude, cur_pos.altitude)

flat_distance = distance.distance(p1[:2], p2[:2]).m
euclidian_distance = math.sqrt(flat_distance**2 + (p2[2] - p1[2]) ** 2)
euclidian_distance = math.sqrt(flat_distance ** 2 + (p2[2] - p1[2]) ** 2)
print(f"Goal is {euclidian_distance} meters away")
return euclidian_distance < 150

Expand Down
11 changes: 3 additions & 8 deletions Tools/ros2/ardupilot_sitl/src/ardupilot_sitl/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
FALSE_STRING = "False"
BOOL_STRING_CHOICES = set([TRUE_STRING, FALSE_STRING])


class VirtualPortsLaunch:
"""Launch functions for creating virtual ports using `socat`."""

Expand Down Expand Up @@ -369,16 +370,10 @@ def generate_launch_arguments() -> List[DeclareLaunchArgument]:
description="SITL output port.",
),
DeclareLaunchArgument(
"map",
default_value="False",
description="Enable MAVProxy Map.",
choices=BOOL_STRING_CHOICES
"map", default_value="False", description="Enable MAVProxy Map.", choices=BOOL_STRING_CHOICES
),
DeclareLaunchArgument(
"console",
default_value="False",
description="Enable MAVProxy Console.",
choices=BOOL_STRING_CHOICES
"console", default_value="False", description="Enable MAVProxy Console.", choices=BOOL_STRING_CHOICES
),
]

Expand Down
Loading