Skip to content

Commit 413f066

Browse files
authored
Merge branch 'main' into feat/downsapmple_perception_input_pointclouds
2 parents 961407c + 569d56c commit 413f066

File tree

208 files changed

+5418
-1933
lines changed

Some content is hidden

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

208 files changed

+5418
-1933
lines changed

.github/PULL_REQUEST_TEMPLATE/small-change.md

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Not applicable.
1515

1616
Not applicable.
1717

18+
## Interface changes
19+
20+
<!-- Describe any changed interfaces, such as topics, services, or parameters, including debugging interfaces -->
21+
1822
## Pre-review checklist for the PR author
1923

2024
The PR author **must** check the checkboxes below when creating the PR.

.github/PULL_REQUEST_TEMPLATE/standard-change.md

+13
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@
1818

1919
<!-- Describe any changed interfaces, such as topics, services, or parameters. -->
2020

21+
### ROS Topic Changes
22+
23+
<!-- | Topic Name | Type | Direction | Update Description | -->
24+
<!-- | ---------------- | ------------------- | --------- | ------------------------------------------------------------- | -->
25+
<!-- | `/example_topic` | `std_msgs/String` | Subscribe | Description of what the topic is used for in the system | -->
26+
<!-- | `/another_topic` | `sensor_msgs/Image` | Publish | Also explain if it is added / modified / deleted with the PR | -->
27+
28+
### ROS Parameter Changes
29+
30+
<!-- | Parameter Name | Default Value | Update Description | -->
31+
<!-- | -------------------- | ------------- | --------------------------------------------------- | -->
32+
<!-- | `example_parameters` | `1.0` | Describe the parameter and also explain the updates | -->
33+
2134
## Effects on system behavior
2235

2336
<!-- Describe how this PR affects the system behavior. -->

build_depends.repos

+4
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ repositories:
4141
type: git
4242
url: https://github.com/MORAI-Autonomous/MORAI-ROS2_morai_msgs.git
4343
version: main
44+
universe/external/glog: # TODO: to use isGoogleInitialized() API in v0.6.0. Remove when the rosdep glog version is updated to v0.6.0 (already updated in Ubuntu 24.04)
45+
type: git
46+
url: https://github.com/tier4/glog.git
47+
version: v0.6.0_t4-ros

common/autoware_auto_common/include/autoware_auto_common/common/types.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ namespace types
3737
// We don't currently require code to comply to MISRA, but we should try to where it is
3838
// easily possible.
3939
using bool8_t = bool;
40+
#if __cplusplus < 201811L || !__cpp_char8_t
4041
using char8_t = char;
42+
#endif
4143
using uchar8_t = unsigned char;
4244
// If we ever compile on a platform where this is not true, float32_t and float64_t definitions
4345
// need to be adjusted.

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ struct ObjectPropertyValues
5757
float alpha{0.999F};
5858
};
5959

60+
// Control object marker visualization
61+
enum class ObjectFillType { Skeleton, Fill };
62+
6063
// Map defining colors according to value of label field in ObjectClassification msg
6164
const std::map<
6265
autoware_auto_perception_msgs::msg::ObjectClassification::_label_type, ObjectPropertyValues>
@@ -87,7 +90,8 @@ get_shape_marker_ptr(
8790
const autoware_auto_perception_msgs::msg::Shape & shape_msg,
8891
const geometry_msgs::msg::Point & centroid, const geometry_msgs::msg::Quaternion & orientation,
8992
const std_msgs::msg::ColorRGBA & color_rgba, const double & line_width,
90-
const bool & is_orientation_available = true);
93+
const bool & is_orientation_available = true,
94+
const ObjectFillType fill_type = ObjectFillType::Skeleton);
9195

