-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into port-autoware-route-handler
- Loading branch information
Showing
48 changed files
with
2,817 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
common/autoware_trajectory/include/autoware/trajectory/utils/curvature_utils.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2025 TIER IV, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef AUTOWARE__TRAJECTORY__UTILS__CURVATURE_UTILS_HPP_ | ||
#define AUTOWARE__TRAJECTORY__UTILS__CURVATURE_UTILS_HPP_ | ||
|
||
#include "autoware/trajectory/forward.hpp" | ||
|
||
#include <algorithm> | ||
|
||
namespace autoware::trajectory | ||
{ | ||
template <class PointType> | ||
double max_curvature(const Trajectory<PointType> & trajectory) | ||
{ | ||
double max_curvature = 0.0; | ||
for (const auto & base : trajectory.get_internal_bases()) { | ||
const auto curvature = trajectory.curvature(base); | ||
max_curvature = std::max(max_curvature, curvature); | ||
} | ||
return max_curvature; | ||
} | ||
|
||
} // namespace autoware::trajectory | ||
|
||
#endif // AUTOWARE__TRAJECTORY__UTILS__CURVATURE_UTILS_HPP_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
planning/autoware_objects_of_interest_marker_interface/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
project(autoware_objects_of_interest_marker_interface) | ||
|
||
### Compile options | ||
if(NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 17) | ||
endif() | ||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic -Werror) | ||
endif() | ||
|
||
find_package(ament_cmake_auto REQUIRED) | ||
ament_auto_find_build_dependencies() | ||
|
||
ament_auto_add_library(autoware_objects_of_interest_marker_interface SHARED | ||
src/coloring.cpp | ||
src/objects_of_interest_marker_interface.cpp | ||
src/marker_utils.cpp | ||
) | ||
|
||
# Test | ||
if(BUILD_TESTING) | ||
find_package(ament_lint_auto REQUIRED) | ||
ament_lint_auto_find_test_dependencies() | ||
endif() | ||
|
||
ament_auto_package() |
46 changes: 46 additions & 0 deletions
46
planning/autoware_objects_of_interest_marker_interface/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Objects Of Interest Marker Interface | ||
|
||
## Overview | ||
|
||
`autoware_objects_of_interest_marker_interface` is a collection of object visualization function packages. | ||
|
||
## Design | ||
|
||
This package implement a library to manage and visualize the object information by construct and publish it as marker array to rviz. | ||
|
||
For a object to be visualized, it has three import characteristics. | ||
|
||
- pose the position of the object | ||
- shape the shape of the Bounding box of the object | ||
- color the color of the Bounding box of the object | ||
|
||
## Usage | ||
|
||
### init | ||
|
||
include the header file to use then init the library | ||
|
||
```cpp | ||
#include <autoware/objects_of_interest_marker_interface/objects_of_interest_marker_interface.hpp> | ||
|
||
autoware::objects_of_interest_marker_interface::ObjectsOfInterestMarkerInterface | ||
objects_of_interest_marker_interface_{this, "obstacle_cruise_planner"}; | ||
``` | ||
### insert | ||
insert object information to the 'objects_of_interest_marker_interface' manager | ||
```cpp | ||
using autoware::objects_of_interest_marker_interface::ColorName; | ||
objects_of_interest_marker_interface_.insertObjectData( | ||
stopped_obstacle.pose, stopped_obstacle.shape, ColorName::RED); | ||
``` | ||
|
||
### publish | ||
|
||
publish object information to the rviz to visualize | ||
|
||
```cpp | ||
objects_of_interest_marker_interface_.publishMarkerArray(); | ||
``` |
31 changes: 31 additions & 0 deletions
31
...erest_marker_interface/include/autoware/objects_of_interest_marker_interface/coloring.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2023 TIER IV, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef AUTOWARE__OBJECTS_OF_INTEREST_MARKER_INTERFACE__COLORING_HPP_ | ||
#define AUTOWARE__OBJECTS_OF_INTEREST_MARKER_INTERFACE__COLORING_HPP_ | ||
#include "autoware/objects_of_interest_marker_interface/marker_data.hpp" | ||
|
||
#include <autoware_utils/ros/marker_helper.hpp> | ||
|
||
#include <std_msgs/msg/color_rgba.hpp> | ||
|
||
namespace autoware::objects_of_interest_marker_interface::coloring | ||
{ | ||
std_msgs::msg::ColorRGBA getGreen(const float alpha); | ||
std_msgs::msg::ColorRGBA getAmber(const float alpha); | ||
std_msgs::msg::ColorRGBA getRed(const float alpha); | ||
std_msgs::msg::ColorRGBA getGray(const float alpha); | ||
} // namespace autoware::objects_of_interest_marker_interface::coloring | ||
|
||
#endif // AUTOWARE__OBJECTS_OF_INTEREST_MARKER_INTERFACE__COLORING_HPP_ |
34 changes: 34 additions & 0 deletions
34
...st_marker_interface/include/autoware/objects_of_interest_marker_interface/marker_data.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright 2023 TIER IV, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef AUTOWARE__OBJECTS_OF_INTEREST_MARKER_INTERFACE__MARKER_DATA_HPP_ | ||
#define AUTOWARE__OBJECTS_OF_INTEREST_MARKER_INTERFACE__MARKER_DATA_HPP_ | ||
|
||
#include <autoware_perception_msgs/msg/predicted_object.hpp> | ||
#include <geometry_msgs/msg/pose.hpp> | ||
#include <std_msgs/msg/color_rgba.hpp> | ||
|
||
namespace autoware::objects_of_interest_marker_interface | ||
{ | ||
struct ObjectMarkerData | ||
{ | ||
geometry_msgs::msg::Pose pose{}; | ||
autoware_perception_msgs::msg::Shape shape{}; | ||
std_msgs::msg::ColorRGBA color; | ||
}; | ||
|
||
enum class ColorName { GRAY, GREEN, AMBER, RED }; | ||
} // namespace autoware::objects_of_interest_marker_interface | ||
|
||
#endif // AUTOWARE__OBJECTS_OF_INTEREST_MARKER_INTERFACE__MARKER_DATA_HPP_ |
Oops, something went wrong.