Skip to content

Commit

Permalink
Merge pull request #1153 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 Feb 21, 2024
2 parents 271f71a + 871f8f2 commit 94e5f48
Show file tree
Hide file tree
Showing 569 changed files with 8,655 additions and 16,805 deletions.
2 changes: 1 addition & 1 deletion .cspell-partial.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"perception/bytetrack/lib/**"
],
"ignoreRegExpList": [],
"words": ["dltype", "tvmgen", "quantizer", "imageio", "mimsave"]
"words": ["dltype", "tvmgen"]
}
39 changes: 17 additions & 22 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(rviz_2d_overlay_msgs)
project(autoware_overlay_msgs)

if (NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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>rviz_2d_overlay_msgs</name>
<name>autoware_overlay_msgs</name>
<version>1.3.0</version>
<description>Messages describing 2D overlays for RVIZ, extracted/derived from the jsk_visualization package.</description>
<maintainer email="[email protected]">Team Spatzenhirn</maintainer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.8)
project(awf_2d_overlay_vehicle)
project(autoware_overlay_rviz_plugin)

# find dependencies
find_package(ament_cmake_auto REQUIRED)
Expand All @@ -9,7 +9,7 @@ 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(autoware_overlay_msgs REQUIRED)

find_package(rviz_common REQUIRED)
find_package(rviz_rendering REQUIRED)
Expand Down Expand Up @@ -90,7 +90,7 @@ ament_target_dependencies(
PUBLIC
rviz_common
rviz_rendering
rviz_2d_overlay_msgs
autoware_overlay_msgs
autoware_auto_vehicle_msgs
tier4_planning_msgs
autoware_perception_msgs
Expand Down Expand Up @@ -136,5 +136,5 @@ install(
add_definitions(-DQT_NO_KEYWORDS)

ament_package(
CONFIG_EXTRAS "awf_2d_overlay_vehicle-extras.cmake"
CONFIG_EXTRAS "autoware_overlay_rviz_plugin-extras.cmake"
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# autoware_overlay_rviz_plugin

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 velocity |
| `/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 |
| `/planning/scenario_planning/current_max_velocity` | `tier4_planning_msgs::msg::VelocityLimit` | The topic is velocity limit |
| `/perception/traffic_light_recognition/traffic_signals` | `autoware_perception_msgs::msg::TrafficSignalArray` | The topic is status of traffic light |

## 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 `rviz2` and click `Add` button under the `Displays` panel.

![select_add](./assets/images/select_add.png)

2. Under `By display type` tab, select `autoware_overlay_rviz_plugin/SignalDisplay` and press OK.

3. Enter the names of the topics if necessary.

![select_topic_name](./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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <OgreMaterial.h>
#include <OgreTexture.h>

namespace awf_2d_overlay_vehicle
namespace autoware_overlay_rviz_plugin
{

class GearDisplay
Expand All @@ -44,6 +44,6 @@ class GearDisplay
QColor gray = QColor(194, 194, 194);
};

} // namespace awf_2d_overlay_vehicle
} // namespace autoware_overlay_rviz_plugin

#endif // GEAR_DISPLAY_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#ifndef OVERLAY_TEXT_DISPLAY_HPP_
#define OVERLAY_TEXT_DISPLAY_HPP_

#include "rviz_2d_overlay_msgs/msg/overlay_text.hpp"
#include "autoware_overlay_msgs/msg/overlay_text.hpp"
#ifndef Q_MOC_RUN
#include "overlay_utils.hpp"

Expand All @@ -69,18 +69,18 @@
#include <string>
#endif

namespace awf_2d_overlay_vehicle
namespace autoware_overlay_rviz_plugin
{
class OverlayTextDisplay
: public rviz_common::RosTopicDisplay<rviz_2d_overlay_msgs::msg::OverlayText>
: public rviz_common::RosTopicDisplay<autoware_overlay_msgs::msg::OverlayText>
{
Q_OBJECT
public:
OverlayTextDisplay();
virtual ~OverlayTextDisplay();

protected:
awf_2d_overlay_vehicle::OverlayObject::SharedPtr overlay_;
autoware_overlay_rviz_plugin::OverlayObject::SharedPtr overlay_;

int texture_width_;
int texture_height_;
Expand Down Expand Up @@ -150,8 +150,8 @@ protected Q_SLOTS:
void updateLineWidth();

private:
void processMessage(rviz_2d_overlay_msgs::msg::OverlayText::ConstSharedPtr msg) override;
void processMessage(autoware_overlay_msgs::msg::OverlayText::ConstSharedPtr msg) override;
};
} // namespace awf_2d_overlay_vehicle
} // namespace autoware_overlay_rviz_plugin

#endif // OVERLAY_TEXT_DISPLAY_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#include <QColor>
#include <QImage>

#include "rviz_2d_overlay_msgs/msg/overlay_text.hpp"
#include "autoware_overlay_msgs/msg/overlay_text.hpp"

#include <OgreHardwarePixelBuffer.h>
#include <OgreMaterialManager.h>
Expand All @@ -70,7 +70,7 @@
#include <memory>
#include <string>

namespace awf_2d_overlay_vehicle
namespace autoware_overlay_rviz_plugin
{
class OverlayObject;

Expand All @@ -90,15 +90,15 @@ class ScopedPixelBuffer
};

enum class VerticalAlignment : uint8_t {
CENTER = rviz_2d_overlay_msgs::msg::OverlayText::CENTER,
TOP = rviz_2d_overlay_msgs::msg::OverlayText::TOP,
BOTTOM = rviz_2d_overlay_msgs::msg::OverlayText::BOTTOM,
CENTER = autoware_overlay_msgs::msg::OverlayText::CENTER,
TOP = autoware_overlay_msgs::msg::OverlayText::TOP,
BOTTOM = autoware_overlay_msgs::msg::OverlayText::BOTTOM,
};

enum class HorizontalAlignment : uint8_t {
LEFT = rviz_2d_overlay_msgs::msg::OverlayText::LEFT,
RIGHT = rviz_2d_overlay_msgs::msg::OverlayText::RIGHT,
CENTER = rviz_2d_overlay_msgs::msg::OverlayText::CENTER
LEFT = autoware_overlay_msgs::msg::OverlayText::LEFT,
RIGHT = autoware_overlay_msgs::msg::OverlayText::RIGHT,
CENTER = autoware_overlay_msgs::msg::OverlayText::CENTER
};

/**
Expand Down Expand Up @@ -136,6 +136,6 @@ class OverlayObject
Ogre::MaterialPtr panel_material_;
Ogre::TexturePtr texture_;
};
} // namespace awf_2d_overlay_vehicle
} // namespace autoware_overlay_rviz_plugin

#endif // OVERLAY_UTILS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <mutex>
#endif

namespace awf_2d_overlay_vehicle
namespace autoware_overlay_rviz_plugin
{
class SignalDisplay : public rviz_common::Display
{
Expand Down Expand Up @@ -70,7 +70,7 @@ private Q_SLOTS:

private:
std::mutex mutex_;
awf_2d_overlay_vehicle::OverlayObject::SharedPtr overlay_;
autoware_overlay_rviz_plugin::OverlayObject::SharedPtr overlay_;
rviz_common::properties::IntProperty * property_width_;
rviz_common::properties::IntProperty * property_height_;
rviz_common::properties::IntProperty * property_left_;
Expand All @@ -84,7 +84,8 @@ private Q_SLOTS:
std::unique_ptr<rviz_common::properties::RosTopicProperty> traffic_topic_property_;
std::unique_ptr<rviz_common::properties::RosTopicProperty> speed_limit_topic_property_;

void drawBackground(QPainter & painter, const QRectF & backgroundRect);
void drawHorizontalRoundedRectangle(QPainter & painter, const QRectF & backgroundRect);
void drawVerticalRoundedRectangle(QPainter & painter, const QRectF & backgroundRect);
void setupRosSubscriptions();

std::unique_ptr<SteeringWheelDisplay> steering_wheel_display_;
Expand Down Expand Up @@ -119,6 +120,6 @@ private Q_SLOTS:
const autoware_perception_msgs::msg::TrafficSignalArray::ConstSharedPtr msg);
void drawWidget(QImage & hud);
};
} // namespace awf_2d_overlay_vehicle
} // namespace autoware_overlay_rviz_plugin

#endif // SIGNAL_DISPLAY_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <OgreMaterial.h>
#include <OgreTexture.h>

namespace awf_2d_overlay_vehicle
namespace autoware_overlay_rviz_plugin
{

class SpeedDisplay
Expand All @@ -44,6 +44,6 @@ class SpeedDisplay
QColor gray = QColor(194, 194, 194);
};

} // namespace awf_2d_overlay_vehicle
} // namespace autoware_overlay_rviz_plugin

#endif // SPEED_DISPLAY_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
#include <rviz_common/properties/int_property.hpp>
#include <rviz_common/ros_topic_display.hpp>

#include "autoware_auto_vehicle_msgs/msg/velocity_report.hpp"
#include <tier4_planning_msgs/msg/velocity_limit.hpp>

#include <OgreColourValue.h>
#include <OgreMaterial.h>
#include <OgreTexture.h>

namespace awf_2d_overlay_vehicle
namespace autoware_overlay_rviz_plugin
{

class SpeedLimitDisplay
Expand All @@ -38,12 +39,14 @@ class SpeedLimitDisplay
SpeedLimitDisplay();
void drawSpeedLimitIndicator(QPainter & painter, const QRectF & backgroundRect);
void updateSpeedLimitData(const tier4_planning_msgs::msg::VelocityLimit::ConstSharedPtr msg);
void updateSpeedData(const autoware_auto_vehicle_msgs::msg::VelocityReport::ConstSharedPtr & msg);

private:
float current_limit; // Internal variable to store current gear
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 awf_2d_overlay_vehicle
} // namespace autoware_overlay_rviz_plugin

#endif // SPEED_LIMIT_DISPLAY_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <OgreMaterial.h>
#include <OgreTexture.h>

namespace awf_2d_overlay_vehicle
namespace autoware_overlay_rviz_plugin
{

class SteeringWheelDisplay
Expand All @@ -49,6 +49,6 @@ class SteeringWheelDisplay
QImage coloredImage(const QImage & source, const QColor & color);
};

} // namespace awf_2d_overlay_vehicle
} // namespace autoware_overlay_rviz_plugin

#endif // STEERING_WHEEL_DISPLAY_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <OgreMaterial.h>
#include <OgreTexture.h>

namespace awf_2d_overlay_vehicle
namespace autoware_overlay_rviz_plugin
{

class TrafficDisplay
Expand All @@ -45,18 +45,15 @@ class TrafficDisplay

private:
QImage traffic_light_image_;
// yellow #CFC353
QColor yellow = QColor(207, 195, 83);
// red #CF5353
QColor red = QColor(207, 83, 83);
// green #53CF5F
QColor green = QColor(83, 207, 95);
// gray #C2C2C2
QColor gray = QColor(194, 194, 194);

const QColor tl_red_;
const QColor tl_yellow_;
const QColor tl_green_;
const QColor tl_gray_;

QImage coloredImage(const QImage & source, const QColor & color);
};

} // namespace awf_2d_overlay_vehicle
} // namespace autoware_overlay_rviz_plugin

#endif // TRAFFIC_DISPLAY_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include <chrono>

namespace awf_2d_overlay_vehicle
namespace autoware_overlay_rviz_plugin
{

class TurnSignalsDisplay
Expand All @@ -47,7 +47,7 @@ class TurnSignalsDisplay

private:
QImage arrowImage;
QColor gray = QColor(194, 194, 194);
QColor gray = QColor(46, 46, 46);

int current_turn_signal_; // Internal variable to store turn signal state
int current_hazard_lights_; // Internal variable to store hazard lights state
Expand All @@ -58,6 +58,6 @@ class TurnSignalsDisplay
const std::chrono::milliseconds blink_interval_{500}; // Blink interval in milliseconds
};

} // namespace awf_2d_overlay_vehicle
} // namespace autoware_overlay_rviz_plugin

#endif // TURN_SIGNALS_DISPLAY_HPP_
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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>awf_2d_overlay_vehicle</name>
<name>autoware_overlay_rviz_plugin</name>
<version>0.0.1</version>
<description>
RViz2 plugin for 2D overlays in the 3D view. Mainly a port of the JSK overlay plugin
Expand All @@ -12,9 +12,9 @@
<license>BSD-3-Clause</license>

<depend>autoware_auto_vehicle_msgs</depend>
<depend>autoware_overlay_msgs</depend>
<depend>autoware_perception_msgs</depend>
<depend>boost</depend>
<depend>rviz_2d_overlay_msgs</depend>
<depend>rviz_common</depend>
<depend>rviz_ogre_vendor</depend>
<depend>rviz_rendering</depend>
Expand Down
Loading

0 comments on commit 94e5f48

Please sign in to comment.