Skip to content

Commit

Permalink
Merge pull request #1439 from tier4/sync-upstream
Browse files Browse the repository at this point in the history
chore: sync tier4/autoware.universe:awf-latest
  • Loading branch information
tier4-autoware-public-bot[bot] authored Aug 1, 2024
2 parents 57a0c28 + b9fb39b commit b30d56e
Show file tree
Hide file tree
Showing 1,187 changed files with 11,062 additions and 7,358 deletions.
3 changes: 0 additions & 3 deletions .cppcheck_suppressions
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@

checkersReport
constParameterReference
constVariableReference
funcArgNamesDifferent
functionConst
functionStatic
knownConditionTrueFalse
missingInclude
missingIncludeSystem
noConstructor
passedByValue
redundantInitialization
shadowVariable
// cspell: ignore uninit
uninitMemberVar
unknownMacro
Expand Down
87 changes: 44 additions & 43 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/sync-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
files:
- source: .github/workflows/clang-tidy-differential.yaml
pre-commands: |
sd 'container: ros:(\w+)' 'container: ghcr.io/autowarefoundation/autoware:latest-prebuilt-cuda' {source}
sd 'container: ros:(\w+)' 'container: ghcr.io/autowarefoundation/autoware:latest-autoware-universe-cuda' {source}
- source: .github/workflows/check-build-depends.yaml
- source: .github/workflows/clang-tidy-pr-comments.yaml
- source: .github/workflows/clang-tidy-pr-comments-manually.yaml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-daily-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- -cuda
include:
- rosdistro: humble
container: ghcr.io/autowarefoundation/autoware:latest-prebuilt
container: ghcr.io/autowarefoundation/autoware:latest-autoware-universe
build-depends-repos: build_depends.repos
steps:
- name: Check out repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- -cuda
include:
- rosdistro: humble
container: ghcr.io/autowarefoundation/autoware:latest-prebuilt
container: ghcr.io/autowarefoundation/autoware:latest-autoware-universe
build-depends-repos: build_depends.repos
steps:
- name: Check out repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-differential-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- -cuda
include:
- rosdistro: humble
container: ghcr.io/autowarefoundation/autoware:latest-prebuilt
container: ghcr.io/autowarefoundation/autoware:latest-autoware-universe
build-depends-repos: build_depends.repos
steps:
- name: Set PR fetch depth
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test-differential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- -cuda
include:
- rosdistro: humble
container: ghcr.io/autowarefoundation/autoware:latest-prebuilt
container: ghcr.io/autowarefoundation/autoware:latest-autoware-universe
build-depends-repos: build_depends.repos
steps:
- name: Set PR fetch depth
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
clang-tidy-differential:
needs: build-and-test-differential
runs-on: ubuntu-latest
container: ghcr.io/autowarefoundation/autoware:latest-prebuilt-cuda
container: ghcr.io/autowarefoundation/autoware:latest-autoware-universe-cuda
steps:
- name: Set PR fetch depth
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- -cuda
include:
- rosdistro: humble
container: ghcr.io/autowarefoundation/autoware:latest-prebuilt
container: ghcr.io/autowarefoundation/autoware:latest-autoware-universe
build-depends-repos: build_depends.repos
steps:
- name: Check out repository
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ jobs:
config.max_model_tokens: 64000
pr_code_suggestions.max_context_tokens: 12000
pr_code_suggestions.commitable_code_suggestions: true
pr_reviewer.enable_review_labels_effort: false
pr_reviewer.enable_review_labels_security: false
12 changes: 6 additions & 6 deletions build_depends.repos
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ repositories:
core/autoware_cmake:
type: git
url: https://github.com/autowarefoundation/autoware_cmake.git
version: main
version: 1.0.0
core/autoware_utils:
type: git
url: https://github.com/autowarefoundation/autoware_utils.git
version: main
version: 1.0.0
core/autoware_lanelet2_extension:
type: git
url: https://github.com/autowarefoundation/autoware_lanelet2_extension.git
version: main
version: 0.5.0
core/autoware.core:
type: git
url: https://github.com/autowarefoundation/autoware.core.git
version: main
core/autoware_msgs:
type: git
url: https://github.com/autowarefoundation/autoware_msgs.git
version: main
version: 1.1.0
core/autoware_adapi_msgs:
type: git
url: https://github.com/autowarefoundation/autoware_adapi_msgs.git
version: main
version: 1.3.0
core/autoware_internal_msgs:
type: git
url: https://github.com/autowarefoundation/autoware_internal_msgs.git
version: main
version: 1.1.0
# universe
universe/external/tier4_autoware_msgs:
type: git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ private Q_SLOTS:
rviz_common::properties::IntProperty * property_height_;
rviz_common::properties::IntProperty * property_right_;
rviz_common::properties::IntProperty * property_top_;
rviz_common::properties::ColorProperty * property_bg_color_;
rviz_common::properties::FloatProperty * property_bg_alpha_;
rviz_common::properties::ColorProperty * property_text_color_;

