Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sync upstream #254

Merged
merged 60 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
90b8617
fix(behavior_path_planner): revise some content about avoidance in .m…
shulanbushangshu Jan 22, 2023
e64860a
feat(obstacle_stop_planner): improve chattering prevention mechanism …
satoshi-ota Jan 23, 2023
38992f0
refactor(ekf_localizer): use tier4_autoware_utils to simplify syntax …
IshitaTakeshi Jan 23, 2023
4e55492
chore(route_handler, rtc_interface, rtc_auto_mode_manager): add maint…
rej55 Jan 23, 2023
2a5bdbb
chore(operation_mode_transition_manager): add maintainer (#2713)
TakaHoribe Jan 23, 2023
97b6758
chore(vehicle_cmd_gate): add maintainer (#2716)
tkimura4 Jan 23, 2023
0f3bfb7
chore: update CODEOWNERS (#2600)
awf-autoware-bot[bot] Jan 23, 2023
5657467
docs(operation_mode_transition_manager): update readme (#2606)
TakaHoribe Jan 23, 2023
7451eb1
refactor(vehicle_cmd_gate): using namespace, etc (#2627)
TakaHoribe Jan 23, 2023
a9c7dc2
feat(behavior_path_planner): external request lane change (#2442)
rej55 Jan 23, 2023
c43e89d
refactor(trajectory_follower_base): use shorter namespace expression …
TakaHoribe Jan 23, 2023
bc370f2
feat(obstacle_avoidance_planner): check footprint with boost::geometr…
beyzanurkaya Jan 23, 2023
b7b0188
refactor(ekf_localizer): add a function to convert quaternion to eule…
IshitaTakeshi Jan 24, 2023
11ce12b
refactor(ekf_localizer): add a class to manage queue elements with th…
IshitaTakeshi Jan 24, 2023
4c9d247
refactor(ekf_localizer): replace the mahalanobisGate function with a …
IshitaTakeshi Jan 24, 2023
a840404
feat(behavior_path_planner): visualize pull_over planner type text (#…
kosuke55 Jan 24, 2023
60d76c1
refactor: ego's position source change from tf to topic in planning/c…
kyoichi-sugahara Jan 24, 2023
5088e8e
fix(motion_utils/path_shifter): modify the sampling method (#2658)
zulfaqar-azmi-t4 Jan 24, 2023
0443b68
fix(behavior_path_planner): lane change interpolated obj orientation …
zulfaqar-azmi-t4 Jan 24, 2023
43a80d5
refactor(behavior_path_planner): set occupancy grid map topic name fr…
kosuke55 Jan 24, 2023
7d26232
fix(behavior_path_planner): reduce obj indices call in lane change (#…
zulfaqar-azmi-t4 Jan 24, 2023
663cc03
feat(behavior_path_planner): enable lane change in intersection (#2720)
rej55 Jan 24, 2023
36c4b10
refactor(ekf_localizer): add a function to generate a delay time warn…
IshitaTakeshi Jan 24, 2023
403713d
fix(behavior_path_planner): make lane change safety check adaptive (#…
zulfaqar-azmi-t4 Jan 24, 2023
dd022c4
feat(lane_departure_checker): add braking distance offset to avoid un…
brkay54 Jan 24, 2023
66f8342
feat(intersection): consider state transit margin time in collision d…
soblin Jan 24, 2023
95b9ff6
build(kalman_filter): add build dependency (#2734)
esteve Jan 24, 2023
8f02501
build(dummy_infrastructure): add build dependency (#2739)
esteve Jan 24, 2023
ea2b32b
fix(lane_change): chattering issue when performing check (#2741)
zulfaqar-azmi-t4 Jan 25, 2023
c1a98f7
refactor(motion_utils): delete wall marker explicitly (#2506)
kyoichi-sugahara Jan 25, 2023
74594a6
fix(obstacle_avoidance_planner): fix offset signs for footprint corne…
mehmetdogru Jan 25, 2023
2d98ee8
feat(obstacle_avoidance_planner): add a separate marker for the first…
mehmetdogru Jan 25, 2023
2edacb6
fix(obstacle_avoidance_planner): fix drivable area polygon point orde…
mehmetdogru Jan 25, 2023
854bff7
build(bluetooth_monitor): add build dependency (#2738)
esteve Jan 25, 2023
5a2704a
build(system_monitor): add build dependency (#2740)
esteve Jan 25, 2023
b81fc59
test(gyro_odometer): add test (#2743)
kminoda Jan 26, 2023
7ac518f
fix(costmap_generator): fix invalid argument order (#2751)
VRichardJP Jan 26, 2023
23ad8eb
fix(lane_change): fix bug when target reference path is empty (#2752)
tkimura4 Jan 26, 2023
deb4c41
refactor(tier4_map_launch): remove unused config (#2722)
kminoda Jan 26, 2023
379456b
build(gnss_poser): add build dependency (#2737)
esteve Jan 26, 2023
3523270
fix(lane_change): set constructCandidatePath logger as debug (#2731)
zulfaqar-azmi-t4 Jan 27, 2023
7b16fb8
chore(control_launch): add maintainer (#2758)
TakaHoribe Jan 27, 2023
0911600
feat(intersection): add param for stuck stopline overshoot margin (#2…
soblin Jan 27, 2023
0717cd4
fix(motion_utils): fixed virtual wall marker to appear (#2757)
soblin Jan 27, 2023
1f62b91
fix(euclidean_cluster): keep pointcloud resolution in long-range for …
badai-nguyen Jan 27, 2023
642f172
fix(raw_vehicle_cmd_converter): remove external command converter val…
taikitanaka3 Jan 27, 2023
d5a627e
chore(intersection): remove unnecessary marker (#2760)
soblin Jan 27, 2023
2d8c4f5
feat(longitudinal_controller): add feedforward conversion to arc coor…
TakaHoribe Jan 27, 2023
d3e5714
chore: update CODEOWNERS (#2763)
awf-autoware-bot[bot] Jan 27, 2023
594b248
fix(mpc_lateral_controller): fix inconsistent argument order (#2750)
VRichardJP Jan 27, 2023
75ae084
feat(longitudinal_controller): skip integral in manual mode (#2619)
TakaHoribe Jan 27, 2023
7da9114
feat(mpc_lateral_controller): add control input bias removal (#2730)
TakaHoribe Jan 27, 2023
28f6c1f
fix(behavior_path_planner): support the goal behind ego in pull out (…
kosuke55 Jan 27, 2023
45079b5
fix(costmap_generator): wait for lanelet map (#2765)
kosuke55 Jan 27, 2023
743bcf8
chore(costmap_generator): add maintainers (#2766)
kosuke55 Jan 27, 2023
8c7b2c1
build(detected_object_validation): add build dependency (#2735)
esteve Jan 27, 2023
3d69611
build(autoware_auto_perception_rviz_plugin): add build dependency (#2…
esteve Jan 27, 2023
097228f
chore: update CODEOWNERS (#2768)
awf-autoware-bot[bot] Jan 28, 2023
bac20ee
feat(accel_map_calibrator): publish estimated covariance (#2551)
td12321 Jan 28, 2023
245242c
refactor(accel_brake_map_calibrator): minor refactors (#2771)
TakaHoribe Jan 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,24 @@ common/tier4_traffic_light_rviz_plugin/** satoshi.ota@tier4.jp @autowarefoundati
common/tier4_vehicle_rviz_plugin/** yukihiro.saito@tier4.jp @autowarefoundation/autoware-global-codeowners
common/time_utils/** christopherj.ho@gmail.com @autowarefoundation/autoware-global-codeowners
common/trtexec_vendor/** daisuke.nishimatsu@tier4.jp @autowarefoundation/autoware-global-codeowners
common/tvm_utility/** ambroise.vincent@arm.com @autowarefoundation/autoware-global-codeowners
common/tvm_utility/** ambroise.vincent@arm.com xinyu.wang@tier4.jp @autowarefoundation/autoware-global-codeowners
control/control_performance_analysis/** ali.boyali@tier4.jp berkay@leodrive.ai @autowarefoundation/autoware-global-codeowners
control/external_cmd_selector/** kenji.miyake@tier4.jp @autowarefoundation/autoware-global-codeowners
control/joy_controller/** kenji.miyake@tier4.jp @autowarefoundation/autoware-global-codeowners
control/lane_departure_checker/** kyoichi.sugahara@tier4.jp @autowarefoundation/autoware-global-codeowners
control/mpc_lateral_controller/** takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp @autowarefoundation/autoware-global-codeowners
control/obstacle_collision_checker/** kenji.miyake@tier4.jp @autowarefoundation/autoware-global-codeowners
control/operation_mode_transition_manager/** takamasa.horibe@tier4.jp @autowarefoundation/autoware-global-codeowners
control/operation_mode_transition_manager/** takamasa.horibe@tier4.jp tomoya.kimura@tier4.jp @autowarefoundation/autoware-global-codeowners
control/pid_longitudinal_controller/** takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp @autowarefoundation/autoware-global-codeowners
control/pure_pursuit/** takamasa.horibe@tier4.jp @autowarefoundation/autoware-global-codeowners
control/shift_decider/** takamasa.horibe@tier4.jp @autowarefoundation/autoware-global-codeowners
control/trajectory_follower_base/** takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp @autowarefoundation/autoware-global-codeowners
control/trajectory_follower_node/** takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp @autowarefoundation/autoware-global-codeowners
control/vehicle_cmd_gate/** takamasa.horibe@tier4.jp @autowarefoundation/autoware-global-codeowners
control/vehicle_cmd_gate/** takamasa.horibe@tier4.jp tomoya.kimura@tier4.jp @autowarefoundation/autoware-global-codeowners
evaluator/kinematic_evaluator/** dominik.jargot@robotec.ai @autowarefoundation/autoware-global-codeowners
evaluator/localization_evaluator/** dominik.jargot@robotec.ai @autowarefoundation/autoware-global-codeowners
launch/tier4_autoware_api_launch/** isamu.takagi@tier4.jp kahhooi.tan@tier4.jp kenji.miyake@tier4.jp makoto.yabuta@tier4.jp ryohsuke.mitsudome@tier4.jp @autowarefoundation/autoware-global-codeowners
launch/tier4_control_launch/** takamasa.horibe@tier4.jp @autowarefoundation/autoware-global-codeowners
launch/tier4_control_launch/** takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp @autowarefoundation/autoware-global-codeowners
launch/tier4_localization_launch/** yamato.ando@tier4.jp @autowarefoundation/autoware-global-codeowners
launch/tier4_map_launch/** koji.minoda@tier4.jp ryohsuke.mitsudome@tier4.jp ryu.yamamoto@tier4.jp @autowarefoundation/autoware-global-codeowners
launch/tier4_perception_launch/** shunsuke.miura@tier4.jp yukihiro.saito@tier4.jp @autowarefoundation/autoware-global-codeowners
Expand Down Expand Up @@ -115,7 +115,7 @@ perception/traffic_light_ssd_fine_detector/** daisuke.nishimatsu@tier4.jp @autow
perception/traffic_light_visualization/** yukihiro.saito@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/behavior_path_planner/** fumiya.watanabe@tier4.jp kosuke.takeuchi@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp yutaka.shimizu@tier4.jp zulfaqar.azmi@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/behavior_velocity_planner/** kosuke.takeuchi@tier4.jp kyoichi.sugahara@tier4.jp makoto.kurihara@tier4.jp mamoru.sobue@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp takayuki.murooka@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp yutaka.shimizu@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/costmap_generator/** kenji.miyake@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/costmap_generator/** kosuke.takeuchi@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp yutaka.shimizu@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/external_velocity_limit_selector/** satoshi.ota@tier4.jp shinnosuke.hirakawa@tier4.jp shumpei.wakabayashi@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/freespace_planner/** takamasa.horibe@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/freespace_planning_algorithms/** takamasa.horibe@tier4.jp @autowarefoundation/autoware-global-codeowners
Expand All @@ -128,12 +128,13 @@ planning/obstacle_velocity_limiter/** maxime.clement@tier4.jp @autowarefoundatio
planning/planning_debug_tools/** taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/planning_error_monitor/** yutaka.shimizu@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/planning_evaluator/** maxime.clement@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/route_handler/** fumiya.watanabe@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/rtc_auto_mode_manager/** fumiya.watanabe@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/rtc_interface/** fumiya.watanabe@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/planning_validator/** takamasa.horibe@tier4.jp yutaka.shimizu@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/route_handler/** fumiya.watanabe@tier4.jp kosuke.takeuchi@tier4.jp yutaka.shimizu@tier4.jp zulfaqar.azmi@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/rtc_auto_mode_manager/** fumiya.watanabe@tier4.jp taiki.tanaka@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/rtc_interface/** fumiya.watanabe@tier4.jp taiki.tanaka@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/rtc_replayer/** fumiya.watanabe@tier4.jp taiki.tanaka@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/scenario_selector/** kenji.miyake@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/static_centerline_optimizer/** takayuki.murooka@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/static_centerline_optimizer/** kosuke.takeuchi@tier4.jp takayuki.murooka@tier4.jp @autowarefoundation/autoware-global-codeowners
planning/surround_obstacle_checker/** satoshi.ota@tier4.jp @autowarefoundation/autoware-global-codeowners
sensing/geo_pos_conv/** yamato.ando@tier4.jp @autowarefoundation/autoware-global-codeowners
sensing/gnss_poser/** yamato.ando@tier4.jp @autowarefoundation/autoware-global-codeowners
Expand Down Expand Up @@ -166,7 +167,7 @@ system/system_monitor/** akihiro.sakurai@tier4.jp fumihito.ito@tier4.jp @autowar
system/topic_state_monitor/** kenji.miyake@tier4.jp @autowarefoundation/autoware-global-codeowners
system/velodyne_monitor/** fumihito.ito@tier4.jp @autowarefoundation/autoware-global-codeowners
tools/simulator_test/simulator_compatibility_test/** shpark@morai.ai @autowarefoundation/autoware-global-codeowners
vehicle/accel_brake_map_calibrator/accel_brake_map_calibrator/** tomoya.kimura@tier4.jp @autowarefoundation/autoware-global-codeowners
vehicle/accel_brake_map_calibrator/accel_brake_map_calibrator/** taiki.tanaka@tier4.jp takeshi.miura@tier4.jp tomoya.kimura@tier4.jp @autowarefoundation/autoware-global-codeowners
vehicle/external_cmd_converter/** takamasa.horibe@tier4.jp @autowarefoundation/autoware-global-codeowners
vehicle/raw_vehicle_cmd_converter/** makoto.kurihara@tier4.jp taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp @autowarefoundation/autoware-global-codeowners
vehicle/steer_offset_estimator/** taiki.tanaka@tier4.jp @autowarefoundation/autoware-global-codeowners
Expand Down
1 change: 1 addition & 0 deletions common/autoware_auto_perception_rviz_plugin/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<buildtool_depend>ament_cmake</buildtool_depend>

<build_depend>autoware_cmake</build_depend>
<build_depend>libboost-dev</build_depend>
<build_depend>qtbase5-dev</build_depend>

<depend>autoware_auto_perception_msgs</depend>
Expand Down
2 changes: 2 additions & 0 deletions common/kalman_filter/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<buildtool_depend>ament_cmake_auto</buildtool_depend>

<build_depend>autoware_cmake</build_depend>
<build_depend>eigen</build_depend>
<build_depend>eigen3_cmake_module</build_depend>

<test_depend>ament_cmake_cppcheck</test_depend>
<test_depend>ament_lint_auto</test_depend>
Expand Down
57 changes: 51 additions & 6 deletions common/motion_utils/include/motion_utils/marker/marker_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,28 @@
#ifndef MOTION_UTILS__MARKER__MARKER_HELPER_HPP_
#define MOTION_UTILS__MARKER__MARKER_HELPER_HPP_

#include "motion_utils/resample/resample_utils.hpp"
#include "tier4_autoware_utils/tier4_autoware_utils.hpp"

#include <functional>
#include <string>
#include <vector>

namespace motion_utils
{
using geometry_msgs::msg::Pose;

visualization_msgs::msg::MarkerArray createStopVirtualWallMarker(
const geometry_msgs::msg::Pose & pose, const std::string & module_name, const rclcpp::Time & now,
const int32_t id, const double longitudinal_offset = 0.0);
const Pose & pose, const std::string & module_name, const rclcpp::Time & now, const int32_t id,
const double longitudinal_offset = 0.0);

visualization_msgs::msg::MarkerArray createSlowDownVirtualWallMarker(
const geometry_msgs::msg::Pose & pose, const std::string & module_name, const rclcpp::Time & now,
const int32_t id, const double longitudinal_offset = 0.0);
const Pose & pose, const std::string & module_name, const rclcpp::Time & now, const int32_t id,
const double longitudinal_offset = 0.0);

visualization_msgs::msg::MarkerArray createDeadLineVirtualWallMarker(
const geometry_msgs::msg::Pose & pose, const std::string & module_name, const rclcpp::Time & now,
const int32_t id, const double longitudinal_offset = 0.0);
const Pose & pose, const std::string & module_name, const rclcpp::Time & now, const int32_t id,
const double longitudinal_offset = 0.0);

visualization_msgs::msg::MarkerArray createDeletedStopVirtualWallMarker(
const rclcpp::Time & now, const int32_t id);
Expand All @@ -41,6 +46,46 @@ visualization_msgs::msg::MarkerArray createDeletedSlowDownVirtualWallMarker(

visualization_msgs::msg::MarkerArray createDeletedDeadLineVirtualWallMarker(
const rclcpp::Time & now, const int32_t id);

visualization_msgs::msg::MarkerArray createVirtualWallMarkerFromPreviousPoses(
const std::vector<Pose> & stop_poses, const std::vector<Pose> & previous_poses,
const rclcpp::Time & now, int32_t id);

class VirtualWallMarkerCreator
{
public:
virtual ~VirtualWallMarkerCreator() = default;

using create_wall_function = std::function<visualization_msgs::msg::MarkerArray(
const geometry_msgs::msg::Pose & pose, const std::string & module_name,
const rclcpp::Time & now, const int32_t id, const double longitudinal_offset)>;

using delete_wall_function =
std::function<visualization_msgs::msg::MarkerArray(const rclcpp::Time & now, const int32_t id)>;

visualization_msgs::msg::MarkerArray createStopVirtualWallMarker(
const std::vector<Pose> & stop_poses, const std::string & module_name, const rclcpp::Time & now,
int32_t id, const double longitudinal_offset = 0.0);

visualization_msgs::msg::MarkerArray createSlowDownVirtualWallMarker(
const std::vector<Pose> & slow_down_poses, const std::string & module_name,
const rclcpp::Time & now, int32_t id, const double longitudinal_offset = 0.0);

visualization_msgs::msg::MarkerArray createDeadLineVirtualWallMarker(
const std::vector<Pose> & dead_line_poses, const std::string & module_name,
const rclcpp::Time & now, int32_t id, const double longitudinal_offset = 0.0);

private:
visualization_msgs::msg::MarkerArray handleVirtualWallMarker(
const std::vector<Pose> & poses, const std::string & module_name, const rclcpp::Time & now,
int32_t id, create_wall_function function_create_wall_marker,
delete_wall_function function_delete_wall_marker,
std::vector<geometry_msgs::msg::Pose> & previous_poses, const double longitudinal_offset = 0.0);

std::vector<Pose> previous_stop_poses_;
std::vector<Pose> previous_slow_down_poses_;
std::vector<Pose> previous_dead_line_poses_;
};
} // namespace motion_utils

#endif // MOTION_UTILS__MARKER__MARKER_HELPER_HPP_
33 changes: 33 additions & 0 deletions common/motion_utils/include/motion_utils/trajectory/trajectory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,39 @@ double calcSignedArcLength(const T & points, const size_t src_idx, const size_t
return dist_sum;
}

/**
* @brief Computes the partial sums of the elements in the sub-ranges of
* the range [src_idx, dst_idx) and return these sum as vector
*/
template <class T>
std::vector<double> calcSignedArcLengthPartialSum(
const T & points, const size_t src_idx, const size_t dst_idx)
{
try {
validateNonEmpty(points);
} catch (const std::exception & e) {
std::cerr << e.what() << std::endl;
return {};
}

if (src_idx + 1 > dst_idx) {
auto copied = points;
std::reverse(copied.begin(), copied.end());
return calcSignedArcLengthPartialSum(points, dst_idx, src_idx);
}

std::vector<double> partial_dist;
partial_dist.reserve(dst_idx - src_idx);

double dist_sum = 0.0;
partial_dist.push_back(dist_sum);
for (size_t i = src_idx; i < dst_idx - 1; ++i) {
dist_sum += tier4_autoware_utils::calcDistance2d(points.at(i), points.at(i + 1));
partial_dist.push_back(dist_sum);
}
return partial_dist;
}

/**
* @brief calcSignedArcLength from point to index
*/
Expand Down
78 changes: 78 additions & 0 deletions common/motion_utils/src/marker/marker_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@

#include <string>

using tier4_autoware_utils::appendMarkerArray;
using tier4_autoware_utils::createDefaultMarker;
using tier4_autoware_utils::createDeletedDefaultMarker;
using tier4_autoware_utils::createMarkerColor;
using tier4_autoware_utils::createMarkerScale;
using visualization_msgs::msg::MarkerArray;

namespace
{

inline visualization_msgs::msg::MarkerArray createVirtualWallMarkerArray(
const geometry_msgs::msg::Pose & vehicle_front_pose, const std::string & module_name,
const std::string & ns_prefix, const rclcpp::Time & now, const int32_t id,
Expand Down Expand Up @@ -128,4 +131,79 @@ visualization_msgs::msg::MarkerArray createDeletedDeadLineVirtualWallMarker(
{
return createDeletedVirtualWallMarkerArray("dead_line_", now, id);
}

visualization_msgs::msg::MarkerArray VirtualWallMarkerCreator::handleVirtualWallMarker(
const std::vector<Pose> & poses, const std::string & module_name, const rclcpp::Time & now,
int32_t id, create_wall_function function_create_wall_marker,
delete_wall_function function_delete_wall_marker,
std::vector<geometry_msgs::msg::Pose> & previous_virtual_wall_poses,
const double longitudinal_offset)
{
size_t id_to_create = id;
size_t id_to_delete = id;
visualization_msgs::msg::MarkerArray wall_marker;

if (poses.size() == 0) {
return wall_marker;
}

for (const auto & p : previous_virtual_wall_poses) {
const bool previous_stop_pose_is_in_stop_pose =
std::any_of(poses.begin(), poses.end(), [&](const geometry_msgs::msg::Pose & elem) {
std::vector<Pose> poses;
poses.push_back(p);
poses.push_back(elem);
return resample_utils::validate_points_duplication(poses);
});

if (!previous_stop_pose_is_in_stop_pose) {
appendMarkerArray(function_delete_wall_marker(now, id_to_delete), &wall_marker, now);
}
id_to_delete++;
}

for (const auto & p : poses) {
appendMarkerArray(
function_create_wall_marker(p, module_name, now, id_to_create++, longitudinal_offset),
&wall_marker);
}
previous_virtual_wall_poses = poses;
return wall_marker;
}

visualization_msgs::msg::MarkerArray VirtualWallMarkerCreator::createStopVirtualWallMarker(
const std::vector<Pose> & stop_poses, const std::string & module_name, const rclcpp::Time & now,
int32_t id, const double longitudinal_offset)
{
create_wall_function creator = motion_utils::createStopVirtualWallMarker;
delete_wall_function deleter = motion_utils::createDeletedStopVirtualWallMarker;

return handleVirtualWallMarker(
stop_poses, module_name, now, id, creator, deleter, previous_stop_poses_, longitudinal_offset);
}

visualization_msgs::msg::MarkerArray VirtualWallMarkerCreator::createSlowDownVirtualWallMarker(
const std::vector<Pose> & slow_down_poses, const std::string & module_name,
const rclcpp::Time & now, int32_t id, const double longitudinal_offset)
{
create_wall_function creator = motion_utils::createSlowDownVirtualWallMarker;
delete_wall_function deleter = motion_utils::createDeletedSlowDownVirtualWallMarker;

return handleVirtualWallMarker(
slow_down_poses, module_name, now, id, creator, deleter, previous_slow_down_poses_,
longitudinal_offset);
}

visualization_msgs::msg::MarkerArray VirtualWallMarkerCreator::createDeadLineVirtualWallMarker(
const std::vector<Pose> & dead_line_poses, const std::string & module_name,
const rclcpp::Time & now, int32_t id, const double longitudinal_offset)
{
create_wall_function creator = motion_utils::createDeadLineVirtualWallMarker;
delete_wall_function deleter = motion_utils::createDeletedDeadLineVirtualWallMarker;

return handleVirtualWallMarker(
dead_line_poses, module_name, now, id, creator, deleter, previous_dead_line_poses_,
longitudinal_offset);
}

} // namespace motion_utils
12 changes: 10 additions & 2 deletions common/rtc_manager_rviz_plugin/src/rtc_manager_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ std::string getModuleName(const uint8_t module_type)
case Module::LANE_CHANGE_RIGHT: {
return "lane_change_right";
}
case Module::EXT_REQUEST_LANE_CHANGE_LEFT: {
return "ext_request_lane_change_left";
}
case Module::EXT_REQUEST_LANE_CHANGE_RIGHT: {
return "ext_request_lane_change_right";
}
case Module::AVOIDANCE_LEFT: {
return "avoidance_left";
}
Expand Down Expand Up @@ -80,8 +86,10 @@ bool isPathChangeModule(const uint8_t module_type)
{
if (
module_type == Module::LANE_CHANGE_LEFT || module_type == Module::LANE_CHANGE_RIGHT ||
module_type == Module::AVOIDANCE_LEFT || module_type == Module::AVOIDANCE_RIGHT ||
module_type == Module::PULL_OVER || module_type == Module::PULL_OUT) {
module_type == Module::EXT_REQUEST_LANE_CHANGE_LEFT ||
module_type == Module::EXT_REQUEST_LANE_CHANGE_RIGHT || module_type == Module::AVOIDANCE_LEFT ||
module_type == Module::AVOIDANCE_RIGHT || module_type == Module::PULL_OVER ||
module_type == Module::PULL_OUT) {
return true;
}
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
max_longitudinal_deviation: 2.0
max_yaw_deviation_deg: 60.0
delta_yaw_threshold_for_closest_point: 1.570 #M_PI/2.0, delta yaw thres for closest point
min_braking_distance: 0.0
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ struct Param
double max_lateral_deviation;
double max_longitudinal_deviation;
double max_yaw_deviation_deg;
double min_braking_distance;
// nearest search to ego
double ego_nearest_dist_threshold;
double ego_nearest_yaw_threshold;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ Output LaneDepartureChecker::update(const Input & input)
const auto & raw_abs_velocity = std::abs(input.current_odom->twist.twist.linear.x);
const auto abs_velocity = raw_abs_velocity < min_velocity ? 0.0 : raw_abs_velocity;

const auto braking_distance =
calcBrakingDistance(abs_velocity, param_.max_deceleration, param_.delay_time);
const auto braking_distance = std::max(
param_.min_braking_distance,
calcBrakingDistance(abs_velocity, param_.max_deceleration, param_.delay_time));

output.resampled_trajectory = cutTrajectory(
resampleTrajectory(*input.predicted_trajectory, param_.resample_interval), braking_distance);
Expand Down
Loading