-
Notifications
You must be signed in to change notification settings - Fork 662
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 chore/radar_object_clustering_param
- Loading branch information
Showing
62 changed files
with
3,712 additions
and
276 deletions.
There are no files selected for viewing
140 changes: 140 additions & 0 deletions
140
common/awf_vehicle_rviz_plugin/awf_2d_overlay_vehicle/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,140 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(awf_2d_overlay_vehicle) | ||
|
||
# find dependencies | ||
find_package(ament_cmake_auto REQUIRED) | ||
find_package(ament_cmake REQUIRED) | ||
find_package(autoware_auto_vehicle_msgs REQUIRED) | ||
find_package(tier4_planning_msgs REQUIRED) | ||
find_package(autoware_perception_msgs REQUIRED) | ||
ament_auto_find_build_dependencies() | ||
|
||
find_package(rviz_2d_overlay_msgs REQUIRED) | ||
|
||
find_package(rviz_common REQUIRED) | ||
find_package(rviz_rendering REQUIRED) | ||
find_package(rviz_ogre_vendor REQUIRED) | ||
find_package(std_msgs REQUIRED) | ||
|
||
set( | ||
headers_to_moc | ||
include/overlay_text_display.hpp | ||
include/signal_display.hpp | ||
|
||
) | ||
|
||
set( | ||
headers_to_not_moc | ||
include/steering_wheel_display.hpp | ||
include/gear_display.hpp | ||
include/speed_display.hpp | ||
include/turn_signals_display.hpp | ||
include/traffic_display.hpp | ||
include/speed_limit_display.hpp | ||
) | ||
|
||
|
||
|
||
foreach(header "${headers_to_moc}") | ||
qt5_wrap_cpp(display_moc_files "${header}") | ||
endforeach() | ||
|
||
set( | ||
display_source_files | ||
src/overlay_text_display.cpp | ||
src/overlay_utils.cpp | ||
src/signal_display.cpp | ||
src/steering_wheel_display.cpp | ||
src/gear_display.cpp | ||
src/speed_display.cpp | ||
src/turn_signals_display.cpp | ||
src/traffic_display.cpp | ||
src/speed_limit_display.cpp | ||
|
||
) | ||
|
||
add_library( | ||
${PROJECT_NAME} SHARED | ||
${display_moc_files} | ||
${headers_to_not_moc} | ||
${display_source_files} | ||
) | ||
|
||
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) | ||
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic) | ||
|
||
target_include_directories( | ||
${PROJECT_NAME} PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include> | ||
${Qt5Widgets_INCLUDE_DIRS} | ||
${OpenCV_INCLUDE_DIRS} | ||
) | ||
|
||
target_link_libraries( | ||
${PROJECT_NAME} PUBLIC | ||
rviz_ogre_vendor::OgreMain | ||
rviz_ogre_vendor::OgreOverlay | ||
) | ||
|
||
|
||
target_compile_definitions(${PROJECT_NAME} PRIVATE "${PROJECT_NAME}_BUILDING_LIBRARY") | ||
|
||
# prevent pluginlib from using boost | ||
target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS") | ||
|
||
pluginlib_export_plugin_description_file(rviz_common plugins_description.xml) | ||
|
||
ament_target_dependencies( | ||
${PROJECT_NAME} | ||
PUBLIC | ||
rviz_common | ||
rviz_rendering | ||
rviz_2d_overlay_msgs | ||
autoware_auto_vehicle_msgs | ||
tier4_planning_msgs | ||
autoware_perception_msgs | ||
) | ||
|
||
ament_export_include_directories(include) | ||
ament_export_targets(${PROJECT_NAME} HAS_LIBRARY_TARGET) | ||
ament_export_dependencies( | ||
rviz_common | ||
rviz_ogre_vendor | ||
) | ||
|
||
if(BUILD_TESTING) | ||
find_package(ament_lint_auto REQUIRED) | ||
ament_lint_auto_find_test_dependencies() | ||
endif() | ||
|
||
install( | ||
TARGETS ${PROJECT_NAME} | ||
EXPORT ${PROJECT_NAME} | ||
ARCHIVE DESTINATION lib | ||
LIBRARY DESTINATION lib | ||
RUNTIME DESTINATION bin | ||
INCLUDES DESTINATION include | ||
) | ||
|
||
install( | ||
DIRECTORY include/ | ||
DESTINATION include | ||
) | ||
|
||
install( | ||
TARGETS | ||
DESTINATION lib/${PROJECT_NAME} | ||
) | ||
|
||
# Copy the assets directory to the installation directory | ||
install( | ||
DIRECTORY assets/ | ||
DESTINATION share/${PROJECT_NAME}/assets | ||
) | ||
|
||
add_definitions(-DQT_NO_KEYWORDS) | ||
|
||
ament_package( | ||
CONFIG_EXTRAS "awf_2d_overlay_vehicle-extras.cmake" | ||
) |
12 changes: 12 additions & 0 deletions
12
common/awf_vehicle_rviz_plugin/awf_2d_overlay_vehicle/LICENSE
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,12 @@ | ||
Copyright (c) 2022, Team Spatzenhirn | ||
Copyright (c) 2014, JSK Lab | ||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
54 changes: 54 additions & 0 deletions
54
common/awf_vehicle_rviz_plugin/awf_2d_overlay_vehicle/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,54 @@ | ||
# awf_2d_overlay_vehicle | ||
|
||
Plugin for displaying 2D overlays over the RViz2 3D scene. | ||
|
||
Based on the [jsk_visualization](https://github.com/jsk-ros-pkg/jsk_visualization) | ||
package, under the 3-Clause BSD license. | ||
|
||
## Purpose | ||
|
||
This plugin provides a visual and easy-to-understand display of vehicle speed, turn signal, steering status and gears. | ||
|
||
## Inputs / Outputs | ||
|
||
### Input | ||
|
||
| Name | Type | Description | | ||
| ---------------------------------------- | ------------------------------------------------------- | ---------------------------------- | | ||
| `/vehicle/status/velocity_status` | `autoware_auto_vehicle_msgs::msg::VelocityReport` | The topic is vehicle twist | | ||
| `/vehicle/status/turn_indicators_status` | `autoware_auto_vehicle_msgs::msg::TurnIndicatorsReport` | The topic is status of turn signal | | ||
| `/vehicle/status/hazard_status` | `autoware_auto_vehicle_msgs::msg::HazardReport` | The topic is status of hazard | | ||
| `/vehicle/status/steering_status` | `autoware_auto_vehicle_msgs::msg::SteeringReport` | The topic is status of steering | | ||
| `/vehicle/status/gear_status` | `autoware_auto_vehicle_msgs::msg::GearReport` | The topic is status of gear | | ||
|
||
## Parameter | ||
|
||
### Core Parameters | ||
|
||
#### SignalDisplay | ||
|
||
| Name | Type | Default Value | Description | | ||
| ------------------------ | ------ | -------------------- | --------------------------------- | | ||
| `property_width_` | int | 128 | Width of the plotter window [px] | | ||
| `property_height_` | int | 128 | Height of the plotter window [px] | | ||
| `property_left_` | int | 128 | Left of the plotter window [px] | | ||
| `property_top_` | int | 128 | Top of the plotter window [px] | | ||
| `property_signal_color_` | QColor | QColor(25, 255, 240) | Turn Signal color | | ||
|
||
## Assumptions / Known limits | ||
|
||
TBD. | ||
|
||
## Usage | ||
|
||
1. Start rviz and select Add under the Displays panel. | ||
|
||
![select_add](./assets/images/select_add.png) | ||
|
||
2. Select any one of the tier4_vehicle_rviz_plugin and press OK. | ||
|
||
![select_vehicle_plugin](./assets/images/select_vehicle_plugin.png) | ||
|
||
3. Enter the name of the topic where you want to view the status. | ||
|
||
![select_topic_name](./assets/images/select_topic_name.png) |
93 changes: 93 additions & 0 deletions
93
common/awf_vehicle_rviz_plugin/awf_2d_overlay_vehicle/assets/font/Quicksand/LICENSE
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,93 @@ | ||
Copyright 2011 The Quicksand Project Authors (https://github.com/andrew-paglinawan/QuicksandFamily), with Reserved Font Name “Quicksand”. | ||
|
||
This Font Software is licensed under the SIL Open Font License, Version 1.1. | ||
This license is copied below, and is also available with a FAQ at: | ||
http://scripts.sil.org/OFL | ||
|
||
|
||
----------------------------------------------------------- | ||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 | ||
----------------------------------------------------------- | ||
|
||
PREAMBLE | ||
The goals of the Open Font License (OFL) are to stimulate worldwide | ||
development of collaborative font projects, to support the font creation | ||
efforts of academic and linguistic communities, and to provide a free and | ||
open framework in which fonts may be shared and improved in partnership | ||
with others. | ||
|
||
The OFL allows the licensed fonts to be used, studied, modified and | ||
redistributed freely as long as they are not sold by themselves. The | ||
fonts, including any derivative works, can be bundled, embedded, | ||
redistributed and/or sold with any software provided that any reserved | ||
names are not used by derivative works. The fonts and derivatives, | ||
however, cannot be released under any other type of license. The | ||
requirement for fonts to remain under this license does not apply | ||
to any document created using the fonts or their derivatives. | ||
|
||
DEFINITIONS | ||
"Font Software" refers to the set of files released by the Copyright | ||
Holder(s) under this license and clearly marked as such. This may | ||
include source files, build scripts and documentation. | ||
|
||
"Reserved Font Name" refers to any names specified as such after the | ||
copyright statement(s). | ||
|
||
"Original Version" refers to the collection of Font Software components as | ||
distributed by the Copyright Holder(s). | ||
|
||
"Modified Version" refers to any derivative made by adding to, deleting, | ||
or substituting -- in part or in whole -- any of the components of the | ||
Original Version, by changing formats or by porting the Font Software to a | ||
new environment. | ||
|
||
"Author" refers to any designer, engineer, programmer, technical | ||
writer or other person who contributed to the Font Software. | ||
|
||
PERMISSION & CONDITIONS | ||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of the Font Software, to use, study, copy, merge, embed, modify, | ||
redistribute, and sell modified and unmodified copies of the Font | ||
Software, subject to the following conditions: | ||
|
||
1) Neither the Font Software nor any of its individual components, | ||
in Original or Modified Versions, may be sold by itself. | ||
|
||
2) Original or Modified Versions of the Font Software may be bundled, | ||
redistributed and/or sold with any software, provided that each copy | ||
contains the above copyright notice and this license. These can be | ||
included either as stand-alone text files, human-readable headers or | ||
in the appropriate machine-readable metadata fields within text or | ||
binary files as long as those fields can be easily viewed by the user. | ||
|
||
3) No Modified Version of the Font Software may use the Reserved Font | ||
Name(s) unless explicit written permission is granted by the corresponding | ||
Copyright Holder. This restriction only applies to the primary font name as | ||
presented to the users. | ||
|
||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font | ||
Software shall not be used to promote, endorse or advertise any | ||
Modified Version, except to acknowledge the contribution(s) of the | ||
Copyright Holder(s) and the Author(s) or with their explicit written | ||
permission. | ||
|
||
5) The Font Software, modified or unmodified, in part or in whole, | ||
must be distributed entirely under this license, and must not be | ||
distributed under any other license. The requirement for fonts to | ||
remain under this license does not apply to any document created | ||
using the Font Software. | ||
|
||
TERMINATION | ||
This license becomes null and void if any of the above conditions are | ||
not met. | ||
|
||
DISCLAIMER | ||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT | ||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE | ||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL | ||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM | ||
OTHER DEALINGS IN THE FONT SOFTWARE. |
Binary file added
BIN
+76.8 KB
...ehicle_rviz_plugin/awf_2d_overlay_vehicle/assets/font/Quicksand/static/Quicksand-Bold.ttf
Binary file not shown.
Binary file added
BIN
+76.8 KB
...hicle_rviz_plugin/awf_2d_overlay_vehicle/assets/font/Quicksand/static/Quicksand-Light.ttf
Binary file not shown.
Binary file added
BIN
+77.1 KB
...icle_rviz_plugin/awf_2d_overlay_vehicle/assets/font/Quicksand/static/Quicksand-Medium.ttf
Binary file not shown.
Binary file added
BIN
+77.1 KB
...cle_rviz_plugin/awf_2d_overlay_vehicle/assets/font/Quicksand/static/Quicksand-Regular.ttf
Binary file not shown.
Binary file added
BIN
+77 KB
...le_rviz_plugin/awf_2d_overlay_vehicle/assets/font/Quicksand/static/Quicksand-SemiBold.ttf
Binary file not shown.
Binary file added
BIN
+260 Bytes
common/awf_vehicle_rviz_plugin/awf_2d_overlay_vehicle/assets/images/arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.9 KB
common/awf_vehicle_rviz_plugin/awf_2d_overlay_vehicle/assets/images/select_add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+413 KB
..._vehicle_rviz_plugin/awf_2d_overlay_vehicle/assets/images/select_topic_name.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+70.9 KB
...icle_rviz_plugin/awf_2d_overlay_vehicle/assets/images/select_vehicle_plugin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+622 Bytes
common/awf_vehicle_rviz_plugin/awf_2d_overlay_vehicle/assets/images/traffic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.59 KB
common/awf_vehicle_rviz_plugin/awf_2d_overlay_vehicle/assets/images/wheel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions
31
common/awf_vehicle_rviz_plugin/awf_2d_overlay_vehicle/awf_2d_overlay_vehicle-extras.cmake
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 (c) 2021, Open Source Robotics Foundation, Inc. All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# | ||
# * Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# | ||
# * Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in the | ||
# documentation and/or other materials provided with the distribution. | ||
# | ||
# * Neither the name of the copyright holder nor the names of its | ||
# contributors may be used to endorse or promote products derived from | ||
# this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
# POSSIBILITY OF SUCH DAMAGE. | ||
|
||
# find package Qt5 because otherwise using the rviz_default_plugins::rviz_default_plugins | ||
# exported target will complain that the Qt5::Widgets target does not exist | ||
find_package(Qt5 REQUIRED QUIET COMPONENTS Widgets) |
49 changes: 49 additions & 0 deletions
49
common/awf_vehicle_rviz_plugin/awf_2d_overlay_vehicle/include/gear_display.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,49 @@ | ||
// Copyright 2024 The Autoware Contributors | ||
// | ||
// 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 GEAR_DISPLAY_HPP_ | ||
#define GEAR_DISPLAY_HPP_ | ||
#include "overlay_utils.hpp" | ||
|
||
#include <QImage> | ||
#include <QString> | ||
#include <rviz_common/properties/color_property.hpp> | ||
#include <rviz_common/properties/float_property.hpp> | ||
#include <rviz_common/properties/int_property.hpp> | ||
#include <rviz_common/ros_topic_display.hpp> | ||
|
||
#include "autoware_auto_vehicle_msgs/msg/gear_report.hpp" | ||
|
||
#include <OgreColourValue.h> | ||
#include <OgreMaterial.h> | ||
#include <OgreTexture.h> | ||
|
||
namespace awf_2d_overlay_vehicle | ||
{ | ||
|
||
class GearDisplay | ||
{ | ||
public: | ||
GearDisplay(); | ||
void drawGearIndicator(QPainter & painter, const QRectF & backgroundRect); | ||
void updateGearData(const autoware_auto_vehicle_msgs::msg::GearReport::ConstSharedPtr & msg); | ||
|
||
private: | ||
int current_gear_; // Internal variable to store current gear | ||
QColor gray = QColor(194, 194, 194); | ||
}; | ||
|
||
} // namespace awf_2d_overlay_vehicle | ||
|
||
#endif // GEAR_DISPLAY_HPP_ |
Oops, something went wrong.