9296
AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC visualization_msgs::msg::Marker::SharedPtr
9397
get_2d_shape_marker_ptr(

common/autoware_auto_perception_rviz_plugin/include/autoware_auto_perception_rviz_plugin/object_detection/object_polygon_display_base.hpp

+13-1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
112112
m_confidence_interval_property->addOption("95%", 2);
113113
m_confidence_interval_property->addOption("99%", 3);
114114

115+
m_object_fill_type_property = new rviz_common::properties::EnumProperty(
116+
"Object Fill Type", "skeleton", "Change object fill type in visualization", this);
117+
m_object_fill_type_property->addOption(
118+
"skeleton", static_cast<int>(detail::ObjectFillType::Skeleton));
119+
m_object_fill_type_property->addOption("Fill", static_cast<int>(detail::ObjectFillType::Fill));
120+
115121
// iterate over default values to create and initialize the properties.
116122
for (const auto & map_property_it : detail::kDefaultObjectPropertyValues) {
117123
const auto & class_property_values = map_property_it.second;
@@ -189,9 +195,13 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
189195
const bool & is_orientation_available) const
190196
{
191197
const std_msgs::msg::ColorRGBA color_rgba = get_color_rgba(labels);
198+
const auto fill_type =
199+
static_cast<detail::ObjectFillType>(m_object_fill_type_property->getOptionInt());
200+
192201
if (m_display_type_property->getOptionInt() == 0) {
193202
return detail::get_shape_marker_ptr(
194-
shape_msg, centroid, orientation, color_rgba, line_width, is_orientation_available);
203+
shape_msg, centroid, orientation, color_rgba, line_width, is_orientation_available,
204+
fill_type);
195205
} else if (m_display_type_property->getOptionInt() == 1) {
196206
return detail::get_2d_shape_marker_ptr(
197207
shape_msg, centroid, orientation, color_rgba, line_width, is_orientation_available);
@@ -526,6 +536,8 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
526536
rviz_common::properties::EnumProperty * m_simple_visualize_mode_property;
527537
// Property to set confidence interval of state estimations
528538
rviz_common::properties::EnumProperty * m_confidence_interval_property;
539+
// Property to set visualization type
540+
rviz_common::properties::EnumProperty * m_object_fill_type_property;
529541
// Property to enable/disable label visualization
530542
rviz_common::properties::BoolProperty m_display_label_property;
531543
// Property to enable/disable uuid visualization

common/autoware_auto_perception_rviz_plugin/src/object_detection/object_polygon_detail.cpp

+19-7
Original file line numberDiff line numberDiff line change
@@ -495,23 +495,37 @@ visualization_msgs::msg::Marker::SharedPtr get_shape_marker_ptr(
495495
const autoware_auto_perception_msgs::msg::Shape & shape_msg,
496496
const geometry_msgs::msg::Point & centroid, const geometry_msgs::msg::Quaternion & orientation,
497497
const std_msgs::msg::ColorRGBA & color_rgba, const double & line_width,
498-
const bool & is_orientation_available)
498+
const bool & is_orientation_available, const ObjectFillType fill_type)
499499
{
500500
auto marker_ptr = std::make_shared<Marker>();
501501
marker_ptr->ns = std::string("shape");
502+
marker_ptr->color = color_rgba;
503+
marker_ptr->scale.x = line_width;
502504

503505
using autoware_auto_perception_msgs::msg::Shape;
504506
if (shape_msg.type == Shape::BOUNDING_BOX) {
505-
marker_ptr->type = visualization_msgs::msg::Marker::LINE_LIST;
506-
calc_bounding_box_line_list(shape_msg, marker_ptr->points);
507+
if (fill_type == ObjectFillType::Skeleton) {
508+
marker_ptr->type = visualization_msgs::msg::Marker::LINE_LIST;
509+
calc_bounding_box_line_list(shape_msg, marker_ptr->points);
510+
} else if (fill_type == ObjectFillType::Fill) {
511+
marker_ptr->type = visualization_msgs::msg::Marker::CUBE;
512+
marker_ptr->scale = shape_msg.dimensions;
513+
marker_ptr->color.a = 0.75f;
514+
}
507515
if (is_orientation_available) {
508516
calc_bounding_box_direction_line_list(shape_msg, marker_ptr->points);
509517
} else {
510518
calc_bounding_box_orientation_line_list(shape_msg, marker_ptr->points);
511519
}
512520
} else if (shape_msg.type == Shape::CYLINDER) {
513-
marker_ptr->type = visualization_msgs::msg::Marker::LINE_LIST;
514-
calc_cylinder_line_list(shape_msg, marker_ptr->points);
521+
if (fill_type == ObjectFillType::Skeleton) {
522+
marker_ptr->type = visualization_msgs::msg::Marker::LINE_LIST;
523+
calc_cylinder_line_list(shape_msg, marker_ptr->points);
524+
} else if (fill_type == ObjectFillType::Fill) {
525+
marker_ptr->type = visualization_msgs::msg::Marker::CYLINDER;
526+
marker_ptr->scale = shape_msg.dimensions;
527+
marker_ptr->color.a = 0.75f;
528+
}
515529
} else if (shape_msg.type == Shape::POLYGON) {
516530
marker_ptr->type = visualization_msgs::msg::Marker::LINE_LIST;
517531
calc_polygon_line_list(shape_msg, marker_ptr->points);
@@ -523,8 +537,6 @@ visualization_msgs::msg::Marker::SharedPtr get_shape_marker_ptr(
523537
marker_ptr->action = visualization_msgs::msg::Marker::MODIFY;
524538
marker_ptr->pose = to_pose(centroid, orientation);
525539
marker_ptr->lifetime = rclcpp::Duration::from_seconds(0.15);
526-
marker_ptr->scale.x = line_width;
527-
marker_ptr->color = color_rgba;
528540

529541
return marker_ptr;
530542
}

common/autoware_overlay_rviz_plugin/autoware_overlay_rviz_plugin/include/signal_display.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private Q_SLOTS:
102102
turn_signals_sub_;
103103
rclcpp::Subscription<autoware_auto_vehicle_msgs::msg::HazardLightsReport>::SharedPtr
104104
hazard_lights_sub_;
105-
rclcpp::Subscription<autoware_perception_msgs::msg::TrafficSignalArray>::SharedPtr traffic_sub_;
105+
rclcpp::Subscription<autoware_perception_msgs::msg::TrafficSignal>::SharedPtr traffic_sub_;
106106
rclcpp::Subscription<tier4_planning_msgs::msg::VelocityLimit>::SharedPtr speed_limit_sub_;
107107

108108
std::mutex property_mutex_;
@@ -117,7 +117,7 @@ private Q_SLOTS:
117117
const autoware_auto_vehicle_msgs::msg::HazardLightsReport::ConstSharedPtr & msg);
118118
void updateSpeedLimitData(const tier4_planning_msgs::msg::VelocityLimit::ConstSharedPtr msg);
119119
void updateTrafficLightData(
120-
const autoware_perception_msgs::msg::TrafficSignalArray::ConstSharedPtr msg);
120+
const autoware_perception_msgs::msg::TrafficSignal::ConstSharedPtr msg);
121121
void drawWidget(QImage & hud);
122122
};
123123
} // namespace autoware_overlay_rviz_plugin

