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

chore(static_obstacle_avoidance, dynamic_obstacle_avoidance): rename avoidance package #7168

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<arg name="enable_all_modules_auto_mode"/>
<arg name="is_simulation"/>

<arg name="launch_avoidance_module" default="true"/>
<arg name="launch_static_obstacle_avoidance" default="true"/>
<arg name="launch_avoidance_by_lane_change_module" default="true"/>
<arg name="launch_dynamic_avoidance_module" default="true"/>
<arg name="launch_dynamic_obstacle_avoidance" default="true"/>
<arg name="launch_lane_change_right_module" default="true"/>
<arg name="launch_lane_change_left_module" default="true"/>
<arg name="launch_external_request_lane_change_right_module" default="true"/>
Expand Down Expand Up @@ -42,13 +42,13 @@
<arg name="behavior_path_planner_launch_modules" default="["/>
<let
name="behavior_path_planner_launch_modules"
value="$(eval &quot;'$(var behavior_path_planner_launch_modules)' + 'behavior_path_planner::AvoidanceModuleManager, '&quot;)"
if="$(var launch_avoidance_module)"
value="$(eval &quot;'$(var behavior_path_planner_launch_modules)' + 'behavior_path_planner::StaticObstacleAvoidanceModuleManager, '&quot;)"
if="$(var launch_static_obstacle_avoidance)"
/>
<let
name="behavior_path_planner_launch_modules"
value="$(eval &quot;'$(var behavior_path_planner_launch_modules)' + 'behavior_path_planner::DynamicAvoidanceModuleManager, '&quot;)"
if="$(var launch_dynamic_avoidance_module)"
value="$(eval &quot;'$(var behavior_path_planner_launch_modules)' + 'behavior_path_planner::DynamicObstacleAvoidanceModuleManager, '&quot;)"
if="$(var launch_dynamic_obstacle_avoidance)"
/>
<let
name="behavior_path_planner_launch_modules"
Expand Down Expand Up @@ -206,9 +206,9 @@
<param name="enable_all_modules_auto_mode" value="$(var enable_all_modules_auto_mode)"/>
<param name="is_simulation" value="$(var is_simulation)"/>
<param from="$(var behavior_path_planner_side_shift_module_param_path)"/>
<param from="$(var behavior_path_planner_avoidance_module_param_path)"/>
<param from="$(var behavior_path_planner_static_obstacle_avoidance_module_param_path)"/>
<param from="$(var behavior_path_planner_avoidance_by_lc_module_param_path)"/>
<param from="$(var behavior_path_planner_dynamic_avoidance_module_param_path)"/>
<param from="$(var behavior_path_planner_dynamic_obstacle_avoidance_module_param_path)"/>
<param from="$(var behavior_path_planner_lane_change_module_param_path)"/>
<param from="$(var behavior_path_planner_goal_planner_module_param_path)"/>
<param from="$(var behavior_path_planner_start_planner_module_param_path)"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(behavior_path_dynamic_avoidance_module)
project(autoware_behavior_path_dynamic_obstacle_avoidance_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Dynamic avoidance design
# Avoidance module for dynamic objects

This module is under development.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef BEHAVIOR_PATH_DYNAMIC_AVOIDANCE_MODULE__MANAGER_HPP_
#define BEHAVIOR_PATH_DYNAMIC_AVOIDANCE_MODULE__MANAGER_HPP_
#ifndef AUTOWARE_BEHAVIOR_PATH_DYNAMIC_OBSTACLE_AVOIDANCE_MODULE__MANAGER_HPP_
#define AUTOWARE_BEHAVIOR_PATH_DYNAMIC_OBSTACLE_AVOIDANCE_MODULE__MANAGER_HPP_

#include "behavior_path_dynamic_avoidance_module/scene.hpp"
#include "autoware_behavior_path_dynamic_obstacle_avoidance_module/scene.hpp"
#include "behavior_path_planner_common/interface/scene_module_manager_interface.hpp"

#include <rclcpp/rclcpp.hpp>
Expand All @@ -28,16 +28,19 @@
namespace behavior_path_planner
{

class DynamicAvoidanceModuleManager : public SceneModuleManagerInterface
class DynamicObstacleAvoidanceModuleManager : public SceneModuleManagerInterface
{
public:
DynamicAvoidanceModuleManager() : SceneModuleManagerInterface{"dynamic_avoidance"} {}
DynamicObstacleAvoidanceModuleManager()
: SceneModuleManagerInterface{"dynamic_obstacle_avoidance"}
{
}

void init(rclcpp::Node * node) override;

std::unique_ptr<SceneModuleInterface> createNewSceneModuleInstance() override
{
return std::make_unique<DynamicAvoidanceModule>(
return std::make_unique<DynamicObstacleAvoidanceModule>(
name_, *node_, parameters_, rtc_interface_ptr_map_,
objects_of_interest_marker_interface_ptr_map_);
}
Expand All @@ -52,4 +55,4 @@ class DynamicAvoidanceModuleManager : public SceneModuleManagerInterface

} // namespace behavior_path_planner

#endif // BEHAVIOR_PATH_DYNAMIC_AVOIDANCE_MODULE__MANAGER_HPP_
#endif // AUTOWARE_BEHAVIOR_PATH_DYNAMIC_OBSTACLE_AVOIDANCE_MODULE__MANAGER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef BEHAVIOR_PATH_DYNAMIC_AVOIDANCE_MODULE__SCENE_HPP_
#define BEHAVIOR_PATH_DYNAMIC_AVOIDANCE_MODULE__SCENE_HPP_
#ifndef AUTOWARE_BEHAVIOR_PATH_DYNAMIC_OBSTACLE_AVOIDANCE_MODULE__SCENE_HPP_
#define AUTOWARE_BEHAVIOR_PATH_DYNAMIC_OBSTACLE_AVOIDANCE_MODULE__SCENE_HPP_

#include "behavior_path_planner_common/interface/scene_module_interface.hpp"
#include "tier4_autoware_utils/system/stop_watch.hpp"
Expand Down Expand Up @@ -164,7 +164,7 @@ struct LatFeasiblePaths
std::vector<geometry_msgs::msg::Point> left_path;
std::vector<geometry_msgs::msg::Point> right_path;
};
class DynamicAvoidanceModule : public SceneModuleInterface
class DynamicObstacleAvoidanceModule : public SceneModuleInterface
{
public:
struct DynamicAvoidanceObject
Expand Down Expand Up @@ -336,7 +336,7 @@ class DynamicAvoidanceModule : public SceneModuleInterface
std::string reason{""};
};

DynamicAvoidanceModule(
DynamicObstacleAvoidanceModule(
const std::string & name, rclcpp::Node & node,
std::shared_ptr<DynamicAvoidanceParameters> parameters,
const std::unordered_map<std::string, std::shared_ptr<RTCInterface>> & rtc_interface_ptr_map,
Expand Down Expand Up @@ -444,8 +444,8 @@ class DynamicAvoidanceModule : public SceneModuleInterface
getLogger(), parameters_->enable_debug_info, reason_text.c_str(), obj_uuid.c_str());
}

std::vector<DynamicAvoidanceModule::DynamicAvoidanceObject> target_objects_;
// std::vector<DynamicAvoidanceModule::DynamicAvoidanceObject> prev_target_objects_;
std::vector<DynamicObstacleAvoidanceModule::DynamicAvoidanceObject> target_objects_;
// std::vector<DynamicObstacleAvoidanceModule::DynamicAvoidanceObject> prev_target_objects_;
std::optional<std::vector<PathPointWithLaneId>> prev_input_ref_path_points_{std::nullopt};
std::optional<std::vector<PathPointWithLaneId>> ref_path_before_lane_change_{std::nullopt};
std::shared_ptr<DynamicAvoidanceParameters> parameters_;
Expand All @@ -458,4 +458,4 @@ class DynamicAvoidanceModule : public SceneModuleInterface
};
} // namespace behavior_path_planner