std::unique_ptr<rviz_common::properties::RosTopicProperty>
remaining_distance_time_topic_property_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,15 @@ class RemainingDistanceTimeDisplay
{
public:
RemainingDistanceTimeDisplay();
void drawRemainingDistanceTimeDisplay(QPainter & painter, const QRectF & backgroundRect);
void drawRemainingDistanceTimeDisplay(
QPainter & painter, const QRectF & backgroundRect, const QColor & text_color);
void updateRemainingDistanceTimeData(
const autoware_internal_msgs::msg::MissionRemainingDistanceTime::ConstSharedPtr & msg);

private:
double remaining_distance_; // Internal variable to store remaining distance
double remaining_time_; // Internal variable to store remaining time

QColor gray = QColor(194, 194, 194);

QImage icon_dist_;
QImage icon_dist_scaled_;
QImage icon_time_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ MissionDetailsDisplay::MissionDetailsDisplay()
"Right", 10, "Margin from the right border", this, SLOT(update_size()));
property_top_ = new rviz_common::properties::IntProperty(
"Top", 10, "Margin from the top border", this, SLOT(update_size()));
property_bg_alpha_ = new rviz_common::properties::FloatProperty(
"Background Alpha", 0.3, "Background Alpha", this, SLOT(update_size()));
property_bg_color_ = new rviz_common::properties::ColorProperty(
"Background Color", QColor(0, 0, 0), "Background Color", this, SLOT(update_size()));
property_text_color_ = new rviz_common::properties::ColorProperty(
"Text Color", QColor(194, 194, 194), "Text Color", this, SLOT(update_size()));

// Initialize the component displays
remaining_distance_time_display_ = std::make_unique<RemainingDistanceTimeDisplay>();
Expand Down Expand Up @@ -154,7 +160,8 @@ void MissionDetailsDisplay::draw_widget(QImage & hud)
draw_rounded_rect(painter, backgroundRect);

if (remaining_distance_time_display_) {
remaining_distance_time_display_->drawRemainingDistanceTimeDisplay(painter, backgroundRect);
remaining_distance_time_display_->drawRemainingDistanceTimeDisplay(
painter, backgroundRect, property_text_color_->getColor());
}

