Skip to content

Commit 3504e2e

Browse files
authored
Merge branch 'main' into fix/copy_input_source_when_rebuilding_ndt
2 parents 3088d04 + 1ed6fac commit 3504e2e

File tree

44 files changed

+1740
-887
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1740
-887
lines changed

common/autoware_auto_perception_rviz_plugin/include/autoware_auto_perception_rviz_plugin/object_detection/object_polygon_detail.hpp

+8
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC void calc_bounding_box_direction_lin
186186
const autoware_auto_perception_msgs::msg::Shape & shape,
187187
std::vector<geometry_msgs::msg::Point> & points);
188188

189+
AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC void calc_bounding_box_orientation_line_list(
190+
const autoware_auto_perception_msgs::msg::Shape & shape,
191+
std::vector<geometry_msgs::msg::Point> & points);
192+
189193
AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC void calc_2d_bounding_box_bottom_line_list(
190194
const autoware_auto_perception_msgs::msg::Shape & shape,
191195
std::vector<geometry_msgs::msg::Point> & points);
@@ -194,6 +198,10 @@ AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC void calc_2d_bounding_box_bottom_dir
194198
const autoware_auto_perception_msgs::msg::Shape & shape,
195199
std::vector<geometry_msgs::msg::Point> & points);
196200

201+
AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC void calc_2d_bounding_box_bottom_orientation_line_list(
202+
const autoware_auto_perception_msgs::msg::Shape & shape,
203+
std::vector<geometry_msgs::msg::Point> & points);
204+
197205
AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC void calc_cylinder_line_list(
198206
const autoware_auto_perception_msgs::msg::Shape & shape,
199207
std::vector<geometry_msgs::msg::Point> & points);

common/autoware_auto_perception_rviz_plugin/src/object_detection/object_polygon_detail.cpp

+101-47
Large diffs are not rendered by default.

common/autoware_auto_perception_rviz_plugin/src/object_detection/predicted_objects_display.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ std::vector<visualization_msgs::msg::Marker::SharedPtr> PredictedObjectsDisplay:
211211
auto marker_ptr = yaw_rate_marker.value();
212212
marker_ptr->header = msg->header;
213213
marker_ptr->id = uuid_to_marker_id(object.object_id);
214-
add_marker(marker_ptr);
214+
markers.push_back(marker_ptr);
215215
}
216216

217217
// Get marker for twist covariance

common/component_interface_specs/CMakeLists.txt

+1-22
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,8 @@ project(component_interface_specs)
44
find_package(autoware_cmake REQUIRED)
55
autoware_package()
66