common/autoware_overlay_rviz_plugin/autoware_overlay_rviz_plugin/include/traffic_display.hpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <rviz_common/ros_topic_display.hpp>
2525

2626
#include <autoware_perception_msgs/msg/traffic_signal.hpp>
27-
#include <autoware_perception_msgs/msg/traffic_signal_array.hpp>
2827
#include <autoware_perception_msgs/msg/traffic_signal_element.hpp>
2928

3029
#include <OgreColourValue.h>
@@ -40,8 +39,8 @@ class TrafficDisplay
4039
TrafficDisplay();
4140
void drawTrafficLightIndicator(QPainter & painter, const QRectF & backgroundRect);
4241
void updateTrafficLightData(
43-
const autoware_perception_msgs::msg::TrafficSignalArray::ConstSharedPtr & msg);
44-
autoware_perception_msgs::msg::TrafficSignalArray current_traffic_;
42+
const autoware_perception_msgs::msg::TrafficSignal::ConstSharedPtr & msg);
43+
autoware_perception_msgs::msg::TrafficSignal current_traffic_;
4544

4645
private:
4746
QImage traffic_light_image_;

common/autoware_overlay_rviz_plugin/autoware_overlay_rviz_plugin/src/signal_display.cpp

+13-13
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ void SignalDisplay::onInitialize()
111111
speed_limit_topic_property_->initialize(rviz_ros_node);
112112

113113
traffic_topic_property_ = std::make_unique<rviz_common::properties::RosTopicProperty>(
114-
"Traffic Topic", "/perception/traffic_light_recognition/traffic_signals",
115-
"autoware_perception/msgs/msg/TrafficSignalArray", "Topic for Traffic Light Data", this,
114+
"Traffic Topic",
115+
"/planning/scenario_planning/lane_driving/behavior_planning/debug/traffic_signal",
116+
"autoware_perception/msgs/msg/TrafficSignal", "Topic for Traffic Light Data", this,
116117
SLOT(topic_updated_traffic()));
117118
traffic_topic_property_->initialize(rviz_ros_node);
118119
}
@@ -159,10 +160,10 @@ void SignalDisplay::setupRosSubscriptions()
159160
updateHazardLightsData(msg);
160161
});
161162

