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

refactor(autoware_velocity_run_out_module): prefix package with autoware_ and move code to the autoware namespace #7154

Merged
merged 2 commits into from
Jun 6, 2024
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ planning/behavior_velocity_no_stopping_area_module/** [email protected] s
planning/behavior_velocity_occlusion_spot_module/** [email protected] [email protected] [email protected]
planning/behavior_velocity_out_of_lane_module/** [email protected] [email protected] [email protected] [email protected]
planning/behavior_velocity_planner_common/** [email protected] [email protected] [email protected] [email protected] [email protected]
planning/behavior_velocity_run_out_module/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/autoware_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_traffic_light_module/** [email protected] [email protected] [email protected] [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
/>
<let
name="behavior_velocity_planner_launch_modules"
value="$(eval &quot;'$(var behavior_velocity_planner_launch_modules)' + 'behavior_velocity_planner::RunOutModulePlugin, '&quot;)"
value="$(eval &quot;'$(var behavior_velocity_planner_launch_modules)' + 'autoware::behavior_velocity_planner::RunOutModulePlugin, '&quot;)"
if="$(var launch_run_out_module)"
/>
<let
Expand Down
2 changes: 1 addition & 1 deletion planning/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ nav:
- 'No Stopping Area': planning/behavior_velocity_no_stopping_area_module
- 'Occlusion Spot': planning/behavior_velocity_occlusion_spot_module
- 'Out of Lane': planning/behavior_velocity_out_of_lane_module
- 'Run Out': planning/behavior_velocity_run_out_module
- 'Run Out': planning/autoware_behavior_velocity_run_out_module
- 'Speed Bump': planning/behavior_velocity_speed_bump_module
- 'Stop Line': planning/behavior_velocity_stop_line_module
- 'Traffic Light': planning/behavior_velocity_traffic_light_module
Expand Down
2 changes: 1 addition & 1 deletion planning/autoware_behavior_velocity_planner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It loads modules as plugins. Please refer to the links listed below for detail o
- [Traffic Light](../behavior_velocity_traffic_light_module/README.md)
- [Occlusion Spot](../behavior_velocity_occlusion_spot_module/README.md)
- [No Stopping Area](../behavior_velocity_no_stopping_area_module/README.md)
- [Run Out](../behavior_velocity_run_out_module/README.md)
- [Run Out](../autoware_behavior_velocity_run_out_module/README.md)
- [Speed Bump](../behavior_velocity_speed_bump_module/README.md)
- [Out of Lane](../behavior_velocity_out_of_lane_module/README.md)

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 @@ -65,6 +65,7 @@

<test_depend>ament_cmake_ros</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_behavior_velocity_run_out_module</test_depend>
<test_depend>autoware_behavior_velocity_virtual_traffic_light_module</test_depend>
<test_depend>autoware_lint_common</test_depend>
<test_depend>behavior_velocity_blind_spot_module</test_depend>
Expand All @@ -75,7 +76,6 @@
<test_depend>behavior_velocity_no_stopping_area_module</test_depend>
<test_depend>behavior_velocity_occlusion_spot_module</test_depend>
<test_depend>behavior_velocity_out_of_lane_module</test_depend>
<test_depend>behavior_velocity_run_out_module</test_depend>
<test_depend>behavior_velocity_speed_bump_module</test_depend>
<test_depend>behavior_velocity_stop_line_module</test_depend>
<test_depend>behavior_velocity_traffic_light_module</test_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ std::shared_ptr<BehaviorVelocityPlannerNode> generateNode()
module_names.emplace_back("behavior_velocity_planner::NoStoppingAreaModulePlugin");
module_names.emplace_back("behavior_velocity_planner::StopLineModulePlugin");
module_names.emplace_back("behavior_velocity_planner::OcclusionSpotModulePlugin");
module_names.emplace_back("behavior_velocity_planner::RunOutModulePlugin");
module_names.emplace_back("autoware::behavior_velocity_planner::RunOutModulePlugin");
module_names.emplace_back("behavior_velocity_planner::SpeedBumpModulePlugin");
module_names.emplace_back("behavior_velocity_planner::OutOfLaneModulePlugin");
module_names.emplace_back("behavior_velocity_planner::NoDrivableLaneModulePlugin");
Expand All @@ -103,7 +103,7 @@ std::shared_ptr<BehaviorVelocityPlannerNode> generateNode()
get_behavior_velocity_module_config_no_prefix("intersection"),
get_behavior_velocity_module_config_no_prefix("no_stopping_area"),
get_behavior_velocity_module_config_no_prefix("occlusion_spot"),
get_behavior_velocity_module_config_no_prefix("run_out"),
get_behavior_velocity_module_config("run_out"),
get_behavior_velocity_module_config_no_prefix("speed_bump"),
get_behavior_velocity_module_config_no_prefix("stop_line"),
get_behavior_velocity_module_config_no_prefix("traffic_light"),
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_run_out_module)
project(autoware_behavior_velocity_run_out_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
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_run_out_module</name>
<name>autoware_behavior_velocity_run_out_module</name>
<version>0.1.0</version>
<description>The behavior_velocity_run_out_module package</description>
<description>The autoware_behavior_velocity_run_out_module package</description>

<maintainer email="[email protected]">Tomohito Ando</maintainer>
<maintainer email="[email protected]">Makoto Kurihara</maintainer>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<library path="autoware_behavior_velocity_run_out_module">
<class type="autoware::behavior_velocity_planner::RunOutModulePlugin" base_class_type="behavior_velocity_planner::PluginInterface"/>
</library>
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using tier4_autoware_utils::createMarkerOrientation;
using tier4_autoware_utils::createMarkerScale;
using tier4_autoware_utils::createPoint;

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
namespace
{
Expand Down Expand Up @@ -368,4 +368,4 @@ motion_utils::VirtualWalls RunOutModule::createVirtualWalls()
return debug_ptr_->createVirtualWalls();
}

} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
#include <memory>
#include <string>
#include <vector>
namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
using ::behavior_velocity_planner::Polygon2d;
using sensor_msgs::msg::PointCloud2;
using tier4_debug_msgs::msg::Float32MultiArrayStamped;
using tier4_debug_msgs::msg::Int32Stamped;
Expand Down Expand Up @@ -149,6 +150,6 @@ class RunOutDebug
double height_{0};
};

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

#endif // DEBUG_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@
#include <limits>
#include <string>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
using ::behavior_velocity_planner::Point2d;
using ::behavior_velocity_planner::splineInterpolate;
namespace
{
// create quaternion facing to the nearest trajectory point
Expand Down Expand Up @@ -600,4 +602,4 @@ void DynamicObstacleCreatorForPoints::onSynchronizedPointCloud(
std::lock_guard<std::mutex> lock(mutex_);
obstacle_points_map_filtered_ = lateral_nearest_points;
}
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@
#include <memory>
#include <vector>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
using autoware_perception_msgs::msg::ObjectClassification;
using autoware_perception_msgs::msg::PredictedObjects;
using autoware_perception_msgs::msg::Shape;
using ::behavior_velocity_planner::PlannerData;
using run_out_utils::DynamicObstacle;
using run_out_utils::DynamicObstacleData;
using run_out_utils::DynamicObstacleParam;
Expand All @@ -55,6 +56,7 @@ using run_out_utils::PredictedPath;
using tier4_planning_msgs::msg::PathPointWithLaneId;
using tier4_planning_msgs::msg::PathWithLaneId;
using PathPointsWithLaneId = std::vector<tier4_planning_msgs::msg::PathPointWithLaneId>;
using ::behavior_velocity_planner::Polygons2d;

/**
* @brief base class for creating dynamic obstacles from multiple types of input
Expand Down Expand Up @@ -171,6 +173,6 @@ class DynamicObstacleCreatorForPoints : public DynamicObstacleCreator
pcl::PointCloud<pcl::PointXYZ> obstacle_points_map_filtered_;
};

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

#endif // DYNAMIC_OBSTACLE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
#include <utility>
#include <vector>

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

RunOutModuleManager::RunOutModuleManager(rclcpp::Node & node)
: SceneModuleManagerInterface(node, getModuleName())
{
Expand Down Expand Up @@ -198,8 +198,9 @@ void RunOutModuleManager::setDynamicObstacleCreator(
break;
}
}
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner

#include <pluginlib/class_list_macros.hpp>
PLUGINLIB_EXPORT_CLASS(
behavior_velocity_planner::RunOutModulePlugin, behavior_velocity_planner::PluginInterface)
autoware::behavior_velocity_planner::RunOutModulePlugin,
behavior_velocity_planner::PluginInterface)
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@

#include <memory>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
using ::behavior_velocity_planner::PluginWrapper;
using ::behavior_velocity_planner::SceneModuleInterface;
using ::behavior_velocity_planner::SceneModuleManagerInterface;
class RunOutModuleManager : public SceneModuleManagerInterface
{
public:
Expand All @@ -49,6 +52,6 @@ class RunOutModulePlugin : public PluginWrapper<RunOutModuleManager>
{
};

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

#endif // MANAGER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "path_utils.hpp"

#include <motion_utils/trajectory/trajectory.hpp>
namespace behavior_velocity_planner::run_out_utils
namespace autoware::behavior_velocity_planner::run_out_utils
{
geometry_msgs::msg::Point findLongitudinalNearestPoint(
const std::vector<tier4_planning_msgs::msg::PathPointWithLaneId> & points,
Expand All @@ -36,4 +36,4 @@ geometry_msgs::msg::Point findLongitudinalNearestPoint(
return min_dist_point;
}

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

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
namespace run_out_utils
{
Expand All @@ -36,5 +36,5 @@ geometry_msgs::msg::Point findLongitudinalNearestPoint(
const std::vector<geometry_msgs::msg::Point> & target_points);

} // namespace run_out_utils
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner
#endif // PATH_UTILS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@
#include <limits>
#include <utility>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
namespace bg = boost::geometry;
using ::behavior_velocity_planner::PlanningBehavior;
using object_recognition_utils::convertLabelToString;
namespace planning_utils = ::behavior_velocity_planner::planning_utils;
using ::behavior_velocity_planner::getCrosswalksOnPath;
using ::behavior_velocity_planner::Polygon2d;

RunOutModule::RunOutModule(
const int64_t module_id, const std::shared_ptr<const PlannerData> & planner_data,
Expand Down Expand Up @@ -1031,4 +1035,4 @@ bool RunOutModule::isMomentaryDetection()

return elapsed_time_since_detection < planner_param_.ignore_momentary_detection.time_threshold;
}
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <utility>
#include <vector>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
using autoware_perception_msgs::msg::PredictedObjects;
using run_out_utils::PlannerParam;
Expand All @@ -39,6 +39,11 @@ using tier4_debug_msgs::msg::Float32Stamped;
using tier4_planning_msgs::msg::PathPointWithLaneId;
using tier4_planning_msgs::msg::PathWithLaneId;
using BasicPolygons2d = std::vector<lanelet::BasicPolygon2d>;
using ::behavior_velocity_planner::PathWithLaneId;
using ::behavior_velocity_planner::PlannerData;
using ::behavior_velocity_planner::Polygon2d;
using ::behavior_velocity_planner::SceneModuleInterface;
using ::behavior_velocity_planner::StopReason;

class RunOutModule : public SceneModuleInterface
{
Expand Down Expand Up @@ -177,6 +182,6 @@ class RunOutModule : public SceneModuleInterface

bool isMomentaryDetection();
};
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner

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

#include "state_machine.hpp"

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
namespace run_out_utils
{
Expand Down Expand Up @@ -107,4 +107,4 @@ void StateMachine::updateState(const StateInput & state_input, rclcpp::Clock & c
}

} // namespace run_out_utils
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <string>

namespace behavior_velocity_planner::run_out_utils
namespace autoware::behavior_velocity_planner::run_out_utils
{

class StateMachine
Expand Down Expand Up @@ -53,6 +53,6 @@ class StateMachine
std::optional<DynamicObstacle> prev_obstacle_{};
std::optional<DynamicObstacle> target_obstacle_{};
};
} // namespace behavior_velocity_planner::run_out_utils
} // namespace autoware::behavior_velocity_planner::run_out_utils

#endif // STATE_MACHINE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@
#endif
#include <motion_utils/trajectory/trajectory.hpp>
#include <tier4_autoware_utils/geometry/geometry.hpp>
namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
using ::behavior_velocity_planner::DetectionRange;
using ::behavior_velocity_planner::PathPointWithLaneId;
namespace planning_utils = ::behavior_velocity_planner::planning_utils;
namespace run_out_utils
{
Polygon2d createBoostPolyFromMsg(const std::vector<geometry_msgs::msg::Point> & input_poly)
Expand Down Expand Up @@ -450,4 +453,4 @@ Polygons2d createMandatoryDetectionAreaPolygon(
}

} // namespace run_out_utils
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#include <string>
#include <vector>
namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
namespace run_out_utils
{
Expand All @@ -38,6 +38,8 @@ using autoware_perception_msgs::msg::ObjectClassification;
using autoware_perception_msgs::msg::PredictedObjects;
using autoware_perception_msgs::msg::Shape;
using autoware_planning_msgs::msg::PathPoint;
using ::behavior_velocity_planner::PlannerData;
using ::behavior_velocity_planner::Polygons2d;
using tier4_autoware_utils::Box2d;
using tier4_autoware_utils::LineString2d;
using tier4_autoware_utils::Point2d;
Expand Down Expand Up @@ -271,5 +273,5 @@ Polygons2d createMandatoryDetectionAreaPolygon(
const PathWithLaneId & path, const PlannerData & planner_data,
const PlannerParam & planner_param);
} // namespace run_out_utils
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner
#endif // UTILS_HPP_
3 changes: 0 additions & 3 deletions planning/behavior_velocity_run_out_module/plugins.xml

This file was deleted.

Loading