7-
include_directories(
8-
include
9-
SYSTEM
10-
${rclcpp_INCLUDE_DIRS}
11-
${rosidl_runtime_cpp_INCLUDE_DIRS}
12-
${rcl_INCLUDE_DIRS}
13-
${autoware_adapi_v1_msgs_INCLUDE_DIRS}
14-
${autoware_auto_planning_msgs_INCLUDE_DIRS}
15-
${autoware_planning_msgs_INCLUDE_DIRS}
16-
${autoware_auto_vehicle_msgs_INCLUDE_DIRS}
17-
${tier4_control_msgs_INCLUDE_DIRS}
18-
${nav_msgs_INCLUDE_DIRS}
19-
${tier4_system_msgs_INCLUDE_DIRS}
20-
${tier4_vehicle_msgs_INCLUDE_DIRS}
21-
${autoware_auto_perception_msgs_INCLUDE_DIRS}
22-
${tier4_map_msgs_INCLUDE_DIRS}
23-
)
24-
257
if(BUILD_TESTING)
26-
ament_add_ros_isolated_gtest(test_component_interface_specs
8+
ament_auto_add_gtest(gtest_${PROJECT_NAME}
279
test/gtest_main.cpp
2810
test/test_planning.cpp
2911
test/test_control.cpp
@@ -33,9 +15,6 @@ if(BUILD_TESTING)
3315
test/test_perception.cpp
3416
test/test_vehicle.cpp
3517
)
36-
target_include_directories(test_component_interface_specs
37-
PRIVATE include
38-
)
3918
endif()
4019

4120
ament_auto_package()

common/component_interface_specs/include/component_interface_specs/planning.hpp

+17-46
Original file line numberDiff line numberDiff line change
@@ -17,77 +17,48 @@
1717

1818
#include <rclcpp/qos.hpp>
1919

20-
#include <autoware_adapi_v1_msgs/msg/route_state.hpp>
21-
#include <autoware_adapi_v1_msgs/srv/clear_route.hpp>
22-
#include <autoware_adapi_v1_msgs/srv/set_route.hpp>
23-
#include <autoware_adapi_v1_msgs/srv/set_route_points.hpp>
2420
#include <autoware_auto_planning_msgs/msg/trajectory.hpp>
2521
#include <autoware_planning_msgs/msg/lanelet_route.hpp>
22+
#include <tier4_planning_msgs/msg/route_state.hpp>
23+
#include <tier4_planning_msgs/srv/clear_route.hpp>
24+
#include <tier4_planning_msgs/srv/set_lanelet_route.hpp>
25+
#include <tier4_planning_msgs/srv/set_waypoint_route.hpp>
2626

2727
namespace planning_interface
2828
{
2929

30-
struct SetRoutePoints
30+
struct SetLaneletRoute
3131
{
32-
using Service = autoware_adapi_v1_msgs::srv::SetRoutePoints;
33-
static constexpr char name[] = "/planning/mission_planning/set_route_points";
32+
using Service = tier4_planning_msgs::srv::SetLaneletRoute;
33+
static constexpr char name[] = "/planning/mission_planning/route_selector/main/set_lanelet_route";
3434
};
3535

36-
struct SetRoute
36+
struct SetWaypointRoute
3737
{
38-
using Service = autoware_adapi_v1_msgs::srv::SetRoute;
39-
static constexpr char name[] = "/planning/mission_planning/set_route";
40-
};
41-
42-
struct ChangeRoutePoints
43-
{
44-
using Service = autoware_adapi_v1_msgs::srv::SetRoutePoints;
45-
static constexpr char name[] = "/planning/mission_planning/change_route_points";
46-
};
47-
48-
struct ChangeRoute
49-
{
50-
using Service = autoware_adapi_v1_msgs::srv::SetRoute;
51-
static constexpr char name[] = "/planning/mission_planning/change_route";
38+
using Service = tier4_planning_msgs::srv::SetWaypointRoute;
39+
static constexpr char name[] =
40+
"/planning/mission_planning/route_selector/main/set_waypoint_route";
5241
};
5342

5443
struct ClearRoute
5544
{
56-
using Service = autoware_adapi_v1_msgs::srv::ClearRoute;
57-
static constexpr char name[] = "/planning/mission_planning/clear_route";
45+
using Service = tier4_planning_msgs::srv::ClearRoute;
46+
static constexpr char name[] = "/planning/mission_planning/route_selector/main/clear_route";
5847
};
5948

6049
struct RouteState
6150
{
62-
using Message = autoware_adapi_v1_msgs::msg::RouteState;
63-
static constexpr char name[] = "/planning/mission_planning/route_state";
64-
static constexpr size_t depth = 1;
65-
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
66-
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
67-
};
68-
69-
struct Route
70-
{
71-
using Message = autoware_planning_msgs::msg::LaneletRoute;
72-
static constexpr char name[] = "/planning/mission_planning/route";
73-
static constexpr size_t depth = 1;
74-
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
75-
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
76-
};
77-
78-
struct NormalRoute
79-
{
80-
using Message = autoware_planning_msgs::msg::LaneletRoute;
81-
static constexpr char name[] = "/planning/mission_planning/normal_route";
51+
using Message = tier4_planning_msgs::msg::RouteState;
52+
static constexpr char name[] = "/planning/mission_planning/route_selector/main/state";
8253
static constexpr size_t depth = 1;
8354
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
8455
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
8556
};
8657

87-
struct MrmRoute
58+
struct LaneletRoute
8859
{
8960
using Message = autoware_planning_msgs::msg::LaneletRoute;
90-
static constexpr char name[] = "/planning/mission_planning/mrm_route";
61+
static constexpr char name[] = "/planning/mission_planning/route_selector/main/route";
9162
static constexpr size_t depth = 1;
9263
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
9364
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;

common/component_interface_specs/package.xml

+3-7
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,8 @@
99
<license>Apache License 2.0</license>
1010

1111
<buildtool_depend>ament_cmake_auto</buildtool_depend>
12-
<buildtool_depend>ament_cmake_core</buildtool_depend>
13-
<buildtool_depend>ament_cmake_export_dependencies</buildtool_depend>
14-
<buildtool_depend>ament_cmake_test</buildtool_depend>
1512
<buildtool_depend>autoware_cmake</buildtool_depend>
1613

17-
<buildtool_export_depend>ament_cmake_core</buildtool_export_depend>
18-
<buildtool_export_depend>ament_cmake_test</buildtool_export_depend>
19-
2014
<depend>autoware_adapi_v1_msgs</depend>
2115
<depend>autoware_auto_perception_msgs</depend>
2216
<depend>autoware_auto_planning_msgs</depend>
@@ -28,9 +22,11 @@
2822
<depend>rosidl_runtime_cpp</depend>
2923
<depend>tier4_control_msgs</depend>
3024
<depend>tier4_map_msgs</depend>
25+
<depend>tier4_planning_msgs</depend>
3126
<depend>tier4_system_msgs</depend>
3227
<depend>tier4_vehicle_msgs</depend>
33-
<test_depend>ament_cmake_ros</test_depend>
28+
29+
<test_depend>ament_cmake_gtest</test_depend>
3430
<test_depend>ament_lint_auto</test_depend>
3531
<test_depend>autoware_lint_common</test_depend>
3632

common/component_interface_specs/test/test_planning.cpp

+2-20
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,8 @@ TEST(planning, interface)
2727
}
2828

2929
{
30-
using planning_interface::Route;
31-
Route route;
32-
size_t depth = 1;
33-
EXPECT_EQ(route.depth, depth);
34-
EXPECT_EQ(route.reliability, RMW_QOS_POLICY_RELIABILITY_RELIABLE);
35-
EXPECT_EQ(route.durability, RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL);
36-
}
37-
38-
{
39-
using planning_interface::NormalRoute;
40-
NormalRoute route;
41-
size_t depth = 1;
42-
EXPECT_EQ(route.depth, depth);
43-
EXPECT_EQ(route.reliability, RMW_QOS_POLICY_RELIABILITY_RELIABLE);
44-
EXPECT_EQ(route.durability, RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL);
45-
}
46-
47-
{
48-
using planning_interface::MrmRoute;
49-
MrmRoute route;
30+
using planning_interface::LaneletRoute;
31+
LaneletRoute route;
5032
size_t depth = 1;
5133
EXPECT_EQ(route.depth, depth);
5234
EXPECT_EQ(route.reliability, RMW_QOS_POLICY_RELIABILITY_RELIABLE);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
cmake_minimum_required(VERSION 3.14)
2+
project(mission_planner_rviz_plugin)
3+
4+
find_package(autoware_cmake REQUIRED)
5+
autoware_package()
6+
7+
find_package(Qt5 REQUIRED Core Widgets)
8+
set(QT_LIBRARIES Qt5::Widgets)
9+
set(CMAKE_AUTOMOC ON)
10+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
11+
12+
ament_auto_add_library(${PROJECT_NAME} SHARED
13+
src/mrm_goal.cpp
14+
src/route_selector_panel.cpp
15+
)
16+
17+
target_link_libraries(${PROJECT_NAME}
18+
${QT_LIBRARIES}
19+
)
20+
21+
pluginlib_export_plugin_description_file(rviz_common plugins/plugin_description.xml)
22+
23+
ament_auto_package()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# mission_planner_rviz_plugin
2+
3+
## MrmGoalTool
4+
5+
This is a copy of `rviz_default_plugins::tools::GoalTool`. Used together with the RouteSelectorPanel to set the MRM route.
6+
After adding the tool, change the topic name to `/rviz/route_selector/mrm/goal` from the topic property panel in rviz.
7+
8+
## RouteSelectorPanel
9+
10+
This panel shows the main and mrm route state in the route_selector and the route states in the mission_planner.
11+
Additionally, it provides clear and set functions for each main route and mrm route.
12+
13+
| Trigger | Action |
14+
| -------------------------------------- | ------------------------------------------------------------------------ |
15+
| main route clear button | call `/planning/mission_planning/route_selector/main/clear_route` |
16+
| mrm route clear button | call `/planning/mission_planning/route_selector/mrm/clear_route` |
17+
| `/rviz/route_selector/main/goal` topic | call `/planning/mission_planning/route_selector/main/set_waypoint_route` |
18+
| `/rviz/route_selector/mrm/goal` topic | call `/planning/mission_planning/route_selector/mrm/set_waypoint_route` |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0"?>
2+
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
3+
<package format="3">
4+
<name>mission_planner_rviz_plugin</name>
5+
<version>0.0.0</version>
6+
<description>The mission_planner_rviz_plugin package</description>
7+
<maintainer email="isamu.takagi@tier4.jp">Takagi, Isamu</maintainer>
8+
<license>Apache License 2.0</license>
9+
10+
<buildtool_depend>ament_cmake_auto</buildtool_depend>
11+
<buildtool_depend>autoware_cmake</buildtool_depend>
12+
13+
<depend>geometry_msgs</depend>
14+
<depend>libqt5-core</depend>
15+
<depend>libqt5-gui</depend>
16+
<depend>libqt5-widgets</depend>
17+
<depend>rclcpp</depend>
18+
<depend>rviz_common</depend>
19+
<depend>rviz_default_plugins</depend>
20+
<depend>tier4_planning_msgs</depend>
21+
22+
<test_depend>ament_lint_auto</test_depend>
23+
<test_depend>autoware_lint_common</test_depend>
24+
25+
<export>
26+
<build_type>ament_cmake</build_type>
27+
<rviz plugin="${prefix}/plugins/plugin_description.xml"/>
28+
</export>
29+
</package>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<library path="mission_planner_rviz_plugin">
2+
<class type="rviz_plugins::MrmGoalTool" base_class_type="rviz_common::Tool">
3+
<description>MrmGoalTool</description>
4+
</class>
5+
<class type="rviz_plugins::RouteSelectorPanel" base_class_type="rviz_common::Panel">
6+
<description>RouteSelectorPanel</description>
7+
</class>
8+
</library>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright 2024 The Autoware Contributors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#include "mrm_goal.hpp"
16+
17+
namespace rviz_plugins
18+
{
19+
20+
MrmGoalTool::MrmGoalTool()
21+
{
22+
shortcut_key_ = 'm';
23+
}
24+
25+
void MrmGoalTool::onInitialize()
26+
{
27+
GoalTool::onInitialize();
28+
setName("MRM Goal Pose");
29+
}
30+
31+
} // namespace rviz_plugins
32+
33+
#include <pluginlib/class_list_macros.hpp>
34+
PLUGINLIB_EXPORT_CLASS(rviz_plugins::MrmGoalTool, rviz_common::Tool)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright 2024 The Autoware Contributors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#ifndef MRM_GOAL_HPP_
16+
#define MRM_GOAL_HPP_
17+
18+
#include <rviz_default_plugins/tools/goal_pose/goal_tool.hpp>
19+
20+
namespace rviz_plugins
21+
{
22+
23+
class MrmGoalTool : public rviz_default_plugins::tools::GoalTool
24+
{
25+
Q_OBJECT
26+
27+
public:
28+
MrmGoalTool();
29+
void onInitialize() override;
30+
};
31+
32+
} // namespace rviz_plugins
33+
34+
#endif // MRM_GOAL_HPP_

0 commit comments

Comments
 (0)