Skip to content

Commit 192a89d

Browse files
authored
Merge branch 'autowarefoundation:main' into feat/distortion_correction_node_update_azimuth_and_distance
2 parents 7b51d4f + 7081a61 commit 192a89d

File tree

53 files changed

+496
-413
lines changed

Some content is hidden

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

53 files changed

+496
-413
lines changed

.github/workflows/build-and-test-self-hosted.yaml .github/workflows/build-and-test-arm64.yaml

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: build-and-test-self-hosted
1+
name: build-and-test-arm64
22

33
on:
44
schedule:
55
- cron: 0 0 * * *
66
workflow_dispatch:
77

88
jobs:
9-
build-and-test-self-hosted:
9+
build-and-test-arm64:
1010
runs-on: [self-hosted, linux, ARM64]
1111
container: ${{ matrix.container }}${{ matrix.container-suffix }}
1212
strategy:
@@ -19,12 +19,15 @@ jobs:
1919
- -cuda
2020
include:
2121
- rosdistro: humble
22-
container: ghcr.io/autowarefoundation/autoware-universe:humble-latest
22+
container: ghcr.io/autowarefoundation/autoware-openadk:latest-prebuilt
2323
build-depends-repos: build_depends.repos
2424
steps:
2525
- name: Check out repository
2626
uses: actions/checkout@v3
2727

28+
- name: Show disk space before the tasks
29+
run: df -h
30+
2831
- name: Remove exec_depend
2932
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
3033

@@ -47,3 +50,6 @@ jobs:
4750
rosdistro: ${{ matrix.rosdistro }}
4851
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
4952
build-depends-repos: ${{ matrix.build-depends-repos }}
53+
54+
- name: Show disk space after the tasks
55+
run: df -h

.github/workflows/build-and-test-differential-self-hosted.yaml .github/workflows/build-and-test-differential-arm64.yaml

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build-and-test-differential-self-hosted
1+
name: build-and-test-differential-arm64
22

33
on:
44
pull_request:
@@ -12,9 +12,9 @@ jobs:
1212
prevent-no-label-execution:
1313
uses: autowarefoundation/autoware-github-actions/.github/workflows/prevent-no-label-execution.yaml@v1
1414
with:
15-
label: ARM64
15+
label: type:arm64
1616

17-
build-and-test-differential-self-hosted:
17+
build-and-test-differential-arm64:
1818
needs: prevent-no-label-execution
1919
if: ${{ needs.prevent-no-label-execution.outputs.run == 'true' }}
2020
runs-on: [self-hosted, linux, ARM64]
@@ -29,14 +29,17 @@ jobs:
2929
- -cuda
3030
include:
3131
- rosdistro: humble
32-
container: ghcr.io/autowarefoundation/autoware-universe:humble-latest
32+
container: ghcr.io/autowarefoundation/autoware-openadk:latest-prebuilt
3333
build-depends-repos: build_depends.repos
3434
steps:
3535
- name: Check out repository
3636
uses: actions/checkout@v3
3737
with:
3838
fetch-depth: 0
3939

40+
- name: Show disk space before the tasks
41+
run: df -h
42+
4043
- name: Remove exec_depend
4144
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
4245

@@ -59,3 +62,6 @@ jobs:
5962
rosdistro: ${{ matrix.rosdistro }}
6063
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
6164
build-depends-repos: ${{ matrix.build-depends-repos }}
65+
66+
- name: Show disk space after the tasks
67+
run: df -h

.github/workflows/build-and-test-differential.yaml

+5-4
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,27 @@ jobs:
1616
build-and-test-differential:
1717
needs: prevent-no-label-execution
1818
if: ${{ needs.prevent-no-label-execution.outputs.run == 'true' }}
19-
runs-on: [self-hosted, linux, X64]
19+
runs-on: ubuntu-latest
2020
container: ${{ matrix.container }}${{ matrix.container-suffix }}
2121
strategy:
2222
fail-fast: false
2323
matrix:
2424
rosdistro:
2525
- humble
2626
container-suffix:
27+
- ""
2728
- -cuda
2829
include:
2930
- rosdistro: humble
30-
container: ghcr.io/autowarefoundation/autoware-universe:humble-latest
31+
container: ghcr.io/autowarefoundation/autoware-openadk:latest-prebuilt
3132
build-depends-repos: build_depends.repos
3233
steps:
3334
- name: Check out repository
3435
uses: actions/checkout@v3
3536
with:
3637
fetch-depth: 0
3738

