Skip to content

Commit

Permalink
chore(static_obstacle_avoidance, dynamic_obstacle_avoidance): rename …
Browse files Browse the repository at this point in the history
…avoidance package (#7168)

* chore(autoware_behavior_path_static_obstacle_avoidance_module): rename package and namespace

Signed-off-by: satoshi-ota <[email protected]>

* chore(autoware_behavior_path_dynamic_obstacle_avoidance_module): rename package and namespace

Signed-off-by: satoshi-ota <[email protected]>

* chore(tier4_planning_launch): update module name

Signed-off-by: satoshi-ota <[email protected]>

* chore(rtc_interface): update module name

Signed-off-by: satoshi-ota <[email protected]>

* chore(avoidance): update module param file name

Signed-off-by: satoshi-ota <[email protected]>

* chore(avoidance): update schema file name

Signed-off-by: satoshi-ota <[email protected]>

* fix(AbLC): fix file name

Signed-off-by: satoshi-ota <[email protected]>

* docs: update module name

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota authored May 31, 2024
1 parent a4a3b82 commit badf1f7
Show file tree
Hide file tree
Showing 81 changed files with 375 additions and 335 deletions.
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 @@ PolygonGenerationMethod convertToPolygonGenerationMethod(const std::string & str
}
} // namespace

void DynamicAvoidanceModuleManager::init(rclcpp::Node * node)
void DynamicObstacleAvoidanceModuleManager::init(rclcpp::Node * node)
{
// init manager interface
initInterface(node, {""});
Expand Down Expand Up @@ -149,7 +149,7 @@ void DynamicAvoidanceModuleManager::init(rclcpp::Node * node)
parameters_ = std::make_shared<DynamicAvoidanceParameters>(p);
}

void DynamicAvoidanceModuleManager::updateModuleParams(
void DynamicObstacleAvoidanceModuleManager::updateModuleParams(
[[maybe_unused]] const std::vector<rclcpp::Parameter> & parameters)
{
using tier4_autoware_utils::updateParam;
Expand Down Expand Up @@ -287,13 +287,13 @@ void DynamicAvoidanceModuleManager::updateModuleParams(
});
}

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

0 comments on commit badf1f7

Please sign in to comment.