Skip to content

Commit

Permalink
merge old pr to current autoware.universe main
Browse files Browse the repository at this point in the history
  • Loading branch information
lexavtanke committed Apr 24, 2024
2 parents f297d06 + b754c56 commit a00a737
Show file tree
Hide file tree
Showing 11 changed files with 635 additions and 17 deletions.
7 changes: 7 additions & 0 deletions common/autoware_auto_perception_rviz_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ autoware_package()

find_package(Qt5 REQUIRED COMPONENTS Widgets)

find_package(PCL REQUIRED)

set(OD_PLUGIN_LIB_SRC
src/object_detection/detected_objects_display.cpp
src/object_detection/tracked_objects_display.cpp
Expand Down Expand Up @@ -46,9 +48,14 @@ ament_auto_add_library(${PROJECT_NAME} SHARED
target_link_libraries(${PROJECT_NAME}
rviz_common::rviz_common
Qt5::Widgets
${PCL_LIBRARIES}
)
target_include_directories(${PROJECT_NAME} PRIVATE include)

target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
"${PCL_INCLUDE_DIRS}"
)

# Settings to improve the build as suggested on https://github.com/ros2/rviz/blob/ros2/docs/plugin_development.md
target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")
target_compile_definitions(${PROJECT_NAME} PRIVATE "OBJECT_DETECTION_PLUGINS_BUILDING_LIBRARY")
Expand Down
27 changes: 18 additions & 9 deletions common/autoware_auto_perception_rviz_plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ Example:

#### Input Types

| Name | Type | Description |
| ---- | ----------------------------------------------------- | ---------------------- |
| | `autoware_auto_perception_msgs::msg::DetectedObjects` | detection result array |
| Name | Type | Description |
| ---- | ----------------------------------------------------- | ------------------------- |
| | `autoware_auto_perception_msgs::msg::DetectedObjects` | detection result array |
| | `sensor_msgs::msg::PointCloud2` | point cloud for filtering |

#### Visualization Result

Expand All @@ -31,9 +32,10 @@ Example:

#### Input Types

| Name | Type | Description |
| ---- | ---------------------------------------------------- | --------------------- |
| | `autoware_auto_perception_msgs::msg::TrackedObjects` | tracking result array |
| Name | Type | Description |
| ---- | ---------------------------------------------------- | ------------------------- |
| | `autoware_auto_perception_msgs::msg::TrackedObjects` | tracking result array |
| | `sensor_msgs::msg::PointCloud2` | point cloud for filtering |

#### Visualization Result

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

#### Input Types

| Name | Type | Description |
| ---- | ------------------------------------------------------ | ----------------------- |
| | `autoware_auto_perception_msgs::msg::PredictedObjects` | prediction result array |
| Name | Type | Description |
| ---- | ------------------------------------------------------ | ------------------------ |
| | `autoware_auto_perception_msgs::msg::PredictedObjects` | prediction result array |
| | `sensor_msgs::msg::PointCloud2` | pointcloud for filtering |

#### Visualization Result

Overwrite prediction results with tracking results.

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

### Visualization with active point cloud publishing

Publishing colored point clouds. With colors according to different classes of detected objects, same as polygons.

![visualization-with-pointcloud](./images/3d_pointcloud.png)

## References/External links

[1] <https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto/-/tree/master/src/tools/visualization/autoware_rviz_plugins>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@

#include "autoware_auto_perception_rviz_plugin/object_detection/object_polygon_display_base.hpp"

#include <autoware_auto_perception_msgs/msg/detected_object.hpp>
#include <autoware_auto_perception_msgs/msg/detected_objects.hpp>
#include <sensor_msgs/msg/point_cloud2.hpp>

#include <memory>

namespace autoware
{
Expand All @@ -37,6 +41,9 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC DetectedObjectsDisplay

private:
void processMessage(DetectedObjects::ConstSharedPtr msg) override;
void processPointCloud(
const DetectedObjects::ConstSharedPtr & input_objs_msg,
const sensor_msgs::msg::PointCloud2::ConstSharedPtr & input_pointcloud_msg);
};

} // namespace object_detection
Expand Down
Loading

0 comments on commit a00a737

Please sign in to comment.