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

Fix basic_autonomy unit test #2458

Merged
merged 2 commits into from
Nov 7, 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
1 change: 1 addition & 0 deletions basic_autonomy/src/basic_autonomy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,7 @@ namespace basic_autonomy
if (yield_plan.trajectory_points.size() < 2)
{
RCLCPP_WARN(node_handler->get_logger(), "Invalid Yield Trajectory");
return false;
}

RCLCPP_DEBUG_STREAM(node_handler->get_logger(), "Yield Trajectory Time" << rclcpp::Time(yield_plan.trajectory_points[0].target_time).seconds());
Expand Down
15 changes: 5 additions & 10 deletions basic_autonomy/test/test_waypoint_generation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,10 +886,6 @@ namespace basic_autonomy
detailed_config, visited_lanelets), std::invalid_argument);
}

// These tests has been temporarily disabled to support Continuous Improvement (CI) processes.
// Related GitHub Issue: <https://github.com/usdot-fhwa-stol/carma-platform/issues/2335>

/**
TEST(BasicAutonomyTest, test_verify_yield)
{
auto node = std::make_shared<carma_ros2_utils::CarmaLifecycleNode>(rclcpp::NodeOptions());
Expand Down Expand Up @@ -920,7 +916,7 @@ namespace basic_autonomy
ASSERT_TRUE(basic_autonomy::waypoint_generation::is_valid_yield_plan(node, tp));

carma_planning_msgs::msg::TrajectoryPlan tp2;

//Test insufficient trajectory points
carma_planning_msgs::msg::TrajectoryPlanPoint point_4;
point_4.x = 5.0;
point_4.y = 0.0;
Expand All @@ -931,25 +927,24 @@ namespace basic_autonomy
ASSERT_FALSE(basic_autonomy::waypoint_generation::is_valid_yield_plan(node, tp2));

carma_planning_msgs::msg::TrajectoryPlan tp3;

// Test old trajectory
carma_planning_msgs::msg::TrajectoryPlanPoint point_5;
point_5.x = 5.0;
point_5.y = 0.0;
point_5.target_time = startTime;
point_5.target_time = rclcpp::Time(0,0);
point_5.lane_id = "1";
tp3.trajectory_points.push_back(point_5);

carma_planning_msgs::msg::TrajectoryPlanPoint point_6;
point_6.x = 10.0;
point_6.y = 0.0;
point_6.target_time = startTime + rclcpp::Duration(1, 0);
point_6.target_time = rclcpp::Time(1,0);
point_6.lane_id = "1";
tp3.trajectory_points.push_back(point_6);

ASSERT_FALSE(basic_autonomy::waypoint_generation::is_valid_yield_plan(node, tp2));
ASSERT_FALSE(basic_autonomy::waypoint_generation::is_valid_yield_plan(node, tp3));

}
*/

} // namespace basic_autonomy

Expand Down
Loading