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

feat(autoware_behavior_velocity_planner_common,autoware_behavior_velocity_stop_line_module): revert pr7710 and Check next_lane_id in createTargetPoint on stop line #1396

Closed
Closed
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
37c22cd
feat(autoware_universe_utils): add TimeKeeper to track function's pro…
takayuki5168 Jun 30, 2024
3ac2ca9
update
takayuki5168 Jun 30, 2024
b08c038
refactoring
yhisaki Jul 2, 2024
55ea365
remove track
yhisaki Jul 2, 2024
45a2198
refactor
yhisaki Jul 4, 2024
3d3118a
fix(radar_fusion_to_detected_object): fix knownConditionTrueFalse (#7…
veqcc Jul 4, 2024
3abdced
fix(autoware_behavior_velocity_intersection_module): fix shadowFuncti…
veqcc Jul 4, 2024
9ee408d
feat(obstacle_cruise_planner): add diagnostics publishing to cruise p…
danielsanchezaran Jul 4, 2024
8769544
fix(diagnostic_graph_aggregator): fix shadowFunction (#7838)
veqcc Jul 4, 2024
8df4b4c
feat(safety_check): filter safety check targe objects by yaw deviatio…
satoshi-ota Jul 4, 2024
5df28cc
feat(goal_planner): prioritize pull over path by curvature (#7791)
kosuke55 Jul 4, 2024
17e3bdf
fix
yhisaki Jul 4, 2024
99c7c57
fix(static_obstacle_avoidance): fix issues in target object filtering…
satoshi-ota Jul 4, 2024
25c3c3e
fix
yhisaki Jul 4, 2024
2acd484
refactor(occupancy_grid_map_outlier_filter)!: fix namespace and direc…
technolojin Jul 4, 2024
bf7f998
Merge branch 'main' into feat/time-keeper
yhisaki Jul 4, 2024
fd5a064
chore(motion_velocity_planner): add new codeowners (#7757)
maxime-clem Jul 4, 2024
a195201
refactor(detected_object_feature_remover)!: fix namespace and directo…
technolojin Jul 4, 2024
4f754f8
fix(motion_velocity_planner): use the slowdown velocity (instead of 0…
maxime-clem Jul 4, 2024
fcc838e
refactor(map_height_fitter): apply static analysis (#7837)
a-maumau Jul 4, 2024
a4aed87
refactor(velocity_smoother): change method to take data for external …
go-sakayori Jul 4, 2024
f29d560
fix: adapi vehicle topic qos (#7847)
isamu-takagi Jul 4, 2024
0176961
refactor(static_avoidance): modify getAdjacentLane function (#7843)
go-sakayori Jul 4, 2024
a1ed6c2
fix(pointcloud_preprocessor): fix preprocessorErrorDirective (#7786)
veqcc Jul 4, 2024
2705eff
fix(probabilistic_occupancy_grid_map): fix noExplicitConstructor (#7811)
veqcc Jul 4, 2024
7cbf2f5
chore(ci): remove unnecessary cppcheck suppressions (#7848)
veqcc Jul 4, 2024
55bedee
fix(imu_corrector): fix shadowFunction (#7839)
veqcc Jul 5, 2024
2dbf8e4
fix(control_launch): fix control launch control_evaluator plugin name…
danielsanchezaran Jul 5, 2024
037bcdd
fix(traffic_light_occlusion_predictor): fix cppcheck warnings (#7826)
veqcc Jul 5, 2024
b233929
fix(autoware_planning_validator): fix knownConditionTrueFalse (#7817)
veqcc Jul 5, 2024
268f374
chore(ci): remove unnecessary cppcheck suppression (#7854)
veqcc Jul 5, 2024
5c48933
fix(tensorrt_yolox): fix knownConditionTrueFalse (#7823)
veqcc Jul 5, 2024
d1dcfc3
Merge branch 'main' into feat/time-keeper
yhisaki Jul 5, 2024
ad38061
refactor(lane_change): move struct to lane change namespace (#7841)
zulfaqar-azmi-t4 Jul 5, 2024
0efba77
fix bug of test
yhisaki Jul 5, 2024
5eb577e
fix(image_projection_based_fusion): segmentation pointcloud fusion pa…
badai-nguyen Jul 5, 2024
134b5c2
fix(static_obstacle_avoidance): ignore pedestrian/cyclist who is not …
satoshi-ota Jul 5, 2024
0f60c62
feat(planning_evaluator): add planning evaluator polling sub (#7827)
danielsanchezaran Jul 5, 2024
6c944bf
perf(map_based_prediction): remove query on all fences linestrings (#…
maxime-clem Jul 5, 2024
589c88b
fix(yabloc_image_processing): fix shadowFunction (#7865)
veqcc Jul 5, 2024
22daaeb
chore(ci): remove unnecessary cppcheck suppression (#7862)
veqcc Jul 5, 2024
3627afc
fix(fake_test_node, osqp_interface, qp_interface): remove unnecessary…
veqcc Jul 5, 2024
ede0dfe
change interface of Timekeeper's constructor and report()
yhisaki Jul 5, 2024
5be7627
feat(mission_planner): reroute in manual driving (#7842)
rej55 Jul 5, 2024
859da5a
refactor(map_loader): apply static analysis (#7845)
a-maumau Jul 5, 2024
3c615a6
fix(system_monitor): apply cppcheck-suppress for cstyleCast (#7867)
Koichi98 Jul 5, 2024
b61db78
feat(tier4_perception_launch): add image segmentation based pointclou…
badai-nguyen Jul 5, 2024
cc1ab05
fix(bluetooth_monitor): apply cppcheck-suppress for cstyleCast (#7869)
Koichi98 Jul 5, 2024
71fc4c3
feat(ndt_scan_matcher): estimate the covariance of ndt scan matching …
SaltUhey Jul 5, 2024
5ebaed7
feat(pointpainting_fusion): add test for painting util (#7169)
tzhong518 Jul 5, 2024
7dd7f10
Merge branch 'main' into feat/time-keeper
yhisaki Jul 5, 2024
2ee520e
update
yhisaki Jul 5, 2024
4e7e743
add string reporter
yhisaki Jul 8, 2024
c679280
add manager
yhisaki Jul 8, 2024
92c700d
revert manager
yhisaki Jul 8, 2024
47e9668
remove unused include
yhisaki Jul 8, 2024
f7fd720
remove comment
yhisaki Jul 8, 2024
a4abfc7
update
yhisaki Jul 8, 2024
b512002
Revert "fix(autoware_behavior_velocity_planner_common): remove lane_i…
yhisaki Jul 8, 2024
293f804
lane_id to lane_ids
yhisaki Jul 8, 2024
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
4 changes: 0 additions & 4 deletions .cppcheck_suppressions
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ knownConditionTrueFalse
missingInclude
missingIncludeSystem
noConstructor
noExplicitConstructor
noValidConfiguration
passedByValue
preprocessorErrorDirective
redundantInitialization
shadowFunction
shadowVariable
// cspell: ignore uninit
uninitMemberVar
Expand Down
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
control/autoware_pid_longitudinal_controller/** mamoru.sobue@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
control/autoware_pure_pursuit/** takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
control/autoware_shift_decider/** takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
control/autoware_smart_mpc_trajectory_follower/** kosuke.takeuchi@tier4.jp masayuki.aino@proxima-ai-tech.com takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp

Check warning on line 58 in .github/CODEOWNERS

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (masayuki)

Check warning on line 58 in .github/CODEOWNERS

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (aino)
control/autoware_trajectory_follower_base/** takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
control/autoware_trajectory_follower_node/** takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
control/autoware_vehicle_cmd_gate/** takamasa.horibe@tier4.jp tomoya.kimura@tier4.jp
Expand Down Expand Up @@ -192,10 +192,10 @@
planning/behavior_velocity_planner/autoware_behavior_velocity_virtual_traffic_light_module/** kosuke.takeuchi@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp
planning/behavior_velocity_planner/autoware_behavior_velocity_walkway_module/** satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
planning/motion_velocity_planner/autoware_motion_velocity_dynamic_obstacle_stop_module/** mamoru.sobue@tier4.jp maxime.clement@tier4.jp
planning/motion_velocity_planner/autoware_motion_velocity_obstacle_velocity_limiter_module/** maxime.clement@tier4.jp
planning/motion_velocity_planner/autoware_motion_velocity_obstacle_velocity_limiter_module/** maxime.clement@tier4.jp daniel.sanchez@tier4.jp
planning/motion_velocity_planner/autoware_motion_velocity_out_of_lane_module/** maxime.clement@tier4.jp shumpei.wakabayashi@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
planning/motion_velocity_planner/autoware_motion_velocity_planner_common/** maxime.clement@tier4.jp
planning/motion_velocity_planner/autoware_motion_velocity_planner_node/** maxime.clement@tier4.jp
planning/motion_velocity_planner/autoware_motion_velocity_planner_common/** maxime.clement@tier4.jp daniel.sanchez@tier4.jp alqudah.mohammad@tier4.jp
planning/motion_velocity_planner/autoware_motion_velocity_planner_node/** maxime.clement@tier4.jp daniel.sanchez@tier4.jp alqudah.mohammad@tier4.jp
planning/sampling_based_planner/autoware_bezier_sampler/** maxime.clement@tier4.jp
planning/sampling_based_planner/autoware_frenet_planner/** maxime.clement@tier4.jp
planning/sampling_based_planner/autoware_path_sampler/** maxime.clement@tier4.jp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct VehicleKinematics
using Message = autoware_adapi_v1_msgs::msg::VehicleKinematics;
static constexpr char name[] = "/api/vehicle/kinematics";
static constexpr size_t depth = 1;
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT;
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_VOLATILE;
};

Expand Down
25 changes: 25 additions & 0 deletions common/autoware_universe_utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
cmake_minimum_required(VERSION 3.14)
project(autoware_universe_utils)

option(BUILD_EXAMPLES "Build examples" OFF)

find_package(autoware_cmake REQUIRED)
autoware_package()

find_package(Boost REQUIRED)

find_package(fmt REQUIRED)

ament_auto_add_library(autoware_universe_utils SHARED
src/geometry/geometry.cpp
src/geometry/pose_deviation.cpp
Expand All @@ -16,6 +20,11 @@ ament_auto_add_library(autoware_universe_utils SHARED
src/ros/marker_helper.cpp
src/ros/logger_level_configure.cpp
src/system/backtrace.cpp
src/system/time_keeper.cpp
)

target_link_libraries(autoware_universe_utils
fmt::fmt
)

if(BUILD_TESTING)
Expand All @@ -30,4 +39,20 @@ if(BUILD_TESTING)
)
endif()

if(BUILD_EXAMPLES)
message(STATUS "Building examples")
file(GLOB_RECURSE example_files examples/*.cpp)

foreach(example_file ${example_files})
get_filename_component(example_name ${example_file} NAME_WE)
add_executable(${example_name} ${example_file})
target_link_libraries(${example_name}
autoware_universe_utils
)
install(TARGETS ${example_name}
DESTINATION lib/${PROJECT_NAME}
)
endforeach()
endif()

ament_auto_package()
91 changes: 91 additions & 0 deletions common/autoware_universe_utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,94 @@
## For developers

`autoware_universe_utils.hpp` header file was removed because the source files that directly/indirectly include this file took a long time for preprocessing.

### TimeKeeper and ScopedTimeTrack

#### `autoware::universe_utils::TimeKeeper`

##### Constructor

```cpp
template <typename... Reporters>
explicit TimeKeeper(Reporters... reporters);
```

- Initializes the `TimeKeeper` with a list of reporters.

##### Methods

- `void add_reporter(std::ostream * os);`

Check warning on line 26 in common/autoware_universe_utils/README.md

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (ostream)

- Adds a reporter to output processing times to an `ostream`.

Check warning on line 28 in common/autoware_universe_utils/README.md

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (ostream)
- `os`: Pointer to the `ostream` object.

Check warning on line 29 in common/autoware_universe_utils/README.md

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (ostream)

- `void add_reporter(rclcpp::Publisher<ProcessingTimeDetail>::SharedPtr publisher);`

- Adds a reporter to publish processing times to an `rclcpp` publisher.
- `publisher`: Shared pointer to the `rclcpp` publisher.

- `void add_reporter(rclcpp::Publisher<std_msgs::msg::String>::SharedPtr publisher);`

- Adds a reporter to publish processing times to an `rclcpp` publisher with `std_msgs::msg::String`.
- `publisher`: Shared pointer to the `rclcpp` publisher.

- `void start_track(const std::string & func_name);`

- Starts tracking the processing time of a function.
- `func_name`: Name of the function to be tracked.

- `void end_track(const std::string & func_name);`
- Ends tracking the processing time of a function.
- `func_name`: Name of the function to end tracking.

#### Example

```cpp
#include <iostream>
#include <rclcpp/rclcpp.hpp>
#include "autoware_universe_utils/time_keeper.hpp"


int main(int argc, char ** argv)
{
rclcpp::init(argc, argv);
auto node = std::make_shared<rclcpp::Node>("time_keeper_example");

auto time_keeper = std::make_shared<autoware::universe_utils::TimeKeeper>();
time_keeper->add_reporter(&std::cout);

auto publisher = node->create_publisher<autoware::universe_utils::ProcessingTimeDetail>("time_topic", 10);
time_keeper->add_reporter(publisher);

time_keeper->start_track("example_function");
// Do some processing here
time_keeper->end_track("example_function");

rclcpp::spin(node);
rclcpp::shutdown();
return 0;
}
```

#### `autoware::universe_utils::ScopedTimeTrack`

##### Description

Class for automatically tracking the processing time of a function within a scope.

##### Constructor

```cpp
ScopedTimeTrack(const std::string & func_name, TimeKeeper & time_keeper);
```

- `func_name`: Name of the function to be tracked.
- `time_keeper`: Reference to the `TimeKeeper` object.

##### Destructor

```cpp
~ScopedTimeTrack();
```

- Destroys the `ScopedTimeTrack` object, ending the tracking of the function.
55 changes: 55 additions & 0 deletions common/autoware_universe_utils/examples/example_time_keeper.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Copyright 2024 TIER IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "autoware/universe_utils/system/time_keeper.hpp"

#include <rclcpp/rclcpp.hpp>

#include <iostream>
#include <memory>

int main(int argc, char ** argv)
{
rclcpp::init(argc, argv);
auto node = std::make_shared<rclcpp::Node>("time_keeper_example");

auto time_keeper = std::make_shared<autoware::universe_utils::TimeKeeper>();

time_keeper->add_reporter(&std::cout);

auto publisher =
node->create_publisher<autoware::universe_utils::ProcessingTimeDetail>("processing_time", 10);

time_keeper->add_reporter(publisher);

auto publisher_str = node->create_publisher<std_msgs::msg::String>("processing_time_str", 10);

auto funcA = [&time_keeper]() {
time_keeper->start_track("funcA");
std::this_thread::sleep_for(std::chrono::seconds(1));
time_keeper->end_track("funcA");
};

auto funcB = [&time_keeper, &funcA]() {
time_keeper->start_track("funcB");
std::this_thread::sleep_for(std::chrono::seconds(2));
funcA();
time_keeper->end_track("funcB");
};

funcB();

rclcpp::spin(node);
rclcpp::shutdown();
return 0;
}
Loading
Loading