38-
- name: Check disk space before build
39+
- name: Show disk space before the tasks
3940
run: df -h
4041

4142
- name: Remove exec_depend
@@ -71,5 +72,5 @@ jobs:
7172
verbose: true
7273
flags: differential
7374

74-
- name: Check disk space after build
75+
- name: Show disk space after the tasks
7576
run: df -h

.github/workflows/build-and-test.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
build-and-test:
1111
if: ${{ github.event_name != 'push' || github.ref_name == github.event.repository.default_branch }}
12-
runs-on: [self-hosted, linux, X64]
12+
runs-on: ubuntu-latest
1313
container: ${{ matrix.container }}${{ matrix.container-suffix }}
1414
strategy:
1515
fail-fast: false
@@ -21,12 +21,15 @@ jobs:
2121
- -cuda
2222
include:
2323
- rosdistro: humble
24-
container: ghcr.io/autowarefoundation/autoware-universe:humble-latest
24+
container: ghcr.io/autowarefoundation/autoware-openadk:latest-prebuilt
2525
build-depends-repos: build_depends.repos
2626
steps:
2727
- name: Check out repository
2828
uses: actions/checkout@v3
2929

30+
- name: Show disk space before the tasks
31+
run: df -h
32+
3033
- name: Remove exec_depend
3134
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
3235

@@ -59,3 +62,6 @@ jobs:
5962
fail_ci_if_error: false
6063
verbose: true
6164
flags: total
65+
66+
- name: Show disk space after the tasks
67+
run: df -h

common/tier4_control_rviz_plugin/src/tools/manual_controller.cpp