162-
traffic_sub_ = rviz_node_->create_subscription<autoware_perception_msgs::msg::TrafficSignalArray>(
163+
traffic_sub_ = rviz_node_->create_subscription<autoware_perception_msgs::msg::TrafficSignal>(
163164
traffic_topic_property_->getTopicStd(),
164165
rclcpp::QoS(rclcpp::KeepLast(10)).durability_volatile().reliable(),
165-
[this](const autoware_perception_msgs::msg::TrafficSignalArray::SharedPtr msg) {
166+
[this](const autoware_perception_msgs::msg::TrafficSignal::SharedPtr msg) {
166167
updateTrafficLightData(msg);
167168
});
168169

@@ -237,7 +238,7 @@ void SignalDisplay::onDisable()
237238
}
238239

239240
void SignalDisplay::updateTrafficLightData(
240-
const autoware_perception_msgs::msg::TrafficSignalArray::ConstSharedPtr msg)
241+
const autoware_perception_msgs::msg::TrafficSignal::ConstSharedPtr msg)
241242
{
242243
std::lock_guard<std::mutex> lock(property_mutex_);
243244

@@ -506,14 +507,13 @@ void SignalDisplay::topic_updated_traffic()
506507
// resubscribe to the topic
507508
traffic_sub_.reset();
508509
auto rviz_ros_node = context_->getRosNodeAbstraction().lock();
509-
traffic_sub_ =
510-
rviz_ros_node->get_raw_node()
511-
->create_subscription<autoware_perception_msgs::msg::TrafficSignalArray>(
512-
traffic_topic_property_->getTopicStd(),
513-
rclcpp::QoS(rclcpp::KeepLast(10)).durability_volatile().reliable(),
514-
[this](const autoware_perception_msgs::msg::TrafficSignalArray::SharedPtr msg) {
515-
updateTrafficLightData(msg);
516-
});
510+
traffic_sub_ = rviz_ros_node->get_raw_node()
511+
->create_subscription<autoware_perception_msgs::msg::TrafficSignal>(
512+
traffic_topic_property_->getTopicStd(),
513+
rclcpp::QoS(rclcpp::KeepLast(10)).durability_volatile().reliable(),
514+
[this](const autoware_perception_msgs::msg::TrafficSignal::SharedPtr msg) {
515+
updateTrafficLightData(msg);
516+
});
517517
}
518518

519519
} // namespace autoware_overlay_rviz_plugin

common/autoware_overlay_rviz_plugin/autoware_overlay_rviz_plugin/src/traffic_display.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ TrafficDisplay::TrafficDisplay()
4848
}
4949

5050
void TrafficDisplay::updateTrafficLightData(
51-
const autoware_perception_msgs::msg::TrafficSignalArray::ConstSharedPtr & msg)
51+
const autoware_perception_msgs::msg::TrafficSignal::ConstSharedPtr & msg)
5252
{
5353
current_traffic_ = *msg;
5454
}
@@ -70,8 +70,8 @@ void TrafficDisplay::drawTrafficLightIndicator(QPainter & painter, const QRectF
7070
backgroundRect.top() + circleRect.height() + 30));
7171
painter.drawEllipse(circleRect);
7272

