autoware.universe
autoware.universe copied to clipboard
feat(reaction_analyzer): add reaction anaylzer tool to measure end-to-end delay in sudden obstacle braking response
Description
Main issue:
- https://github.com/autowarefoundation/autoware.universe/issues/6547
Strictly depends on:
- https://github.com/autowarefoundation/autoware.universe/pull/6382
Optionally depends on:
- https://github.com/autowarefoundation/autoware.universe/issues/6255
The main purpose of the reaction analyzer package is to measure the reaction times of the nodes by listening to the
pre-determined topics. It can be used for measuring the reaction time of the perception pipeline, planning pipeline, and
control pipeline. To be able to measure both control outputs and perception outputs, it is necessary to divide the node
into two running_mode: planning_control
and perception_planning
.
Planning Control Mode
In this mode, the reaction analyzer creates a dummy publisher for the PredictedObjects and PointCloud topics. In the beginning of the test, it publishes the initial position of the ego vehicle and the goal position to set the test environment. Then, it spawns a sudden obstacle in front of the ego vehicle. After the obstacle is spawned, it starts to measure the pre-determined topics to catch the reacted messages of the planning and control nodes. When all the topics are reacted, it calculates the reaction time of the nodes and statistics, and it creates a csv file to store the results.
Perception Planning Mode
In this mode, the reaction analyzer reads the rosbag files which are recorded from AWSIM, and it creates a topic
publisher for each topic to replay the rosbag. It reads two rosbag files: path_bag_without_object
and path_bag_with_object
. Firstly, it replays the path_bag_without_object
to set the initial position of the ego
vehicle and the goal position. After spawn_time_after_init
seconds, it replays the path_bag_with_object
to spawn a
sudden obstacle in front of the ego vehicle. After the obstacle is spawned, it starts to measure the pre-determined
topics to catch the reacted messages of the perception and planning nodes. When all the topics are reacted, it
calculates
the reaction time of the nodes and statistics, and it creates a CSV file to store the results.
Related links
Related Issue:
- https://github.com/autowarefoundation/autoware.universe/issues/5540
Tests performed
You can see the results in the Excel table here. You can see the test dates below the page. Also, some tests were shared in issues comments: https://github.com/autowarefoundation/autoware.universe/issues/5540
Notes for reviewers
This PR currently depends on other PR below:
- https://github.com/autowarefoundation/autoware.universe/pull/6382
Interface changes
Effects on system behavior
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
- [x] I've confirmed the contribution guidelines.
- [x] The PR follows the pull request guidelines.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
- [ ] The PR follows the pull request guidelines.
- [ ] The PR has been properly tested.
- [ ] The PR has been reviewed by the code owners.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
- [ ] There are no open discussions or they are tracked via tickets.
- [ ] The PR is ready for merge.
After all checkboxes are checked, anyone who has write access can merge the PR.
cc @mitsudome-r @xmfcx The blockers are ready for review. I added a class utility to enable or disable easily the published_time:
by order of merge
- https://github.com/autowarefoundation/autoware_msgs/pull/83
- https://github.com/autowarefoundation/autoware.universe/pull/6440
- https://github.com/autowarefoundation/autoware.universe/pull/6490
- For the async pointcloud publishing, I added a parameter
pointcloud_publisher_type
which can be "async_header_sync_publish", "sync_header_sync_publish" or "async_publish". I tested again but I couldn't any better results for "async_header_sync_publish", "sync_header_sync_publish" or "async_publish".
Sorry for the delay, I need to convert the PR because of the implementation of the message_filters package.
When I implemented message_filters
into my node, the subscribers and synchronizers did not create their subscribers into the node but they were initialized. After some time, I realized the Class structure of my node does not allow me to create message_filters
object when I try to register the callback function. So, I decided to change the structure and I added another class SubscriberBase.
The package is ready for review now. I set up the message_filters
package into reaction_analyzer and cleaned up the code.
This PR currently depends on other PRs below(in order):
- https://github.com/autowarefoundation/autoware.universe/pull/6440
- https://github.com/autowarefoundation/autoware.universe/pull/6490 (not strictly)
- https://github.com/autowarefoundation/autoware.universe/pull/6382
@brkay54 could you fix the errors stated in the pre-commit.ci?
@xmfcx Thank you, I fixed.
[!IMPORTANT]
Auto Review Skipped
Auto reviews are limited to the following labels: tag:openai-pr-reviewer. Please add one of these labels to enable auto reviews.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yaml
file in this repository.To trigger a single review, invoke the
@coderabbitai review
command.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
-
I pushed a fix in commit <commit_id>.
-
Generate unit-tests for this file.
-
Open a follow-up GitHub issue for this discussion.
-
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitai
in a new review comment at the desired location with your query. Examples:-
@coderabbitai generate unit tests for this file.
-
@coderabbitai modularize this function.
-
- PR comments: Tag
@coderabbitai
in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:-
@coderabbitai generate interesting stats about this repository and render them as a table.
-
@coderabbitai show all the console.log statements in this repository.
-
@coderabbitai read src/utils.ts and generate unit tests.
-
@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
-
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
-
@coderabbitai pause
to pause the reviews on a PR. -
@coderabbitai resume
to resume the paused reviews. -
@coderabbitai review
to trigger a review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai resolve
resolve all the CodeRabbit review comments. -
@coderabbitai help
to get help.
Additionally, you can add @coderabbitai ignore
anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml
)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yaml
file to the root of your repository. - The JSON schema for the configuration file is available here.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json
CodeRabbit Discord Community
Join our Discord Community to get help, request features, and share feedback.
CodeRabbit
Uplevel your code reviews with CodeRabbit Pro
CodeRabbit Pro
If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.
/review
PR Review
(Review updated until commit https://github.com/autowarefoundation/autoware.universe/commit/3e8a41f8ecbfca3a04511f57d4bfdf3ab141e08b)
⏱️ Estimated effort to review [1-5] |
4, due to the large amount of new code across multiple files, complexity of the logic involved, and the need to understand the context of the Autoware system and its message types. |
🧪 Relevant tests |
No |
🔍 Possible issues |
Possible Bug: In |
Performance Concern: The use of mutex locks in multiple callback functions in | |
🔒 Security concerns |
No |
Code feedback:
relevant file | tools/reaction_analyzer/src/reaction_analyzer_node.cpp |
suggestion |
Consider adding a mechanism to ensure that the obstacle is only spawned once and handle retry logic if spawning fails. This could involve setting a flag once the obstacle is successfully spawned and checking this flag before attempting to spawn again. [important] |
relevant line | if (!spawn_object_cmd_) { |
relevant file | tools/reaction_analyzer/src/reaction_analyzer_node.cpp |
suggestion |
Review the use of mutex locks in callback functions to ensure they are necessary and minimize the scope of the locks to avoid potential performance bottlenecks. [medium] |
relevant line | std::lock_guard<:mutex> lock(mutex_); |
relevant file | tools/reaction_analyzer/src/utils.cpp |
suggestion |
For functions like |
relevant line | LatencyStats calculate_statistics(const std::vector |
relevant file | tools/reaction_analyzer/src/topic_publisher.cpp |
suggestion |
In the |
relevant line | RCLCPP_ERROR_STREAM(node_->get_logger(), "Error opening bag file: " |
✨ Review tool usage guide:
Overview:
The review
tool scans the PR code changes, and generates a PR review. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
When commenting, to edit configurations related to the review tool (pr_reviewer
section), use the following template:
/review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
With a configuration file, use the following template:
[pr_reviewer]
some_config1=...
some_config2=...
Utilizing extra instructionsThe Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Specify the relevant sub-tool, and the relevant aspects of the PR that you want to emphasize. Examples for extra instructions:
Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable. |
How to enable\disable automation
meaning the |
Auto-labelsThe
|
Extra sub-toolsThe |
Auto-approve PRsBy invoking:
The tool will automatically approve the PR, and add a comment with the approval. To ensure safety, the auto-approval feature is disabled by default. To enable auto-approval, you need to actively set in a pre-defined configuration file the following:
(this specific flag cannot be set with a command line argument, only in the configuration file, committed to the repository) You can also enable auto-approval only if the PR meets certain requirements, such as that the
|
More PR-Agent commands
|
See the review usage page for a comprehensive guide on using this tool.
/improve --extended
PR Code Suggestions
Category | Suggestions |
Best practice |
Use
|
Use smart pointers for better resource management.To avoid potential memory leaks and ensure proper resource management, consider using tools/reaction_analyzer/include/reaction_analyzer_node.hpp [197-198]
| |
Delete copy constructor and assignment operator for classes with mutexes.Since tools/reaction_analyzer/include/subscriber.hpp [171]
| |
Use
| |
Use smart pointers for better memory management.To avoid potential memory leaks and ensure exception safety, consider using tools/reaction_analyzer/include/utils.hpp [50]
| |
Set
| |
Replace hardcoded file paths with environment variables for enhanced portability.It's recommended to avoid using hardcoded file paths in configuration files. Instead, tools/reaction_analyzer/param/reaction_analyzer.param.yaml [5-37]
| |
Maintainability |
Move struct definitions to separate header files for better organization.To improve the maintainability and readability of the code, consider moving the tools/reaction_analyzer/include/reaction_analyzer_node.hpp [75-110]
|
Improve encapsulation by moving methods into
| |
Split
| |
Add a setup script to automate the environment setup process.For better reproducibility and ease of use, consider adding a script or automation tool tools/reaction_analyzer/README.md [58-61]
| |
Group related parameters under a common hierarchy for better organization.For better readability and maintainability, consider grouping related parameters under a tools/reaction_analyzer/param/reaction_analyzer.param.yaml [11-34]
| |
Enhancement |
Abstract subscriber logic into a template class for modularity.To enhance the modularity and reusability of the subscriber components, consider tools/reaction_analyzer/include/subscriber.hpp [96-99]
|
Provide a detailed setup and usage guide for the
| |
Host documentation images on a stable and accessible platform.To improve the usability and accessibility of the documentation, consider hosting the tools/reaction_analyzer/README.md [10]
| |
Performance |
Improve median calculation efficiency using
|
Enable intra-process communication for the node container.It is recommended to enable intra-process communication for the node container to improve tools/reaction_analyzer/launch/reaction_analyzer.launch.xml [65]
|
✨ Improve tool usage guide:
Overview:
The improve
tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.
When commenting, to edit configurations related to the improve tool (pr_code_suggestions
section), use the following template:
/improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
With a configuration file, use the following template:
[pr_code_suggestions]
some_config1=...
some_config2=...
Enabling\disabling automationWhen you first install the app, the default mode for the improve tool is:
meaning the |
Utilizing extra instructionsExtra instructions are very important for the Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Specify relevant aspects that you want the model to focus on. Examples for extra instructions:
Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable. |
A note on code suggestions quality
|
More PR-Agent commands
|
See the improve usage page for a more comprehensive guide on using this tool.
/review
Persistent review updated to latest commit https://github.com/autowarefoundation/autoware.universe/commit/3e8a41f8ecbfca3a04511f57d4bfdf3ab141e08b
/improve --extended
PR Code Suggestions
Category | Suggestions |
Best practice |
Initialize primitive type members in structs with default values.Consider initializing all primitive type members in the tools/reaction_analyzer/include/reaction_analyzer_node.hpp [53-63]
|
Encapsulate public member variables with getter functions.For better encapsulation and data protection, consider making the tools/reaction_analyzer/include/reaction_analyzer_node.hpp [72]
| |
Use smart pointers for better resource management.To avoid potential memory leaks and ensure proper resource management, consider using tools/reaction_analyzer/include/subscriber.hpp [173-174]
| |
Use
| |
Make
| |
Consider adding iteration capability to
| |
Use smart pointers instead of raw pointers for better memory management.To avoid potential memory leaks and ensure exception safety, consider using smart pointers tools/reaction_analyzer/include/utils.hpp [185-190]
| |
Mark functions as
| |
Use RAII locking mechanisms for mutexes to ensure exception safety.Instead of manually locking and unlocking the mutex, consider using tools/reaction_analyzer/src/reaction_analyzer_node.cpp [152-159]
| |
Use atomic variables for thread-safe flag operations.To ensure thread safety, consider using atomic variables for flags such as tools/reaction_analyzer/src/reaction_analyzer_node.cpp [375-376]
| |
Enhancement |
Consider using
|
Use
| |
Add check for empty input string in UUID generation.In tools/reaction_analyzer/src/utils.cpp [95]
| |
Add mutex to ensure thread safety in UUID generation.To ensure thread safety, consider protecting the static tools/reaction_analyzer/src/utils.cpp [94-95]
| |
Maintainability |
Abstract complex initialization logic into a separate method for clarity.To improve code readability and maintainability, consider abstracting the complex tools/reaction_analyzer/include/subscriber.hpp [140-142]
|
Encapsulate running mode logic into separate functions for clarity.For better maintainability and readability, consider encapsulating the logic for handling tools/reaction_analyzer/src/reaction_analyzer_node.cpp [121-133]
| |
Performance |
Use const reference for strings in loops to avoid unnecessary copies.To improve performance and avoid unnecessary copying, consider passing tools/reaction_analyzer/src/reaction_analyzer_node.cpp [224-230]
|
Reserve space for vector to improve performance.To improve performance, consider reserving space for tools/reaction_analyzer/src/utils.cpp [32]
| |
Possible issue |
Add error handling for node shutdown process.Consider checking the return value of tools/reaction_analyzer/src/reaction_analyzer_node.cpp [313]
|
Add bounds checking for
|
✨ Improve tool usage guide:
Overview:
The improve
tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.
When commenting, to edit configurations related to the improve tool (pr_code_suggestions
section), use the following template:
/improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
With a configuration file, use the following template:
[pr_code_suggestions]
some_config1=...
some_config2=...
Enabling\disabling automationWhen you first install the app, the default mode for the improve tool is:
meaning the |
Utilizing extra instructionsExtra instructions are very important for the Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Specify relevant aspects that you want the model to focus on. Examples for extra instructions:
Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable. |
A note on code suggestions quality
|
More PR-Agent commands
|
See the improve usage page for a more comprehensive guide on using this tool.
Codecov Report
Attention: Patch coverage is 0%
with 1248 lines
in your changes are missing coverage. Please review.
Project coverage is 14.97%. Comparing base (
010965b
) to head (f74c83f
). Report is 57 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #5954 +/- ##
==========================================
- Coverage 15.01% 14.97% -0.04%
==========================================
Files 1972 1969 -3
Lines 136512 136863 +351
Branches 42308 42030 -278
==========================================
+ Hits 20494 20496 +2
- Misses 93265 93658 +393
+ Partials 22753 22709 -44
Flag | Coverage Δ | *Carryforward flag | |
---|---|---|---|
differential | 0.00% <0.00%> (?) |
||
total | 15.11% <ø> (+0.10%) |
:arrow_up: | Carriedforward from ac8d50b |
*This pull request uses carry forward flags. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@xmfcx I implemented some of the automated-review suggestions, cleaned-up the code, and changed .csv
output:
Before .csv
output:
After .csv
output:
- NL means node latency, TL means total latency
With the commit https://github.com/autowarefoundation/autoware.universe/pull/5954/commits/3e8a41f8ecbfca3a04511f57d4bfdf3ab141e08b, we can see each pipeline and its latencies by using the header time of the PublishedTime.msg
. By using this, we can see if there are dropped messages or not while test runng.
Could you check the PR when you are available?
@brkay54 could you fix the clang-tidy errors?
- https://github.com/autowarefoundation/autoware.universe/actions/runs/8326653509/job/22782747570?pr=5954#step:8:7763
@xmfcx Clang-tidy issues were fixed ⭐
I will test this PR against the main branch and merge it.
It seems my pointcloud_container keeps crashing when I launch planning_control mode. I will take a deeper look and see what's causing the error.
It seems my pointcloud_container keeps crashing when I launch planning_control mode. I will take a deeper look and see what's causing the error.
Thank you @mitsudome-r -san, I am going to check this immidiately.
@mitsudome-r -san, actually I saw this issue before but I didn't focus on that issue because it does not prevent running reaction_analyzer in planning control mode. Probably the error you encounter is similar.
Here log of the error:
[component_container_mt-1] [WARN 1715586401.197737367] [probabilistic_occupancy_grid_map]: Failed to lookup transform: Lookup would require extrapolation into the future. Requested time 1715586400.691542 but the latest data is at time 1715586400.655299, when looking up transform from frame [base_link] to frame [map] (transformPointcloud() at /home/berkay/projects/autoware/src/universe/autoware.universe/perception/probabilistic_occupancy_grid_map/src/utils/utils.cpp:35)
[component_container_mt-1] terminate called after throwing an instance of 'std::runtime_error'
[component_container_mt-1] what(): Field x does not exist
[component_container_mt-1] *** Aborted at 1715586401 (unix time) try "date -d @1715586401" if you are using GNU date ***
[component_container_mt-1] PC: @ 0x0 (unknown)
[component_container_mt-1] *** SIGABRT (@0x3e8001bf6b6) received by PID 1832630 (TID 0x7f54e1ffb640) from PID 1832630; stack trace: ***
[component_container_mt-1] @ 0x7f550c40a006 google::(anonymous namespace)::FailureSignalHandler()
[component_container_mt-1] @ 0x7f5510842520 (unknown)
[component_container_mt-1] @ 0x7f55108969fc pthread_kill
[component_container_mt-1] @ 0x7f5510842476 raise
[component_container_mt-1] @ 0x7f55108287f3 abort
[component_container_mt-1] @ 0x7f5510ca2b9e (unknown)
[component_container_mt-1] @ 0x7f5510cae20c (unknown)
[component_container_mt-1] @ 0x7f5510cae277 std::terminate()
[component_container_mt-1] @ 0x7f5510cae4d8 __cxa_throw
[component_container_mt-1] @ 0x7f550470745b sensor_msgs::impl::PointCloud2IteratorBase<>::set_field()
[component_container_mt-1] @ 0x7f550470682b costmap_2d::OccupancyGridMap::raytraceFreespace()
[component_container_mt-1] @ 0x7f5504706d0b costmap_2d::OccupancyGridMap::raytrace2D()
[component_container_mt-1] @ 0x7f55046c19a6 occupancy_grid_map::LaserscanBasedOccupancyGridMapNode::onLaserscanPointCloud2WithObstacleAndRaw()
[component_container_mt-1] @ 0x7f55046ff00b message_filters::CallbackHelper9T<>::call()
[component_container_mt-1] @ 0x7f5504700da0 message_filters::sync_policies::ExactTime<>::checkTuple()
[component_container_mt-1] @ 0x7f550470267d message_filters::Synchronizer<>::cb<>()
[component_container_mt-1] @ 0x7f55046fdea8 message_filters::CallbackHelper1T<>::call()
[component_container_mt-1] @ 0x7f55046fe007 _ZNSt17_Function_handlerIFvSt10shared_ptrIKN11sensor_msgs3msg10LaserScan_ISaIvEEEEEZN15message_filters10SubscriberIS5_N6rclcpp4NodeEE9subscribeEPSC_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE17rmw_qos_profile_sNSB_32SubscriptionOptionsWithAllocatorIS4_EEEUlS7_E_E9_M_invokeERKSt9_Any_dataOS7_
[component_container_mt-1] @ 0x7f55046d6752 _ZNSt8__detail9__variant17__gen_vtable_implINS0_12_Multi_arrayIPFNS0_21__deduce_visit_resultIvEEOZN6rclcpp23AnySubscriptionCallbackIN11sensor_msgs3msg10LaserScan_ISaIvEEESA_E8dispatchESt10shared_ptrISB_ERKNS5_11MessageInfoEEUlOT_E_RSt7variantIJSt8functionIFvRKSB_EESN_IFvSP_SH_EESN_IFvRKNS5_17SerializedMessageEEESN_IFvSW_SH_EESN_IFvSt10unique_ptrISB_St14default_deleteISB_EEEESN_IFvS14_SH_EESN_IFvS11_ISU_S12_ISU_EEEESN_IFvS1A_SH_EESN_IFvSD_ISO_EEESN_IFvS1F_SH_EESN_IFvSD_ISV_EEESN_IFvS1K_SH_EESN_IFvRKS1F_EESN_IFvS1Q_SH_EESN_IFvRKS1K_EESN_IFvS1W_SH_EESN_IFvSE_EESN_IFvSE_SH_EESN_IFvSD_ISU_EEESN_IFvS25_SH_EEEEEJEEESt16integer_sequenceImJLm8EEEE14__visit_invokeESL_S2B_
[component_container_mt-1] @ 0x7f55046fb3d3 rclcpp::Subscription<>::handle_message()
[component_container_mt-1] @ 0x7f55110237bc rclcpp::Executor::execute_subscription()
[component_container_mt-1] @ 0x7f5511023fbf rclcpp::Executor::execute_any_executable()
[component_container_mt-1] @ 0x7f551102b27a rclcpp::executors::MultiThreadedExecutor::run()
[component_container_mt-1] @ 0x7f5510cdc253 (unknown)
[component_container_mt-1] @ 0x7f5510894ac3 (unknown)
[component_container_mt-1] @ 0x7f5510926850 (unknown)
[ERROR] [component_container_mt-1]: process has died [pid 1832630, exit code -6, cmd '/opt/ros/humble/lib/rclcpp_components/component_container_mt --ros-args -r __node:=pointcloud_container -r __ns:=/ -p use_sim_time:=False -p wheel_radius:=0.383 -p wheel_width:=0.235 -p wheel_base:=2.79 -p wheel_tread:=1.64 -p front_overhang:=1.0 -p rear_overhang:=1.1 -p left_overhang:=0.128 -p right_overhang:=0.128 -p vehicle_height:=2.5 -p max_steer_angle:=0.7'].
Let's discuss this at tomorrow's meeting.
@mitsudome-r -san, I guess, I found the problem. When we start to publish the empty pointcloud before the initialization, it causes the crash above. We should publish the pointcloud message after the vehicle is initialized. I tried 7 times in planning_control mode and I didn't get the error we mentioned above. When you have time, could you test it again with the latest commit?
Very nice work @brkay54 I tried this PR on my own computer and I think a few minor improvements can be made.
-
Firstly, when running the planning_control mode without making any changes to the param file, including file paths, I noticed that even with invalid file paths in the param file, the node worked without giving any error or warning. You can throw an error when an invalid file path is given to make sure the user can see the results after testing.
-
Secondly, in the scenario created for the planning_control mode, the vehicle starts driving and stops for an object close to the goal point, abruptly ending the test. However, since the object is far from the ego's starting point, it may not be immediately clear whether there is an object at that point until the vehicle moves forward for a while. This could lead to confusion about why the test ends at that specific point. To improve clarity, you can add a marker symbolizing the object there or start the next test a few seconds after the vehicle has stopped completely.
-
When I ran the perception_planning mode (with no changes made to the param file other than the bag and output file paths), I encountered an issue where the test did not complete. Although the vehicle was initialized, the goal was set, and the route was generated with objects properly detected, the test did not proceed beyond this point. No output file was created. However, when I commented out the control topics in the yaml file and retried, the tests were completed successfully, and the result file was created. In this regard, it would be useful for users to specify the reaction topics that the mods expect separately or to add a warning about this to the readme.
Also, I did not encounter any node crashes like in the last comment. I think the README file was quite descriptive. Overall, it's a well-done piece of work!
@beyzanurkaya Thank you for the review.
Firstly, when running the planning_control mode without making any changes to the param file, including file paths, I noticed that even with invalid file paths in the param file, the node worked without giving any error or warning. You can throw an error when an invalid file path is given to make sure the user can see the results after testing.
I have added a condition for checking whether the output path is valid or not at the beginning of the node.
Secondly, in the scenario created for the planning_control mode, the vehicle starts driving and stops for an object close to the goal point, abruptly ending the test. However, since the object is far from the ego's starting point, it may not be immediately clear whether there is an object at that point until the vehicle moves forward for a while. This could lead to confusion about why the test ends at that specific point. To improve clarity, you can add a marker symbolizing the object there or start the next test a few seconds after the vehicle has stopped completely.
Thank you for the suggestion. I added a debug marker for the entity that will be spawned.
When I ran the perception_planning mode (with no changes made to the param file other than the bag and output file paths), I encountered an issue where the test did not complete. Although the vehicle was initialized, the goal was set, and the route was generated with objects properly detected, the test did not proceed beyond this point. No output file was created. However, when I commented out the control topics in the yaml file and retried, the tests were completed successfully, and the result file was created. In this regard, it would be useful for users to specify the reaction topics that the mods expect separately or to add a warning about this to the readme.
Because the vehicle is not moving in perception_planning mode, the control topics may not react. Thus the reaction_analyzer waits for them to react. I added this warning in the readme, I also added a warning message prints reaction_analyzer is waiting for which node.
I appreciate your review. Could you also try with the last commit?