+18-36
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ using std::placeholders::_1;
3030
namespace rviz_plugins
3131
{
3232

33-
double lowpassFilter(
34-
const double current_value, const double prev_value, double cutoff, const double dt)
35-
{
36-
const double tau = 1.0 / (2.0 * M_PI * cutoff);
37-
const double a = tau / (dt + tau);
38-
return prev_value * a + (1.0 - a) * current_value;
39-
}
40-
4133
ManualController::ManualController(QWidget * parent) : rviz_common::Panel(parent)
4234
{
4335
auto * state_layout = new QHBoxLayout;
@@ -115,25 +107,23 @@ void ManualController::update()
115107
ackermann.stamp = raw_node_->get_clock()->now();
116108
ackermann.lateral.steering_tire_angle = steering_angle_;
117109
ackermann.longitudinal.speed = cruise_velocity_;
118-
if (current_acceleration_) {
119-
/**
120-
* @brief Calculate desired acceleration by simple BackSteppingControl
121-
* V = 0.5*(v-v_des)^2 >= 0
122-
* D[V] = (D[v] - a_des)*(v-v_des) <=0
123-
* a_des = k_const *(v - v_des) + a (k < 0 )
124-
*/
125-
const double k = -0.5;
126-
const double v = current_velocity_;
127-
const double v_des = cruise_velocity_;
128-
const double a = *current_acceleration_;
129-
const double a_des = k * (v - v_des) + a;
130-
ackermann.longitudinal.acceleration = std::clamp(a_des, -1.0, 1.0);
131-
}
110+
/**
111+
* @brief Calculate desired acceleration by simple BackSteppingControl
112+
* V = 0.5*(v-v_des)^2 >= 0
113+
* D[V] = (D[v] - a_des)*(v-v_des) <=0
114+
* a_des = k_const *(v - v_des) + a (k < 0 )
115+
*/
116+
const double k = -0.5;
117+
const double v = current_velocity_;
118+
const double v_des = cruise_velocity_;
119+
const double a = current_acceleration_;
120+
const double a_des = k * (v - v_des) + a;
121+
ackermann.longitudinal.acceleration = std::clamp(a_des, -1.0, 1.0);
132122
}
133123
GearCommand gear_cmd;
134124
{
135125
const double eps = 0.001;
136-
if (ackermann.longitudinal.speed > eps) {
126+
if (ackermann.longitudinal.speed > eps && current_velocity_ > -eps) {
137127
gear_cmd.command = GearCommand::DRIVE;
138128
} else if (ackermann.longitudinal.speed < -eps && current_velocity_ < eps) {
139129
gear_cmd.command = GearCommand::REVERSE;
@@ -220,19 +210,11 @@ void ManualController::onEngageStatus(const Engage::ConstSharedPtr msg)
220210
void ManualController::onVelocity(const VelocityReport::ConstSharedPtr msg)
221211
{
222212
current_velocity_ = msg->longitudinal_velocity;
223-
if (previous_velocity_) {
224-
const double cutoff = 10.0;
225-
const double dt = 1.0 / 10.0;
226-
const double acc = (current_velocity_ - *previous_velocity_) / dt;
227-
if (!current_acceleration_) {
228-
current_acceleration_ = std::make_unique<double>(acc);
229-
} else {
230-
current_acceleration_ =
231-
std::make_unique<double>(lowpassFilter(acc, *current_acceleration_, cutoff, dt));
232-
}
233-
}
234-
previous_velocity_ = std::make_unique<double>(msg->longitudinal_velocity);
235-
prev_stamp_ = rclcpp::Time(msg->header.stamp);
213+
}
214+
215+
void ManualController::onAcceleration(const AccelWithCovarianceStamped::ConstSharedPtr msg)
216+
{
217+
current_acceleration_ = msg->accel.accel.linear.x;
236218
}
237219

238220
void ManualController::onGear(const GearReport::ConstSharedPtr msg)

common/tier4_control_rviz_plugin/src/tools/manual_controller.hpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <rviz_common/panel.hpp>
2626

2727
#include "autoware_auto_vehicle_msgs/msg/velocity_report.hpp"
28+
#include "geometry_msgs/msg/accel_with_covariance_stamped.hpp"
2829
#include "geometry_msgs/msg/twist.hpp"
2930
#include <autoware_auto_control_msgs/msg/ackermann_control_command.hpp>
3031
#include <autoware_auto_vehicle_msgs/msg/engage.hpp>
@@ -40,6 +41,7 @@ namespace rviz_plugins
4041
using autoware_auto_control_msgs::msg::AckermannControlCommand;
4142
using autoware_auto_vehicle_msgs::msg::GearCommand;
4243
using autoware_auto_vehicle_msgs::msg::VelocityReport;
44+
using geometry_msgs::msg::AccelWithCovarianceStamped;
4345
using geometry_msgs::msg::Twist;
4446
using tier4_control_msgs::msg::GateMode;
4547
using EngageSrv = tier4_external_api_msgs::srv::Engage;
@@ -67,6 +69,7 @@ public Q_SLOTS: // NOLINT for Qt
6769
void onPublishControlCommand();
6870
void onGateMode(const GateMode::ConstSharedPtr msg);
6971
void onVelocity(const VelocityReport::ConstSharedPtr msg);
72+
void onAcceleration(const AccelWithCovarianceStamped::ConstSharedPtr msg);
7073
void onEngageStatus(const Engage::ConstSharedPtr msg);
7174
void onGear(const GearReport::ConstSharedPtr msg);
7275
rclcpp::Node::SharedPtr raw_node_;
@@ -82,9 +85,7 @@ public Q_SLOTS: // NOLINT for Qt
8285
double cruise_velocity_{0.0};
8386
double steering_angle_{0.0};
8487
double current_velocity_{0.0};
85-
rclcpp::Time prev_stamp_;
86-
std::unique_ptr<double> previous_velocity_;
87-
std::unique_ptr<double> current_acceleration_;
88+
double current_acceleration_{0.0};
8889

8990
QLabel * gate_mode_label_ptr_;
9091
QLabel * gear_label_ptr_;

common/tier4_state_rviz_plugin/src/autoware_state_panel.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,11 @@ void AutowareStatePanel::onMRMState(const MRMState::ConstSharedPtr msg)
502502
style_sheet = "background-color: #00FF00;"; // green
503503
break;
504504

505+
case MRMState::PULL_OVER:
506+
text = "PULL_OVER";
507+
style_sheet = "background-color: #FFFF00;"; // yellow
508+
break;
509+
505510
case MRMState::COMFORTABLE_STOP:
506511
text = "COMFORTABLE_STOP";
507512
style_sheet = "background-color: #FFFF00;"; // yellow

control/mpc_lateral_controller/src/mpc_lateral_controller.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,11 @@ trajectory_follower::LateralOutput MpcLateralController::run(
243243
Trajectory predicted_traj;
244244
Float32MultiArrayStamped debug_values;
245245

246-
if (!m_is_ctrl_cmd_prev_initialized) {
246+
const bool is_under_control = input_data.current_operation_mode.is_autoware_control_enabled &&
247+
input_data.current_operation_mode.mode ==
248+
autoware_adapi_v1_msgs::msg::OperationModeState::AUTONOMOUS;
249+
250+
if (!m_is_ctrl_cmd_prev_initialized || !is_under_control) {
247251
m_ctrl_cmd_prev = getInitialControlCommand();
248252
m_is_ctrl_cmd_prev_initialized = true;
249253
}

evaluator/perception_online_evaluator/include/perception_online_evaluator/metrics_calculator.hpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "perception_online_evaluator/metrics/metric.hpp"
2020
#include "perception_online_evaluator/parameters.hpp"
2121
#include "perception_online_evaluator/stat.hpp"
22+
#include "perception_online_evaluator/utils/objects_filtering.hpp"
2223

2324
#include <rclcpp/time.hpp>
2425

@@ -118,9 +119,9 @@ class MetricsCalculator
118119
void deleteOldObjects(const rclcpp::Time stamp);
119120

120121
// Calculate metrics
121-
MetricStatMap calcLateralDeviationMetrics(const PredictedObjects & objects) const;
122-
MetricStatMap calcYawDeviationMetrics(const PredictedObjects & objects) const;
123-
MetricStatMap calcPredictedPathDeviationMetrics(const PredictedObjects & objects) const;
122+
MetricStatMap calcLateralDeviationMetrics(const ClassObjectsMap & class_objects_map) const;
123+
MetricStatMap calcYawDeviationMetrics(const ClassObjectsMap & class_objects_map) const;
124+
MetricStatMap calcPredictedPathDeviationMetrics(const ClassObjectsMap & class_objects_map) const;
124125
Stat<double> calcPredictedPathDeviationMetrics(
125126
const PredictedObjects & objects, const double time_horizon) const;
126127

evaluator/perception_online_evaluator/include/perception_online_evaluator/utils/objects_filtering.hpp

+10
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ using autoware_auto_perception_msgs::msg::ObjectClassification;
3737
using autoware_auto_perception_msgs::msg::PredictedObject;
3838
using autoware_auto_perception_msgs::msg::PredictedObjects;
3939

40+
using ClassObjectsMap = std::unordered_map<uint8_t, PredictedObjects>;
41+
4042
std::uint8_t getHighestProbLabel(const std::vector<ObjectClassification> & classification);
4143

4244
/**
@@ -105,6 +107,14 @@ void filterObjects(PredictedObjects & objects, Func filter)
105107
filterObjects(objects, removed_objects, filter);
106108
}
107109

110+
/**
111+
* @brief Separates the provided objects based on their classification.
112+
*
113+
* @param objects The predicted objects to be separated.
114+
* @return A map of objects separated by their classification.
115+
*/
116+
ClassObjectsMap separateObjectsByClass(const PredictedObjects & objects);
117+
108118
/**
109119
* @brief Filters the provided objects based on their classification.
110120
*

evaluator/perception_online_evaluator/package.xml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<depend>libgoogle-glog-dev</depend>
2525
<depend>motion_utils</depend>
2626
<depend>nav_msgs</depend>
27+
<depend>object_recognition_utils</depend>
2728
<depend>pluginlib</depend>
2829
<depend>rclcpp</depend>
2930
<depend>rclcpp_components</depend>

0 commit comments

Comments
 (0)