Skip to content

Commit

Permalink
add OccludedAbsenceTrafficLight state
Browse files Browse the repository at this point in the history
Signed-off-by: Mamoru Sobue <[email protected]>
  • Loading branch information
soblin committed Oct 3, 2023
1 parent 4d97ca3 commit 29f9504
Show file tree
Hide file tree
Showing 6 changed files with 173 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
ignore_parked_vehicle_speed_threshold: 0.8333 # == 3.0km/h
stop_release_margin_time: 1.5 # [s]
temporal_stop_before_attention_area: false
absence_traffic_light:
creep_velocity: 1.388 # [m/s]
maximum_peeking_distance: 6.0 # [m]

enable_rtc:
intersection: true # If set to true, the scene modules require approval from the rtc (request to cooperate) function. If set to false, the modules can be executed without requiring rtc approval
Expand Down
12 changes: 10 additions & 2 deletions planning/behavior_velocity_intersection_module/src/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,29 +271,37 @@ visualization_msgs::msg::MarkerArray IntersectionModule::createDebugMarkerArray(

motion_utils::VirtualWalls IntersectionModule::createVirtualWalls()
{
// TODO(Mamoru Sobue): collision stop pose depends on before/after occlusion clearance
motion_utils::VirtualWalls virtual_walls;
motion_utils::VirtualWall wall;
wall.style = motion_utils::VirtualWallType::stop;

if (debug_data_.collision_stop_wall_pose) {
wall.style = motion_utils::VirtualWallType::stop;
wall.text = "intersection";
wall.ns = "intersection" + std::to_string(module_id_) + "_";
wall.pose = debug_data_.collision_stop_wall_pose.value();
virtual_walls.push_back(wall);
}
if (debug_data_.occlusion_first_stop_wall_pose) {
wall.style = motion_utils::VirtualWallType::stop;
wall.text = "intersection";
wall.ns = "intersection_occlusion_first_stop" + std::to_string(module_id_) + "_";
wall.pose = debug_data_.occlusion_first_stop_wall_pose.value();
virtual_walls.push_back(wall);
}
if (debug_data_.occlusion_stop_wall_pose) {
wall.style = motion_utils::VirtualWallType::stop;
wall.text = "intersection_occlusion";
wall.ns = "intersection_occlusion" + std::to_string(module_id_) + "_";
wall.pose = debug_data_.occlusion_stop_wall_pose.value();
virtual_walls.push_back(wall);
}
if (debug_data_.absence_traffic_light_creep_wall) {
wall.style = motion_utils::VirtualWallType::slowdown;
wall.text = "intersection_occlusion";
wall.ns = "intersection_occlusion" + std::to_string(module_id_) + "_";
wall.pose = debug_data_.absence_traffic_light_creep_wall.value();
virtual_walls.push_back(wall);
}
return virtual_walls;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ IntersectionModuleManager::IntersectionModuleManager(rclcpp::Node & node)
getOrDeclareParameter<double>(node, ns + ".occlusion.stop_release_margin_time");
ip.occlusion.temporal_stop_before_attention_area =
getOrDeclareParameter<bool>(node, ns + ".occlusion.temporal_stop_before_attention_area");
ip.occlusion.peeking_offset_absence_tl =
getOrDeclareParameter<double>(node, ns + ".occlusion.peeking_offset_absence_tl");
ip.occlusion.absence_traffic_light.creep_velocity =
getOrDeclareParameter<double>(node, ns + ".occlusion.absence_traffic_light.creep_velocity");
ip.occlusion.absence_traffic_light.maximum_peeking_distance = getOrDeclareParameter<double>(
node, ns + ".occlusion.absence_traffic_light.maximum_peeking_distance");
}

void IntersectionModuleManager::launchNewModules(
Expand Down
Loading

0 comments on commit 29f9504

Please sign in to comment.