Skip to content

Commit a00a737

Browse files
committed
merge old pr to current autoware.universe main
2 parents f297d06 + b754c56 commit a00a737

File tree

11 files changed

+635
-17
lines changed

11 files changed

+635
-17
lines changed

common/autoware_auto_perception_rviz_plugin/CMakeLists.txt

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ autoware_package()
66

77
find_package(Qt5 REQUIRED COMPONENTS Widgets)
88

9+
find_package(PCL REQUIRED)
10+
911
set(OD_PLUGIN_LIB_SRC
1012
src/object_detection/detected_objects_display.cpp
1113
src/object_detection/tracked_objects_display.cpp
@@ -46,9 +48,14 @@ ament_auto_add_library(${PROJECT_NAME} SHARED
4648
target_link_libraries(${PROJECT_NAME}
4749
rviz_common::rviz_common
4850
Qt5::Widgets
51+
${PCL_LIBRARIES}
4952
)
5053
target_include_directories(${PROJECT_NAME} PRIVATE include)
5154

55+
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
56+
"${PCL_INCLUDE_DIRS}"
57+
)
58+
5259
# Settings to improve the build as suggested on https://github.com/ros2/rviz/blob/ros2/docs/plugin_development.md
5360
target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")
5461
target_compile_definitions(${PROJECT_NAME} PRIVATE "OBJECT_DETECTION_PLUGINS_BUILDING_LIBRARY")

common/autoware_auto_perception_rviz_plugin/README.md

+18-9
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ Example:
1919

2020
#### Input Types
2121

22-
| Name | Type | Description |
23-
| ---- | ----------------------------------------------------- | ---------------------- |
24-
| | `autoware_auto_perception_msgs::msg::DetectedObjects` | detection result array |
22+
| Name | Type | Description |
23+
| ---- | ----------------------------------------------------- | ------------------------- |
24+
| | `autoware_auto_perception_msgs::msg::DetectedObjects` | detection result array |
25+
| | `sensor_msgs::msg::PointCloud2` | point cloud for filtering |
2526

2627
#### Visualization Result
2728

@@ -31,9 +32,10 @@ Example:
3132

3233
#### Input Types
3334

34-
| Name | Type | Description |
35-
| ---- | ---------------------------------------------------- | --------------------- |
36-
| | `autoware_auto_perception_msgs::msg::TrackedObjects` | tracking result array |
35+
| Name | Type | Description |
36+
| ---- | ---------------------------------------------------- | ------------------------- |
37+
| | `autoware_auto_perception_msgs::msg::TrackedObjects` | tracking result array |
38+
| | `sensor_msgs::msg::PointCloud2` | point cloud for filtering |
3739

3840
#### Visualization Result
3941

@@ -45,16 +47,23 @@ Overwrite tracking results with detection results.
4547

4648
#### Input Types
4749

48-
| Name | Type | Description |
49-
| ---- | ------------------------------------------------------ | ----------------------- |
50-
| | `autoware_auto_perception_msgs::msg::PredictedObjects` | prediction result array |
50+
| Name | Type | Description |
51+
| ---- | ------------------------------------------------------ | ------------------------ |
52+
| | `autoware_auto_perception_msgs::msg::PredictedObjects` | prediction result array |
53+
| | `sensor_msgs::msg::PointCloud2` | pointcloud for filtering |
5154

5255
#### Visualization Result
5356

5457
Overwrite prediction results with tracking results.
5558

5659
![predicted-object-visualization-description](./images/predicted-object-visualization-description.jpg)
5760

61+
### Visualization with active point cloud publishing
62+
63+
Publishing colored point clouds. With colors according to different classes of detected objects, same as polygons.
64+
65+
![visualization-with-pointcloud](./images/3d_pointcloud.png)
66+
5867
## References/External links
5968

6069
[1] <https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto/-/tree/master/src/tools/visualization/autoware_rviz_plugins>
Loading

common/autoware_auto_perception_rviz_plugin/include/autoware_auto_perception_rviz_plugin/object_detection/detected_objects_display.hpp

+7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616

1717
#include "autoware_auto_perception_rviz_plugin/object_detection/object_polygon_display_base.hpp"
1818

19+
#include <autoware_auto_perception_msgs/msg/detected_object.hpp>
1920
#include <autoware_auto_perception_msgs/msg/detected_objects.hpp>
21+
#include <sensor_msgs/msg/point_cloud2.hpp>
22+
23+
#include <memory>
2024

2125
namespace autoware
2226
{
@@ -37,6 +41,9 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC DetectedObjectsDisplay
3741

3842
private:
3943
void processMessage(DetectedObjects::ConstSharedPtr msg) override;
44+
void processPointCloud(
45+
const DetectedObjects::ConstSharedPtr & input_objs_msg,
46+
const sensor_msgs::msg::PointCloud2::ConstSharedPtr & input_pointcloud_msg);
4047
};
4148

4249
} // namespace object_detection

0 commit comments

Comments
 (0)