painter.end();
Expand All @@ -164,8 +171,10 @@ void MissionDetailsDisplay::draw_rounded_rect(QPainter & painter, const QRectF &
{
painter.setRenderHint(QPainter::Antialiasing, true);
QColor colorFromHSV;
colorFromHSV.setHsv(0, 0, 29);
colorFromHSV.setAlphaF(0.60);
colorFromHSV.setHsv(
property_bg_color_->getColor().hue(), property_bg_color_->getColor().saturation(),
property_bg_color_->getColor().value());
colorFromHSV.setAlphaF(property_bg_alpha_->getFloat());

painter.setBrush(colorFromHSV);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void RemainingDistanceTimeDisplay::updateRemainingDistanceTimeData(
}

void RemainingDistanceTimeDisplay::drawRemainingDistanceTimeDisplay(
QPainter & painter, const QRectF & backgroundRect)
QPainter & painter, const QRectF & backgroundRect, const QColor & text_color)
{
const QFont font("Quicksand", 15, QFont::Bold);
painter.setFont(font);
Expand Down Expand Up @@ -107,7 +107,7 @@ void RemainingDistanceTimeDisplay::drawRemainingDistanceTimeDisplay(
QRectF rect_text_unit(
rect.topRight().x() - unit_width, rect.topRight().y(), unit_width, rect.height());

painter.setPen(gray);
painter.setPen(text_color);
painter.drawText(rect_text_unit, Qt::AlignLeft | Qt::AlignVCenter, str_unit);

// place the value text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class GearDisplay
{
public:
GearDisplay();
void drawGearIndicator(QPainter & painter, const QRectF & backgroundRect);
void drawGearIndicator(
QPainter & painter, const QRectF & backgroundRect, const QColor & color,
const QColor & bg_color);
void updateGearData(const autoware_vehicle_msgs::msg::GearReport::ConstSharedPtr & msg);

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ private Q_SLOTS:
rviz_common::properties::IntProperty * property_top_;
rviz_common::properties::ColorProperty * property_signal_color_;
rviz_common::properties::FloatProperty * property_handle_angle_scale_;
rviz_common::properties::ColorProperty * property_background_color_;
rviz_common::properties::FloatProperty * property_background_alpha_;
rviz_common::properties::ColorProperty * property_primary_color_;
rviz_common::properties::ColorProperty * property_light_limit_color_;
rviz_common::properties::ColorProperty * property_dark_limit_color_;

std::unique_ptr<rviz_common::properties::RosTopicProperty> steering_topic_property_;
std::unique_ptr<rviz_common::properties::RosTopicProperty> gear_topic_property_;
std::unique_ptr<rviz_common::properties::RosTopicProperty> speed_topic_property_;
Expand All @@ -103,8 +109,7 @@ private Q_SLOTS:
turn_signals_sub_;
rclcpp::Subscription<autoware_vehicle_msgs::msg::HazardLightsReport>::SharedPtr
hazard_lights_sub_;
rclcpp::Subscription<autoware_perception_msgs::msg::TrafficLightGroupArray>::SharedPtr
traffic_sub_;
rclcpp::Subscription<autoware_perception_msgs::msg::TrafficLightGroup>::SharedPtr traffic_sub_;
rclcpp::Subscription<tier4_planning_msgs::msg::VelocityLimit>::SharedPtr speed_limit_sub_;

std::mutex property_mutex_;
Expand All @@ -118,7 +123,7 @@ private Q_SLOTS:
const autoware_vehicle_msgs::msg::HazardLightsReport::ConstSharedPtr & msg);
void updateSpeedLimitData(const tier4_planning_msgs::msg::VelocityLimit::ConstSharedPtr msg);
void updateTrafficLightData(
const autoware_perception_msgs::msg::TrafficLightGroupArray::ConstSharedPtr msg);
const autoware_perception_msgs::msg::TrafficLightGroup::ConstSharedPtr msg);
void drawWidget(QImage & hud);
};
} // namespace autoware_overlay_rviz_plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ class SpeedDisplay
{
public:
SpeedDisplay();
void drawSpeedDisplay(QPainter & painter, const QRectF & backgroundRect);
void drawSpeedDisplay(QPainter & painter, const QRectF & backgroundRect, const QColor & color);
void updateSpeedData(const autoware_vehicle_msgs::msg::VelocityReport::ConstSharedPtr & msg);

private:
float current_speed_; // Internal variable to store current speed
QColor gray = QColor(194, 194, 194);
};

} // namespace autoware_overlay_rviz_plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ class SpeedLimitDisplay
{
public:
SpeedLimitDisplay();
void drawSpeedLimitIndicator(QPainter & painter, const QRectF & backgroundRect);
void drawSpeedLimitIndicator(
QPainter & painter, const QRectF & backgroundRect, const QColor & color,
const QColor & light_color, const QColor & dark_color, const QColor & bg_color,
const float bg_alpha);
void updateSpeedLimitData(const tier4_planning_msgs::msg::VelocityLimit::ConstSharedPtr msg);
void updateSpeedData(const autoware_vehicle_msgs::msg::VelocityReport::ConstSharedPtr & msg);

private:
float current_limit; // Internal variable to store current gear
float current_speed_; // Internal variable to store current speed
QColor gray = QColor(194, 194, 194);
};

} // namespace autoware_overlay_rviz_plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include <autoware_perception_msgs/msg/traffic_light_element.hpp>
#include <autoware_perception_msgs/msg/traffic_light_group.hpp>
#include <autoware_perception_msgs/msg/traffic_light_group_array.hpp>

#include <OgreColourValue.h>
#include <OgreMaterial.h>
Expand All @@ -40,8 +39,8 @@ class TrafficDisplay
TrafficDisplay();
void drawTrafficLightIndicator(QPainter & painter, const QRectF & backgroundRect);
void updateTrafficLightData(
const autoware_perception_msgs::msg::TrafficLightGroupArray::ConstSharedPtr & msg);
autoware_perception_msgs::msg::TrafficLightGroupArray current_traffic_;
const autoware_perception_msgs::msg::TrafficLightGroup::ConstSharedPtr & msg);
autoware_perception_msgs::msg::TrafficLightGroup current_traffic_;

private:
QImage traffic_light_image_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ void GearDisplay::updateGearData(const autoware_vehicle_msgs::msg::GearReport::C
current_gear_ = msg->report; // Assuming msg->report contains the gear information
}

void GearDisplay::drawGearIndicator(QPainter & painter, const QRectF & backgroundRect)
void GearDisplay::drawGearIndicator(
QPainter & painter, const QRectF & backgroundRect, const QColor & color, const QColor & bg_color)
{
// we deal with the different gears here
std::string gearString;
Expand Down Expand Up @@ -90,9 +91,9 @@ void GearDisplay::drawGearIndicator(QPainter & painter, const QRectF & backgroun
double gearX = backgroundRect.left() + 54;
double gearY = backgroundRect.height() / 2 - gearBoxSize / 2;
QRect gearRect(gearX, gearY, gearBoxSize, gearBoxSize);
painter.setBrush(gray);
painter.setBrush(color);
painter.drawRoundedRect(gearRect, 10, 10);
painter.setPen(Qt::black);
painter.setPen(bg_color);
painter.drawText(gearRect, Qt::AlignCenter, QString::fromStdString(gearString));
}

Expand Down
Loading

0 comments on commit b30d56e

Please sign in to comment.