Skip to content

Commit

Permalink
Merge branch 'main' into refactor/pointcloud_preprocessor-namespace-p…
Browse files Browse the repository at this point in the history
…refix
  • Loading branch information
amadeuszsz committed Jul 22, 2024
2 parents da811d1 + 56166bb commit 01b39e7
Show file tree
Hide file tree
Showing 117 changed files with 519 additions and 452 deletions.
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ map/map_projection_loader/** [email protected] [email protected] mas
map/map_tf_generator/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
map/util/lanelet2_map_preprocessor/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
perception/autoware_crosswalk_traffic_light_estimator/** [email protected] [email protected] [email protected]
perception/autoware_lidar_transfusion/** [email protected] [email protected] [email protected]
perception/autoware_map_based_prediction/** [email protected] [email protected] [email protected] [email protected] [email protected]
perception/autoware_multi_object_tracker/** [email protected] [email protected] [email protected]
perception/autoware_object_merger/** [email protected] [email protected] [email protected]
perception/autoware_object_range_splitter/** [email protected] [email protected]
perception/autoware_object_velocity_splitter/** [email protected] [email protected] [email protected]
Expand All @@ -121,22 +123,20 @@ perception/detected_object_feature_remover/** [email protected]
perception/detected_object_validation/** [email protected] [email protected] [email protected] [email protected] [email protected]
perception/autoware_detection_by_tracker/** [email protected] [email protected] [email protected]
perception/elevation_map_loader/** [email protected] [email protected] [email protected]
perception/euclidean_cluster/** [email protected] [email protected]
perception/eucliautoware_euclidean_clusterdean_cluster/** [email protected] [email protected]
perception/ground_segmentation/** [email protected] [email protected] [email protected] [email protected] [email protected]
perception/image_projection_based_fusion/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
perception/lidar_apollo_instance_segmentation/** [email protected] [email protected]
perception/lidar_apollo_segmentation_tvm/** [email protected] [email protected]
perception/lidar_apollo_segmentation_tvm_nodes/** [email protected] [email protected]
perception/lidar_centerpoint/** [email protected] [email protected]
perception/lidar_transfusion/** [email protected] [email protected] [email protected]
perception/autoware_multi_object_tracker/** [email protected] [email protected] [email protected]
perception/occupancy_grid_map_outlier_filter/** [email protected] [email protected] [email protected]
perception/probabilistic_occupancy_grid_map/** [email protected] [email protected] [email protected]
perception/radar_tracks_msgs_converter/** [email protected] [email protected] [email protected] [email protected]
perception/autoware_raindrop_cluster_filter/** [email protected] [email protected] [email protected]
perception/shape_estimation/** [email protected] [email protected]
perception/simple_object_merger/** [email protected] [email protected] [email protected]
perception/tensorrt_classifier/** [email protected] [email protected]
perception/autoware_tensorrt_classifier/** [email protected] [email protected]
perception/tensorrt_yolox/** [email protected] [email protected]
perception/traffic_light_arbiter/** [email protected] [email protected]
perception/traffic_light_classifier/** [email protected] [email protected] [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,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 +117,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 @@ -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 @@ -112,9 +112,10 @@ void SignalDisplay::onInitialize()
speed_limit_topic_property_->initialize(rviz_ros_node);

traffic_topic_property_ = std::make_unique<rviz_common::properties::RosTopicProperty>(
"Traffic Topic", "/perception/traffic_light_recognition/traffic_signals",
"autoware_perception_msgs/msgs/msg/TrafficLightGroupArray", "Topic for Traffic Light Data",
this, SLOT(topic_updated_traffic()));
"Traffic Topic",
"/planning/scenario_planning/lane_driving/behavior_planning/debug/traffic_signal",
"autoware_perception_msgs/msgs/msg/TrafficLightGroup", "Topic for Traffic Light Data", this,
SLOT(topic_updated_traffic()));
traffic_topic_property_->initialize(rviz_ros_node);
}

Expand Down Expand Up @@ -192,7 +193,7 @@ void SignalDisplay::onDisable()
}

void SignalDisplay::updateTrafficLightData(
const autoware_perception_msgs::msg::TrafficLightGroupArray::ConstSharedPtr msg)
const autoware_perception_msgs::msg::TrafficLightGroup::ConstSharedPtr msg)
{
std::lock_guard<std::mutex> lock(property_mutex_);

Expand Down Expand Up @@ -458,14 +459,13 @@ void SignalDisplay::topic_updated_traffic()
// resubscribe to the topic
traffic_sub_.reset();
auto rviz_ros_node = context_->getRosNodeAbstraction().lock();
traffic_sub_ =
rviz_ros_node->get_raw_node()
->create_subscription<autoware_perception_msgs::msg::TrafficLightGroupArray>(
traffic_topic_property_->getTopicStd(),
rclcpp::QoS(rclcpp::KeepLast(10)).durability_volatile().reliable(),
[this](const autoware_perception_msgs::msg::TrafficLightGroupArray::SharedPtr msg) {
updateTrafficLightData(msg);
});
traffic_sub_ = rviz_ros_node->get_raw_node()
->create_subscription<autoware_perception_msgs::msg::TrafficLightGroup>(
traffic_topic_property_->getTopicStd(),
rclcpp::QoS(rclcpp::KeepLast(10)).durability_volatile().reliable(),
[this](const autoware_perception_msgs::msg::TrafficLightGroup::SharedPtr msg) {
updateTrafficLightData(msg);
});
}

} // namespace autoware_overlay_rviz_plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ TrafficDisplay::TrafficDisplay()
}

void TrafficDisplay::updateTrafficLightData(
const autoware_perception_msgs::msg::TrafficLightGroupArray::ConstSharedPtr & msg)
const autoware_perception_msgs::msg::TrafficLightGroup::ConstSharedPtr & msg)
{
current_traffic_ = *msg;
}
Expand All @@ -68,8 +68,8 @@ void TrafficDisplay::drawTrafficLightIndicator(QPainter & painter, const QRectF
backgroundRect.top() + circleRect.height() / 2));
painter.drawEllipse(circleRect);

if (!current_traffic_.traffic_light_groups.empty()) {
switch (current_traffic_.traffic_light_groups[0].elements[0].color) {
if (!current_traffic_.elements.empty()) {
switch (current_traffic_.elements[0].color) {
case 1:
painter.setBrush(QBrush(tl_red_));
painter.drawEllipse(circleRect);
Expand Down
4 changes: 4 additions & 0 deletions control/autoware_vehicle_cmd_gate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ The limitation values are calculated based on the 1D interpolation of the limita

Notation: this filter is not designed to enhance ride comfort. Its main purpose is to detect and remove abnormal values in the control outputs during the final stages of Autoware. If this filter is frequently active, it implies the control module may need tuning. If you're aiming to smoothen the signal via a low-pass filter or similar techniques, that should be handled in the control module. When the filter is activated, the topic `~/is_filter_activated` is published.

Notation 2: If you use vehicles in which the driving force is controlled by the accelerator/brake pedal, the jerk limit, denoting the pedal rate limit, must be sufficiently relaxed at low speeds.
Otherwise, quick pedal changes at start/stop will not be possible, resulting in slow starts and creep down on hills.
This functionality for starting/stopping was embedded in the source code but was removed because it was complex and could be achieved by parameters.

## Assumptions / Known limits

The parameter `check_external_emergency_heartbeat` (true by default) enables an emergency stop request from external modules.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
stop_check_duration: 1.0
nominal:
vel_lim: 25.0
reference_speed_points: [20.0, 30.0]
steer_lim: [1.0, 0.8]
steer_rate_lim: [1.0, 0.8]
lon_acc_lim: [5.0, 4.0]
lon_jerk_lim: [5.0, 4.0]
lat_acc_lim: [5.0, 4.0]
lat_jerk_lim: [7.0, 6.0]
actual_steer_diff_lim: [1.0, 0.8]
reference_speed_points: [0.1, 0.3, 20.0, 30.0]
steer_lim: [1.0, 1.0, 1.0, 0.8]
steer_rate_lim: [1.0, 1.0, 1.0, 0.8]
lon_acc_lim: [5.0, 5.0, 5.0, 4.0]
lon_jerk_lim: [80.0, 5.0, 5.0, 4.0] # The first element is required for quick pedal changes when stopping and starting.
lat_acc_lim: [5.0, 5.0, 5.0, 4.0]
lat_jerk_lim: [7.0, 7.0, 7.0, 6.0]
actual_steer_diff_lim: [1.0, 1.0, 1.0, 0.8]
on_transition:
vel_lim: 50.0
reference_speed_points: [20.0, 30.0]
Expand Down
18 changes: 0 additions & 18 deletions control/autoware_vehicle_cmd_gate/src/vehicle_cmd_gate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,6 @@ Control VehicleCmdGate::filterControlCommand(const Control & in)
const auto mode = current_operation_mode_;
const auto current_status_cmd = getActualStatusAsCommand();
const auto ego_is_stopped = vehicle_stop_checker_->isVehicleStopped(stop_check_duration_);
const auto input_cmd_is_stopping = in.longitudinal.acceleration < 0.0;

filter_.setCurrentSpeed(current_kinematics_.twist.twist.linear.x);
filter_on_transition_.setCurrentSpeed(current_kinematics_.twist.twist.linear.x);
Expand All @@ -618,23 +617,6 @@ Control VehicleCmdGate::filterControlCommand(const Control & in)
if (mode.is_in_transition) {
filter_on_transition_.filterAll(dt, current_steer_, out, is_filter_activated);
} else {
// When ego is stopped and the input command is not stopping,
// use the higher of actual vehicle longitudinal state
// and previous longitudinal command for the filtering
// this is to prevent the jerk limits being applied and causing
// a delay when restarting the vehicle.

if (ego_is_stopped && !input_cmd_is_stopping) {
auto prev_cmd = filter_.getPrevCmd();
prev_cmd.longitudinal.acceleration =
std::max(prev_cmd.longitudinal.acceleration, current_status_cmd.longitudinal.acceleration);
// consider reverse driving
prev_cmd.longitudinal.velocity = std::fabs(prev_cmd.longitudinal.velocity) >
std::fabs(current_status_cmd.longitudinal.velocity)
? prev_cmd.longitudinal.velocity
: current_status_cmd.longitudinal.velocity;
filter_.setPrevCmd(prev_cmd);
}
filter_.filterAll(dt, current_steer_, out, is_filter_activated);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<let name="euclidean_cluster_input" value="/perception/object_recognition/detection/segmentation_based_filtered/pointcloud" if="$(var use_image_segmentation_based_filter)"/>
<let name="euclidean_cluster_output" value="euclidean_cluster/clusters" if="$(var use_roi_based_cluster)"/>
<let name="euclidean_cluster_output" value="clusters" unless="$(var use_roi_based_cluster)"/>
<include file="$(find-pkg-share euclidean_cluster)/launch/voxel_grid_based_euclidean_cluster.launch.xml">
<include file="$(find-pkg-share autoware_euclidean_cluster)/launch/voxel_grid_based_euclidean_cluster.launch.xml">
<arg name="input_pointcloud" value="$(var euclidean_cluster_input)"/>
<arg name="output_clusters" value="$(var euclidean_cluster_output)"/>
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<!-- TransFusion -->
<group if="$(eval &quot;'$(var lidar_detection_model)'=='transfusion'&quot;)">
<push-ros-namespace namespace="transfusion"/>
<arg name="lidar_model_param_path" default="$(find-pkg-share lidar_transfusion)/config"/>
<arg name="lidar_model_param_path" default="$(find-pkg-share autoware_lidar_transfusion)/config"/>

<group>
<include file="$(find-pkg-share lidar_transfusion)/launch/lidar_transfusion.launch.xml">
<include file="$(find-pkg-share autoware_lidar_transfusion)/launch/lidar_transfusion.launch.xml">
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
<arg name="output/objects" value="$(var output/objects)"/>
<arg name="model_name" value="$(var transfusion_model_name)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<group>
<push-ros-namespace namespace="clustering"/>
<group>
<include file="$(find-pkg-share euclidean_cluster)/launch/voxel_grid_based_euclidean_cluster.launch.xml">
<include file="$(find-pkg-share autoware_euclidean_cluster)/launch/voxel_grid_based_euclidean_cluster.launch.xml">
<arg name="input_pointcloud" value="$(var input/pointcloud_map/pointcloud)"/>
<arg name="output_clusters" value="clusters"/>
<arg name="use_low_height_cropbox" value="$(var use_low_height_cropbox)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def create_parameter_dict(*args):
composable_node_descriptions=[
ComposableNode(
package="traffic_light_classifier",
plugin="traffic_light::TrafficLightClassifierNodelet",
plugin="autoware::traffic_light::TrafficLightClassifierNodelet",
name="car_traffic_light_classifier",
namespace="classification",
parameters=[car_traffic_light_classifier_model_param],
Expand All @@ -71,7 +71,7 @@ def create_parameter_dict(*args):
),
ComposableNode(
package="traffic_light_classifier",
plugin="traffic_light::TrafficLightClassifierNodelet",
plugin="autoware::traffic_light::TrafficLightClassifierNodelet",
name="pedestrian_traffic_light_classifier",
namespace="classification",
parameters=[pedestrian_traffic_light_classifier_model_param],
Expand Down
2 changes: 1 addition & 1 deletion launch/tier4_perception_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<exec_depend>autoware_cluster_merger</exec_depend>
<exec_depend>autoware_crosswalk_traffic_light_estimator</exec_depend>
<exec_depend>autoware_detection_by_tracker</exec_depend>
<exec_depend>autoware_euclidean_cluster</exec_depend>
<exec_depend>autoware_map_based_prediction</exec_depend>
<exec_depend>autoware_multi_object_tracker</exec_depend>
<exec_depend>autoware_object_merger</exec_depend>
Expand All @@ -32,7 +33,6 @@
<exec_depend>detected_object_feature_remover</exec_depend>
<exec_depend>detected_object_validation</exec_depend>
<exec_depend>elevation_map_loader</exec_depend>
<exec_depend>euclidean_cluster</exec_depend>
<exec_depend>ground_segmentation</exec_depend>
<exec_depend>image_projection_based_fusion</exec_depend>
<exec_depend>image_transport_decompressor</exec_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class PoseCovarianceModifierNode : public rclcpp::Node
rclcpp::Publisher<std_msgs::msg::Float64>::SharedPtr pub_double_gnss_position_stddev_;

void callback_gnss_pose_with_cov(
const geometry_msgs::msg::PoseWithCovarianceStamped::ConstSharedPtr & msg);
const geometry_msgs::msg::PoseWithCovarianceStamped::ConstSharedPtr & msg_pose_with_cov_in);

void callback_ndt_pose_with_cov(
const geometry_msgs::msg::PoseWithCovarianceStamped::ConstSharedPtr & msg_pose_with_cov_in);
Expand Down
2 changes: 1 addition & 1 deletion perception/autoware_detection_by_tracker/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<buildtool_depend>autoware_cmake</buildtool_depend>
<buildtool_depend>eigen3_cmake_module</buildtool_depend>

<depend>autoware_euclidean_cluster</depend>
<depend>autoware_universe_utils</depend>
<depend>eigen</depend>
<depend>euclidean_cluster</depend>
<depend>object_recognition_utils</depend>
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(euclidean_cluster)
project(autoware_euclidean_cluster)

find_package(autoware_cmake REQUIRED)
autoware_package()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# euclidean_cluster
# autoware_euclidean_cluster

## Purpose

euclidean_cluster is a package for clustering points into smaller parts to classify objects.
autoware_euclidean_cluster is a package for clustering points into smaller parts to classify objects.

This package has two clustering methods: `euclidean_cluster` and `voxel_grid_based_euclidean_cluster`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def load_composable_node_param(param_path):
return yaml.safe_load(f)["/**"]["ros__parameters"]

ns = ""
pkg = "euclidean_cluster"
pkg = "autoware_euclidean_cluster"

low_height_cropbox_filter_component = ComposableNode(
package="autoware_pointcloud_preprocessor",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<arg name="input_map" default="/map/pointcloud_map"/>
<arg name="output_clusters" default="clusters"/>
<arg name="use_low_height_cropbox" default="false"/>
<arg name="euclidean_param_path" default="$(find-pkg-share euclidean_cluster)/config/euclidean_cluster.param.yaml"/>
<arg name="euclidean_param_path" default="$(find-pkg-share autoware_euclidean_cluster)/config/euclidean_cluster.param.yaml"/>
<arg name="use_pointcloud_container" default="false"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>

<include file="$(find-pkg-share euclidean_cluster)/launch/euclidean_cluster.launch.py">
<include file="$(find-pkg-share autoware_euclidean_cluster)/launch/euclidean_cluster.launch.py">
<arg name="input_points_raw_list" value="$(var input_pointcloud)"/>
<arg name="input_map" value="$(var input_map)"/>
<arg name="output_clusters" value="$(var output_clusters)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def load_composable_node_param(param_path):
return yaml.safe_load(f)["/**"]["ros__parameters"]

ns = ""
pkg = "euclidean_cluster"
pkg = "autoware_euclidean_cluster"

low_height_cropbox_filter_component = ComposableNode(
package="autoware_pointcloud_preprocessor",
Expand Down
Loading

0 comments on commit 01b39e7

Please sign in to comment.