#endif // BEHAVIOR_PATH_DYNAMIC_AVOIDANCE_MODULE__SCENE_HPP_
#endif // AUTOWARE_BEHAVIOR_PATH_DYNAMIC_OBSTACLE_AVOIDANCE_MODULE__SCENE_HPP_
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>behavior_path_dynamic_avoidance_module</name>
<name>autoware_behavior_path_dynamic_obstacle_avoidance_module</name>
<version>0.1.0</version>
<description>The behavior_path_dynamic_avoidance_module package</description>
<description>The autoware_behavior_path_dynamic_obstacle_avoidance_module package</description>

<maintainer email="[email protected]">Takayuki Murooka</maintainer>
<maintainer email="[email protected]">Yuki Takagi</maintainer>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<library path="autoware_behavior_path_dynamic_obstacle_avoidance_module">
<class type="behavior_path_planner::DynamicObstacleAvoidanceModuleManager" base_class_type="behavior_path_planner::SceneModuleManagerInterface"/>
</library>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "behavior_path_dynamic_avoidance_module/manager.hpp"
#include "autoware_behavior_path_dynamic_obstacle_avoidance_module/manager.hpp"

#include "tier4_autoware_utils/ros/update_param.hpp"

Expand All @@ -37,7 +37,7 @@
}
} // namespace

void DynamicAvoidanceModuleManager::init(rclcpp::Node * node)
void DynamicObstacleAvoidanceModuleManager::init(rclcpp::Node * node)

Check notice on line 40 in planning/autoware_behavior_path_dynamic_obstacle_avoidance_module/src/manager.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Large Method

DynamicAvoidanceModuleManager::init is no longer above the threshold for lines of code. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check notice on line 40 in planning/autoware_behavior_path_dynamic_obstacle_avoidance_module/src/manager.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

ℹ New issue: Large Method

DynamicObstacleAvoidanceModuleManager::init has 96 lines, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
{
// init manager interface
initInterface(node, {""});
Expand Down Expand Up @@ -149,7 +149,7 @@
parameters_ = std::make_shared<DynamicAvoidanceParameters>(p);
}

void DynamicAvoidanceModuleManager::updateModuleParams(
void DynamicObstacleAvoidanceModuleManager::updateModuleParams(

Check notice on line 152 in planning/autoware_behavior_path_dynamic_obstacle_avoidance_module/src/manager.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Large Method

DynamicAvoidanceModuleManager::updateModuleParams is no longer above the threshold for lines of code. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check notice on line 152 in planning/autoware_behavior_path_dynamic_obstacle_avoidance_module/src/manager.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

ℹ New issue: Large Method

DynamicObstacleAvoidanceModuleManager::updateModuleParams has 121 lines, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
[[maybe_unused]] const std::vector<rclcpp::Parameter> & parameters)
{
using tier4_autoware_utils::updateParam;
Expand Down Expand Up @@ -287,13 +287,13 @@
});
}

bool DynamicAvoidanceModuleManager::isAlwaysExecutableModule() const
bool DynamicObstacleAvoidanceModuleManager::isAlwaysExecutableModule() const
{
return true;
}
} // namespace behavior_path_planner

#include <pluginlib/class_list_macros.hpp>
PLUGINLIB_EXPORT_CLASS(
behavior_path_planner::DynamicAvoidanceModuleManager,
behavior_path_planner::DynamicObstacleAvoidanceModuleManager,
behavior_path_planner::SceneModuleManagerInterface)
Loading
Loading