Skip to content

Commit 25a6a4e

Browse files
authored
Merge branch 'main' into feat/z_fitting_by_vectormap
2 parents 7fd0b40 + 1c54d43 commit 25a6a4e

File tree

92 files changed

+1099
-4378
lines changed

Some content is hidden

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

92 files changed

+1099
-4378
lines changed

common/tier4_adapi_rviz_plugin/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,21 @@ Enable or disable of allow_goal_modification option can be set with the check bo
99
Push the mode button in the waypoint to enter waypoint mode. In this mode, the pose is added to waypoints.
1010
Press the apply button to set the route using the saved waypoints (the last one is a goal).
1111
Reset the saved waypoints with the reset button.
12+
13+
## Material Design Icons
14+
15+
This project uses [Material Design Icons](https://developers.google.com/fonts/docs/material_symbols) by Google. These icons are used under the terms of the Apache License, Version 2.0.
16+
17+
Material Design Icons are a collection of symbols provided by Google that are used to enhance the user interface of applications, websites, and other digital products.
18+
19+
### License
20+
21+
The Material Design Icons are licensed under the Apache License, Version 2.0. You may obtain a copy of the License at:
22+
23+
<http://www.apache.org/licenses/LICENSE-2.0>
24+
25+
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.
26+
27+
### Acknowledgments
28+
29+
We would like to express our gratitude to Google for making these icons available to the community, helping developers and designers enhance the visual appeal and user experience of their projects.

common/tier4_adapi_rviz_plugin/src/route_panel.cpp

+99-18
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414

1515
#include "route_panel.hpp"
1616

17+
#include <QGridLayout>
1718
#include <QHBoxLayout>
1819
#include <QVBoxLayout>
1920
#include <rviz_common/display_context.hpp>
2021

2122
#include <memory>
23+
#include <string>
2224

2325
namespace tier4_adapi_rviz_plugins
2426
{
@@ -28,6 +30,11 @@ RoutePanel::RoutePanel(QWidget * parent) : rviz_common::Panel(parent)
2830
waypoints_mode_ = new QPushButton("mode");
2931
waypoints_reset_ = new QPushButton("reset");
3032
waypoints_apply_ = new QPushButton("apply");
33+
adapi_clear_ = new QPushButton("clear");
34+
adapi_set_ = new QPushButton("set");
35+
adapi_change_ = new QPushButton("change");
36+
adapi_response_ = new QLabel("the response will be displayed here");
37+
adapi_auto_clear_ = new QCheckBox("auto clear");
3138
allow_goal_modification_ = new QCheckBox("allow goal modification");
3239

3340
waypoints_mode_->setCheckable(true);
@@ -37,6 +44,22 @@ RoutePanel::RoutePanel(QWidget * parent) : rviz_common::Panel(parent)
3744
connect(waypoints_reset_, &QPushButton::clicked, this, &RoutePanel::onWaypointsReset);
3845
connect(waypoints_apply_, &QPushButton::clicked, this, &RoutePanel::onWaypointsApply);
3946

47+
const auto buttons = new QButtonGroup(this);
48+
buttons->addButton(adapi_set_);
49+
buttons->addButton(adapi_change_);
50+
buttons->setExclusive(true);
51+
adapi_set_->setCheckable(true);
52+
adapi_change_->setCheckable(true);
53+
adapi_response_->setAlignment(Qt::AlignCenter);
54+
55+
connect(adapi_clear_, &QPushButton::clicked, this, &RoutePanel::clearRoute);
56+
connect(adapi_set_, &QPushButton::clicked, [this] { adapi_mode_ = AdapiMode::Set; });
57+
connect(adapi_change_, &QPushButton::clicked, [this] { adapi_mode_ = AdapiMode::Change; });
58+
59+
adapi_auto_clear_->setChecked(true);
60+
adapi_set_->setChecked(true);
61+
adapi_mode_ = AdapiMode::Set;
62+
4063
const auto layout = new QVBoxLayout();
4164
setLayout(layout);
4265

@@ -52,6 +75,19 @@ RoutePanel::RoutePanel(QWidget * parent) : rviz_common::Panel(parent)
5275
waypoints_group_ = group;
5376
}
5477

78+
// adapi group
79+
{
80+
const auto group = new QGroupBox("adapi");
81+
const auto local = new QGridLayout();
82+
local->addWidget(adapi_clear_, 0, 0);
83+
local->addWidget(adapi_set_, 0, 1);
84+
local->addWidget(adapi_change_, 0, 2);
85+
local->addWidget(adapi_auto_clear_, 1, 0);
86+
local->addWidget(adapi_response_, 1, 1, 1, 2);
87+
group->setLayout(local);
88+
layout->addWidget(group);
89+
}
90+
5591
// options group
5692
{
5793
const auto group = new QGroupBox("options");
@@ -73,25 +109,14 @@ void RoutePanel::onInitialize()
73109

74110
const auto adaptor = component_interface_utils::NodeAdaptor(node.get());
75111
adaptor.init_cli(cli_clear_);
76-
adaptor.init_cli(cli_route_);
77-
}
78-
79-
void RoutePanel::setRoute(const PoseStamped & pose)
80-
{
81-
const auto req = std::make_shared<ClearRoute::Service::Request>();
82-
cli_clear_->async_send_request(req, [this, pose](auto) {
83-
const auto req = std::make_shared<SetRoutePoints::Service::Request>();
84-
req->header = pose.header;
85-
req->goal = pose.pose;
86-
req->option.allow_goal_modification = allow_goal_modification_->isChecked();
87-
cli_route_->async_send_request(req);
88-
});
112+
adaptor.init_cli(cli_set_);
113+
adaptor.init_cli(cli_change_);
89114
}
90115

91116
void RoutePanel::onPose(const PoseStamped::ConstSharedPtr msg)
92117
{
93118
if (!waypoints_mode_->isChecked()) {
94-
setRoute(*msg);
119+
requestRoute(*msg);
95120
} else {
96121
waypoints_.push_back(*msg);
97122
waypoints_group_->setTitle(QString("waypoints (count: %1)").arg(waypoints_.size()));
@@ -120,18 +145,74 @@ void RoutePanel::onWaypointsApply()
120145
{
121146
if (waypoints_.empty()) return;
122147

123-
const auto req = std::make_shared<ClearRoute::Service::Request>();
124-
cli_clear_->async_send_request(req, [this](auto) {
148+
const auto call = [this] {
125149
const auto req = std::make_shared<SetRoutePoints::Service::Request>();
126150
req->header = waypoints_.back().header;
127151
req->goal = waypoints_.back().pose;
128152
for (size_t i = 0; i + 1 < waypoints_.size(); ++i) {
129153
req->waypoints.push_back(waypoints_[i].pose);
130154
}
131155
req->option.allow_goal_modification = allow_goal_modification_->isChecked();
132-
cli_route_->async_send_request(req);
156+
asyncSendRequest(req);
133157
onWaypointsReset();
134-
});
158+
};
159+
160+
if (adapi_mode_ == AdapiMode::Set && adapi_auto_clear_->isChecked()) {
161+
const auto req = std::make_shared<ClearRoute::Service::Request>();
162+
cli_clear_->async_send_request(req, [call](auto) { call(); });
163+
} else {
164+
call();
165+
}
166+
}
167+
168+
void RoutePanel::requestRoute(const PoseStamped & pose)
169+
{
170+
const auto call = [this, pose] {
171+
const auto req = std::make_shared<SetRoutePoints::Service::Request>();
172+
req->header = pose.header;
173+
req->goal = pose.pose;
174+
req->option.allow_goal_modification = allow_goal_modification_->isChecked();
175+
asyncSendRequest(req);
176+
};
177+
178+
if (adapi_mode_ == AdapiMode::Set && adapi_auto_clear_->isChecked()) {
179+
const auto req = std::make_shared<ClearRoute::Service::Request>();
180+
cli_clear_->async_send_request(req, [call](auto) { call(); });
181+
} else {
182+
call();
183+
}
184+
}
185+
186+
void RoutePanel::clearRoute()
187+
{
188+
const auto callback = [this](auto future) {
189+
const auto status = future.get()->status;
190+
std::string text = status.success ? "OK" : "Error";
191+
text += "[" + std::to_string(status.code) + "]";
192+
text += " " + status.message;
193+
adapi_response_->setText(QString::fromStdString(text));
194+
};
195+
196+
const auto req = std::make_shared<ClearRoute::Service::Request>();
197+
cli_clear_->async_send_request(req, callback);
198+
}
199+
200+
void RoutePanel::asyncSendRequest(SetRoutePoints::Service::Request::SharedPtr req)
201+
{
202+
const auto callback = [this](auto future) {
203+
const auto status = future.get()->status;
204+
std::string text = status.success ? "OK" : "Error";
205+
text += "[" + std::to_string(status.code) + "]";
206+
text += " " + status.message;
207+
adapi_response_->setText(QString::fromStdString(text));
208+
};
209+
210+
if (adapi_mode_ == AdapiMode::Set) {
211+
cli_set_->async_send_request(req, callback);
212+
}
213+
if (adapi_mode_ == AdapiMode::Change) {
214+
cli_change_->async_send_request(req, callback);
215+
}
135216
}
136217

137218
} // namespace tier4_adapi_rviz_plugins

common/tier4_adapi_rviz_plugin/src/route_panel.hpp

+16-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
#ifndef ROUTE_PANEL_HPP_
1616
#define ROUTE_PANEL_HPP_
1717

18+
#include <QButtonGroup>
1819
#include <QCheckBox>
1920
#include <QGroupBox>
21+
#include <QLabel>
2022
#include <QPushButton>
2123
#include <autoware_ad_api_specs/routing.hpp>
2224
#include <component_interface_utils/rclcpp.hpp>
@@ -35,6 +37,7 @@ class RoutePanel : public rviz_common::Panel
3537
Q_OBJECT
3638
using ClearRoute = autoware_ad_api::routing::ClearRoute;
3739
using SetRoutePoints = autoware_ad_api::routing::SetRoutePoints;
40+
using ChangeRoutePoints = autoware_ad_api::routing::ChangeRoutePoints;
3841
using PoseStamped = geometry_msgs::msg::PoseStamped;
3942

4043
public:
@@ -45,18 +48,29 @@ class RoutePanel : public rviz_common::Panel
4548
QPushButton * waypoints_mode_;
4649
QPushButton * waypoints_reset_;
4750
QPushButton * waypoints_apply_;
51+
QPushButton * adapi_clear_;
52+
QPushButton * adapi_set_;
53+
QPushButton * adapi_change_;
54+
QLabel * adapi_response_;
55+
QCheckBox * adapi_auto_clear_;
4856
QGroupBox * waypoints_group_;
4957
QCheckBox * allow_goal_modification_;
5058

5159
rclcpp::Subscription<PoseStamped>::SharedPtr sub_pose_;
5260
std::vector<PoseStamped> waypoints_;
5361
void onPose(const PoseStamped::ConstSharedPtr msg);
5462

63+
enum AdapiMode { Set, Change };
64+
AdapiMode adapi_mode_;
65+
5566
component_interface_utils::Client<ClearRoute>::SharedPtr cli_clear_;
56-
component_interface_utils::Client<SetRoutePoints>::SharedPtr cli_route_;
57-
void setRoute(const PoseStamped & pose);
67+
component_interface_utils::Client<SetRoutePoints>::SharedPtr cli_set_;
68+
component_interface_utils::Client<ChangeRoutePoints>::SharedPtr cli_change_;
69+
void requestRoute(const PoseStamped & pose);
70+
void asyncSendRequest(SetRoutePoints::Service::Request::SharedPtr req);
5871

5972
private slots:
73+
void clearRoute();
6074
void onWaypointsMode(bool clicked);
6175
void onWaypointsReset();
6276
void onWaypointsApply();

common/tier4_automatic_goal_rviz_plugin/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,21 @@ In this situation, check the terminal output for more information.
7878

7979
- Often it is enough to try again.
8080
- Sometimes a clearing of the current route is required before retrying.
81+
82+
## Material Design Icons
83+
84+
This project uses [Material Design Icons](https://developers.google.com/fonts/docs/material_symbols) by Google. These icons are used under the terms of the Apache License, Version 2.0.
85+
86+
Material Design Icons are a collection of symbols provided by Google that are used to enhance the user interface of applications, websites, and other digital products.
87+
88+
### License
89+
90+
The Material Design Icons are licensed under the Apache License, Version 2.0. You may obtain a copy of the License at:
91+
92+
<http://www.apache.org/licenses/LICENSE-2.0>
93+
94+
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.
95+
96+
### Acknowledgments
97+
98+
We would like to express our gratitude to Google for making these icons available to the community, helping developers and designers enhance the visual appeal and user experience of their projects.

common/tier4_camera_view_rviz_plugin/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,21 @@ Add the `tier4_camera_view_rviz_plugin/ThirdPersonViewTool` tool to the RViz. Pu
77
## BirdEyeView Tool
88

99
Add the `tier4_camera_view_rviz_plugin/BirdEyeViewTool` tool to the RViz. Push the button, the camera will turn to the BEV view, the target frame is consistent with the latest frame. Short cut key 'r'.
10+
11+
## Material Design Icons
12+
13+
This project uses [Material Design Icons](https://developers.google.com/fonts/docs/material_symbols) by Google. These icons are used under the terms of the Apache License, Version 2.0.
14+
15+
Material Design Icons are a collection of symbols provided by Google that are used to enhance the user interface of applications, websites, and other digital products.
16+
17+
### License
18+
19+
The Material Design Icons are licensed under the Apache License, Version 2.0. You may obtain a copy of the License at:
20+
21+
<http://www.apache.org/licenses/LICENSE-2.0>
22+
23+
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.
24+
25+
### Acknowledgments
26+
27+
We would like to express our gratitude to Google for making these icons available to the community, helping developers and designers enhance the visual appeal and user experience of their projects.

common/tier4_perception_rviz_plugin/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,21 @@ You can interactively manipulate the object.
112112
| ADD | Shift + Click Right Button |
113113
| MOVE | Hold down Right Button + Drug and Drop |
114114
| DELETE | Alt + Click Right Button |
115+
116+
## Material Design Icons
117+
118+
This project uses [Material Design Icons](https://developers.google.com/fonts/docs/material_symbols) by Google. These icons are used under the terms of the Apache License, Version 2.0.
119+
120+
Material Design Icons are a collection of symbols provided by Google that are used to enhance the user interface of applications, websites, and other digital products.
121+
122+
### License
123+
124+
The Material Design Icons are licensed under the Apache License, Version 2.0. You may obtain a copy of the License at:
125+
126+
<http://www.apache.org/licenses/LICENSE-2.0>
127+
128+
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.
129+
130+
### Acknowledgments
131+
132+
We would like to express our gratitude to Google for making these icons available to the community, helping developers and designers enhance the visual appeal and user experience of their projects.

common/tier4_planning_rviz_plugin/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,21 @@ This plugin displays the path, trajectory, and maximum speed.
125125
![select_planning_plugin](./images/select_planning_plugin.png)
126126
3. Enter the name of the topic where you want to view the path or trajectory.
127127
![select_topic_name](./images/select_topic_name.png)
128+
129+
## Material Design Icons
130+
131+
This project uses [Material Design Icons](https://developers.google.com/fonts/docs/material_symbols) by Google. These icons are used under the terms of the Apache License, Version 2.0.
132+
133+
Material Design Icons are a collection of symbols provided by Google that are used to enhance the user interface of applications, websites, and other digital products.
134+
135+
### License
136+
137+
The Material Design Icons are licensed under the Apache License, Version 2.0. You may obtain a copy of the License at:
138+
139+
<http://www.apache.org/licenses/LICENSE-2.0>
140+
141+
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.
142+
143+
### Acknowledgments
144+
145+
We would like to express our gratitude to Google for making these icons available to the community, helping developers and designers enhance the visual appeal and user experience of their projects.

control/autonomous_emergency_braking/include/autonomous_emergency_braking/node.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
#include <memory>
4343
#include <mutex>
44+
#include <optional>
4445
#include <string>
4546
#include <vector>
4647

@@ -140,10 +141,9 @@ class AEB : public rclcpp::Node
140141
bool hasCollision(
141142
const double current_v, const Path & ego_path, const std::vector<ObjectData> & objects);
142143

143-
void generateEgoPath(
144-
const double curr_v, const double curr_w, Path & path, std::vector<Polygon2d> & polygons);
145-
void generateEgoPath(
146-
const Trajectory & predicted_traj, Path & path, std::vector<Polygon2d> & polygons);
144+
Path generateEgoPath(const double curr_v, const double curr_w, std::vector<Polygon2d> & polygons);
145+
std::optional<Path> generateEgoPath(
146+
const Trajectory & predicted_traj, std::vector<Polygon2d> & polygons);
147147
void createObjectData(
148148
const Path & ego_path, const std::vector<Polygon2d> & ego_polys, const rclcpp::Time & stamp,
149149
std::vector<ObjectData> & objects);

control/autonomous_emergency_braking/package.xml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<description>Autonomous Emergency Braking package as a ROS 2 node</description>
77
<maintainer email="takamasa.horibe@tier4.jp">Takamasa Horibe</maintainer>
88
<maintainer email="tomoya.kimura@tier4.jp">Tomoya Kimura</maintainer>
9+
<maintainer email="mamoru.sobue@tier4.jp">Mamoru Sobue</maintainer>
910

1011
<license>Apache License 2.0</license>
1112

0 commit comments

Comments
 (0)