-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tier4_adapi_rviz_plugin): add adapi rviz plugin (#3380)
* feat(tier4_adapi_rviz_plugin): add adapi rviz plugin Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * feat: fix copyright and name Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> --------- Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
- Loading branch information
1 parent
dbbcc26
commit 4095f28
Showing
6 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
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,23 @@ | ||
cmake_minimum_required(VERSION 3.14) | ||
project(tier4_adapi_rviz_plugin) | ||
|
||
find_package(autoware_cmake REQUIRED) | ||
autoware_package() | ||
|
||
find_package(Qt5 REQUIRED Core Widgets) | ||
set(QT_LIBRARIES Qt5::Widgets) | ||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
add_definitions(-DQT_NO_KEYWORDS) | ||
|
||
ament_auto_add_library(${PROJECT_NAME} SHARED | ||
src/route_tool.cpp | ||
) | ||
|
||
target_link_libraries(${PROJECT_NAME} | ||
${QT_LIBRARIES} | ||
) | ||
|
||
pluginlib_export_plugin_description_file(rviz_common plugins/plugin_description.xml) | ||
|
||
ament_auto_package(INSTALL_TO_SHARE icons) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,30 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>tier4_adapi_rviz_plugin</name> | ||
<version>0.0.0</version> | ||
<description>The autoware adapi rviz plugin package</description> | ||
<maintainer email="isamu.takagi@tier4.jp">Takagi, Isamu</maintainer> | ||
<maintainer email="hiroki.ota@tier4.jp">Hiroki OTA</maintainer> | ||
<maintainer email="kosuke.takeuchi@tier4.jp">Kosuke Takeuchi</maintainer> | ||
<license>Apache License 2.0</license> | ||
|
||
<buildtool_depend>ament_cmake_auto</buildtool_depend> | ||
|
||
<build_depend>autoware_cmake</build_depend> | ||
|
||
<depend>libqt5-core</depend> | ||
<depend>libqt5-gui</depend> | ||
<depend>libqt5-widgets</depend> | ||
<depend>rclcpp</depend> | ||
<depend>rviz_common</depend> | ||
<depend>rviz_default_plugins</depend> | ||
|
||
<test_depend>ament_lint_auto</test_depend> | ||
<test_depend>autoware_lint_common</test_depend> | ||
|
||
<export> | ||
<build_type>ament_cmake</build_type> | ||
<rviz plugin="${prefix}/plugins/plugin_description.xml"/> | ||
</export> | ||
</package> |
7 changes: 7 additions & 0 deletions
7
common/tier4_adapi_rviz_plugin/plugins/plugin_description.xml
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,7 @@ | ||
<library path="tier4_adapi_rviz_plugin"> | ||
|
||
<class type="tier4_adapi_rviz_plugins::RouteTool" base_class_type="rviz_common::Tool"> | ||
<description>RouteTool</description> | ||
</class> | ||
|
||
</library> |
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,34 @@ | ||
// Copyright 2023 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. | ||
|
||
#include "route_tool.hpp" | ||
|
||
namespace tier4_adapi_rviz_plugins | ||
{ | ||
|
||
RouteTool::RouteTool() | ||
{ | ||
shortcut_key_ = 'r'; | ||
} | ||
|
||
void RouteTool::onInitialize() | ||
{ | ||
GoalTool::onInitialize(); | ||
setName("2D Rough Goal Pose"); | ||
} | ||
|
||
} // namespace tier4_adapi_rviz_plugins | ||
|
||
#include <pluginlib/class_list_macros.hpp> | ||
PLUGINLIB_EXPORT_CLASS(tier4_adapi_rviz_plugins::RouteTool, rviz_common::Tool) |
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,34 @@ | ||
// Copyright 2023 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 ROUTE_TOOL_HPP_ | ||
#define ROUTE_TOOL_HPP_ | ||
|
||
#include <rviz_default_plugins/tools/goal_pose/goal_tool.hpp> | ||
|
||
namespace tier4_adapi_rviz_plugins | ||
{ | ||
|
||
class RouteTool : public rviz_default_plugins::tools::GoalTool | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
RouteTool(); | ||
void onInitialize() override; | ||
}; | ||
|
||
} // namespace tier4_adapi_rviz_plugins | ||
|
||
#endif // ROUTE_TOOL_HPP_ |