Skip to content

Commit

Permalink
chore(autoware_behavior_path_dynamic_obstacle_avoidance_module): rena…
Browse files Browse the repository at this point in the history
…me package and namespace

Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota committed May 30, 2024
1 parent 7c992ea commit 4aa8306
Show file tree
Hide file tree
Showing 20 changed files with 59 additions and 59 deletions.
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,16 @@
namespace behavior_path_planner
{

class DynamicAvoidanceModuleManager : public SceneModuleManagerInterface
class DynamicObstacleAvoidanceModuleManager : public SceneModuleManagerInterface
{
public:
DynamicAvoidanceModuleManager() : SceneModuleManagerInterface{"dynamic_avoidance"} {}
DynamicObstacleAvoidanceModuleManager() : SceneModuleManagerInterface{"dynamic_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 +52,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)

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 @@ void DynamicAvoidanceModuleManager::init(rclcpp::Node * node)
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 @@ 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 4aa8306

Please sign in to comment.