Skip to content

Commit

Permalink
refactor(behavior_velocity_template_module): prefix package and names…
Browse files Browse the repository at this point in the history
…pace with autoware_ (#6639)

Signed-off-by: Esteve Fernandez <[email protected]>
  • Loading branch information
esteve authored and KhalilSelyan committed Jul 22, 2024
1 parent 8dbea11 commit 0d23fbd
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ perception/traffic_light_occlusion_predictor/** [email protected] tao.zhon
perception/traffic_light_visualization/** [email protected] [email protected]
planning/autoware_behavior_path_external_request_lane_change_module/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/autoware_behavior_velocity_planner/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/autoware_behavior_velocity_template_module/** [email protected]
planning/autoware_planning_test_manager/** [email protected] [email protected]
planning/autoware_remaining_distance_time_calculator/** [email protected]
planning/autoware_static_centerline_generator/** [email protected] [email protected]
Expand All @@ -173,7 +174,6 @@ planning/behavior_velocity_planner_common/** [email protected] isamu.taka
planning/behavior_velocity_run_out_module/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/behavior_velocity_speed_bump_module/** [email protected] [email protected] [email protected]
planning/behavior_velocity_stop_line_module/** [email protected] [email protected] [email protected] [email protected]
planning/behavior_velocity_template_module/** [email protected]
planning/behavior_velocity_traffic_light_module/** [email protected] [email protected] [email protected] [email protected]
planning/behavior_velocity_virtual_traffic_light_module/** [email protected] [email protected] [email protected]
planning/behavior_velocity_walkway_module/** [email protected] [email protected] [email protected] [email protected]
Expand Down
2 changes: 1 addition & 1 deletion planning/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ nav:
- 'Start Planner': planning/behavior_path_start_planner_module
- 'Behavior Velocity Planner':
- 'About Behavior Velocity': planning/autoware_behavior_velocity_planner
- 'Template for Custom Module': planning/behavior_velocity_template_module
- 'Template for Custom Module': planning/autoware_behavior_velocity_template_module
- 'Available Module':
- 'Blind Spot': planning/behavior_velocity_blind_spot_module
- 'Crosswalk': planning/behavior_velocity_crosswalk_module
Expand Down
2 changes: 1 addition & 1 deletion planning/autoware_behavior_velocity_planner/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<test_depend>behavior_velocity_traffic_light_module</test_depend>
<test_depend>behavior_velocity_virtual_traffic_light_module</test_depend>
<test_depend>behavior_velocity_walkway_module</test_depend>
<!--<test_depend>behavior_velocity_template_module</test_depend>-->
<!--<test_depend>autoware_behavior_velocity_template_module</test_depend>-->

<member_of_group>rosidl_interface_packages</member_of_group>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(behavior_velocity_template_module)
project(autoware_behavior_velocity_template_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The managing of your modules is defined in manager.hpp and manager.cpp. The mana
#### Constructor `TemplateModuleManager`

- This is the constructor of the `TemplateModuleManager` class, and it takes an `rclcpp::Node` reference as a parameter.
- It initializes a member variable `dummy_parameter` to 0.0.
- It initializes a member variable `dummy_parameter_` to 0.0.

#### `getModuleName()` Method

Expand Down
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_velocity_template_module</name>
<name>autoware_behavior_velocity_template_module</name>
<version>0.1.0</version>
<description>The behavior_velocity_template_module package</description>
<description>The autoware_behavior_velocity_template_module package</description>

<maintainer email="[email protected]">Daniel Sanchez</maintainer>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<library path="autoware_behavior_velocity_template_module">
<class type="autoware::behavior_velocity_planner::TemplateModulePlugin" base_class_type="autoware::behavior_velocity_planner::PluginInterface"/>
</library>
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
#include <utility>
#include <vector>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
using tier4_autoware_utils::getOrDeclareParameter;

TemplateModuleManager::TemplateModuleManager(rclcpp::Node & node)
: SceneModuleManagerInterface(node, getModuleName())
{
std::string ns(getModuleName());
dummy_parameter = getOrDeclareParameter<double>(node, ns + ".dummy");
dummy_parameter_ = getOrDeclareParameter<double>(node, ns + ".dummy");
}

void TemplateModuleManager::launchNewModules(
Expand All @@ -56,8 +56,9 @@ TemplateModuleManager::getModuleExpiredFunction(
};
}

} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner

#include <pluginlib/class_list_macros.hpp>
PLUGINLIB_EXPORT_CLASS(
behavior_velocity_planner::TemplateModulePlugin, behavior_velocity_planner::PluginInterface)
autoware::behavior_velocity_planner::TemplateModulePlugin,
behavior_velocity_planner::PluginInterface)
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <functional>
#include <memory>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
/**
* @brief Constructor for the TemplateModuleManager class.
Expand All @@ -37,7 +37,7 @@ namespace behavior_velocity_planner
*
* @param node A reference to the ROS node.
*/
class TemplateModuleManager : public SceneModuleManagerInterface
class TemplateModuleManager : public ::behavior_velocity_planner::SceneModuleManagerInterface
{
public:
explicit TemplateModuleManager(rclcpp::Node & node);
Expand All @@ -53,7 +53,7 @@ class TemplateModuleManager : public SceneModuleManagerInterface
const char * getModuleName() override { return "template"; }

private:
double dummy_parameter{0.0};
double dummy_parameter_{0.0};

/**
* @brief Launch new modules based on the provided path.
Expand Down Expand Up @@ -84,10 +84,11 @@ class TemplateModuleManager : public SceneModuleManagerInterface
* The TemplateModulePlugin class is used to integrate the TemplateModuleManager into the Behavior
* Velocity Planner.
*/
class TemplateModulePlugin : public PluginWrapper<TemplateModuleManager>
class TemplateModulePlugin
: public ::behavior_velocity_planner::PluginWrapper<TemplateModuleManager>
{
};

} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner

#endif // MANAGER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <string>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{

TemplateModule::TemplateModule(
Expand Down Expand Up @@ -49,4 +49,4 @@ bool TemplateModule::modifyPathVelocity(
return false;
}

} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
#include <utility>
#include <vector>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
using autoware_auto_planning_msgs::msg::PathWithLaneId;
using ::behavior_velocity_planner::SceneModuleInterface;
using ::behavior_velocity_planner::StopReason;

class TemplateModule : public SceneModuleInterface
{
Expand Down Expand Up @@ -64,6 +66,6 @@ class TemplateModule : public SceneModuleInterface
motion_utils::VirtualWalls createVirtualWalls() override;
};

} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner

#endif // SCENE_HPP_
3 changes: 0 additions & 3 deletions planning/behavior_velocity_template_module/plugins.xml

This file was deleted.

0 comments on commit 0d23fbd

Please sign in to comment.