73-
if (!current_traffic_.signals.empty()) {
74-
switch (current_traffic_.signals[0].elements[0].color) {
73+
if (!current_traffic_.elements.empty()) {
74+
switch (current_traffic_.elements[0].color) {
7575
case 1:
7676
painter.setBrush(QBrush(tl_red_));
7777
painter.drawEllipse(circleRect);

common/glog_component/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ autoware_package()
88
ament_auto_add_library(glog_component SHARED
99
src/glog_component.cpp
1010
)
11-
target_link_libraries(glog_component glog)
11+
target_link_libraries(glog_component glog::glog)
1212

1313
rclcpp_components_register_node(glog_component
1414
PLUGIN "GlogComponent"

common/glog_component/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<buildtool_depend>ament_cmake_auto</buildtool_depend>
1414
<buildtool_depend>autoware_cmake</buildtool_depend>
1515

16-
<depend>libgoogle-glog-dev</depend>
16+
<depend>glog</depend>
1717
<depend>rclcpp</depend>
1818
<depend>rclcpp_components</depend>
1919

common/glog_component/src/glog_component.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
GlogComponent::GlogComponent(const rclcpp::NodeOptions & node_options)
1818
: Node("glog_component", node_options)
1919
{
20-
google::InitGoogleLogging("glog_component");
21-
google::InstallFailureSignalHandler();
20+
if (!google::IsGoogleLoggingInitialized()) {
21+
google::InitGoogleLogging("glog_component");
22+
google::InstallFailureSignalHandler();
23+
}
2224
}
2325

2426
#include <rclcpp_components/register_node_macro.hpp>

common/tier4_logging_level_configure_rviz_plugin/config/logger_config.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Planning:
3333
logger_name: planning.scenario_planning.lane_driving.behavior_planning.behavior_path_planner
3434
- node_name: /planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner
3535
logger_name: tier4_autoware_utils
36+
- node_name: /planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner
37+
logger_name: behavior_path_planner.path_shifter
3638

3739
behavior_path_planner_avoidance:
3840
- node_name: /planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner
@@ -82,6 +84,10 @@ Planning:
8284
- node_name: /planning/scenario_planning/motion_velocity_smoother
8385
logger_name: tier4_autoware_utils
8486

87+
route_handler:
88+
- node_name: /planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner
89+
logger_name: route_handler
90+
8591
# ============================================================
8692
# control
8793
# ============================================================

common/tier4_simulated_clock_rviz_plugin/README.md

+29-10
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,37 @@ This plugin allows publishing and controlling the simulated ROS time.
1010
| -------- | --------------------------- | -------------------------- |
1111
| `/clock` | `rosgraph_msgs::msg::Clock` | the current simulated time |
1212

13-
## HowToUse
13+
## How to use the plugin
14+
15+
1. Launch [planning simulator](https://autowarefoundation.github.io/autoware-documentation/main/tutorials/ad-hoc-simulation/planning-simulation/#1-launch-autoware) with `use_sim_time:=true`.
16+
17+
```shell
18+
ros2 launch autoware_launch planning_simulator.launch.xml map_path:=$HOME/autoware_map/sample-map-planning vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit use_sim_time:=true
19+
```
20+
21+
> <span style="color: orange; font-weight: bold;">Warning</span>
22+
> If you launch the planning simulator without adding the `tier4_simulated_clock_rviz_plugin`, your simulation will not be running. You'll not even be able to place the initial and the goal poses.
23+
24+
2. Start rviz and select panels/Add new panel.
1425

15-
1. Start rviz and select panels/Add new panel.
1626
![select_panel](./images/select_panels.png)
17-
2. Select tier4_clock_rviz_plugin/SimulatedClock and press OK.
27+
28+
3. Select tier4_clock_rviz_plugin/SimulatedClock and press OK.
29+
1830
![select_clock_plugin](./images/select_clock_plugin.png)
19-
3. Use the added panel to control how the simulated clock is published.
31+
32+
4. Use the added panel to control how the simulated clock is published.
33+
2034
![use_clock_plugin](./images/use_clock_plugin.png)
2135

22-
- Pause button: pause/resume the clock.
23-
- Speed: speed of the clock relative to the system clock.
24-
- Rate: publishing rate of the clock.
25-
- Step button: advance the clock by the specified time step.
26-
- Time step: value used to advance the clock when pressing the step button d).
27-
- Time unit: time unit associated with the value from e).
36+
<ol type="a">
37+
<li>Pause button: pause/resume the clock.</li>
38+
<li>Speed: speed of the clock relative to the system clock.</li>
39+
<li>Rate: publishing rate of the clock.</li>
40+
<li>Step button: advance the clock by the specified time step.</li>
41+
<li>Time step: value used to advance the clock when pressing the step button d).</li>
42+
<li>Time unit: time unit associated with the value from e).</li>
43+
</ol>
44+
45+
> <span style="color: orange; font-weight: bold;">Warning</span>
46+
> If you set the time step too large, your simulation will go haywire.

common/tvm_utility/example/yolo_v2_tiny/main.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ class PostProcessorYoloV2Tiny : public tvm_utility::pipeline::PostProcessor<std:
200200
}
201201
}
202202

203+
if (max_ind == -1) continue;
204+
203205
// Decode and copy class probabilities
204206
std::vector<float> class_probabilities{};
205207
float p_total = 0;

0 commit comments

Comments
 (0)