-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
provide message validation check API #4206
Conversation
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good for a first go! I think it has some linting issues and needs to add unit tests for each of the functions, but overall with a few trivial changes this looks like a good starting point!
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
I've updated some conditions in validateMsg(), but I've encountered a few details that need addressing. I'll take some time to figure out how to resolve them. However, I'll go ahead and update my current code to share my progress here~ ^_^ |
Great, thanks! I'm giving it a once over but only thing that is clearly missing is just the unit tests / linting so that it meets our quality specs for Nav2 contributions! Thanks for this! After this is done, I think this would make a really nice, short, confined undergraduate / jr graduate student project to finish this up with other messages and use it across the stack. It would let them think about some of the important needs for production systems and be able to touch alot of places in Nav2 to learn and grow. If you had any students in mind, let me know! Else, I'm sure I can find one. |
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
1 similar comment
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
About the time-stamp of map messagecurrent code for updating the time-stampin this way, we would NOT update the stamp successfully. Though I'm not very clear about the reson , but we can prove it by following inserted code: //goes insert
updateMsgHeader();
std::cout <<
"[GOES|DEBUG] [map_io]: msg.header.stamp.sec: " << msg_.header.stamp.sec << std::endl
<< "msg_.header.stamp.nanosec" << msg_.header.stamp.nanosec << std::endl;
std::cout <<
"[GOES|DEBUG] [map_io]: msg_.info.map_load_time.sec : " << msg_.info.map_load_time.sec << std::endl
<< "msg_.header.msg_.info.map_load_time.nanosec" << msg_.info.map_load_time.nanosec << std::endl;
// insert end then , we could catch the log as following:
suggested way to update the time-stampI've tried to update the stamp in another way, like following: void MapServer::updateMsgHeader()
{
rclcpp::Clock clock(RCL_SYSTEM_TIME);
msg_.info.map_load_time = clock.now();
msg_.header.frame_id = frame_id_;
msg_.header.stamp = clock.now();
} then , we could catch the log as following, which shows a successful result.
In addition, the message received by header:
stamp:
sec: 1712393583
nanosec: 750836020
frame_id: map
info:
map_load_time:
sec: 1712393583
nanosec: 750835026
resolution: 0.05000000074505806 |
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
That's not a solution unfortunately since we don't always run in ROS (i.e. simulation) time. The clock of the node should be set to the right time source. Does the timestamp not get populated from the service call as well or just on the |
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
I fix some typo this time. the reason why time-stamp of message from map-server is (zero,zero)After some experiments, it seems clear for me that updateMsgHeader as following would bring non-zero time ONLY after void MapServer::updateMsgHeader()
{
msg_.info.map_load_time = now();
msg_.header.frame_id = frame_id_;
msg_.header.stamp = now();
} SO, here's still the trouble that : map_server only send map-message once during Here's some different ways I come up with to solve the trouble:
void MapServer::updateMsgHeader()
{
rclcpp::Clock clock(RCL_SYSTEM_TIME);
msg_.info.map_load_time = clock.now();
msg_.header.frame_id = frame_id_;
msg_.header.stamp = clock.now();
} I'm not very sure if there are any better methods available, or which one among these methods is most suitable. I should primarily rely on your advice regarding which direction to proceed with modifications. : ) |
Lets do that. Also please pull in main or rebase so CI can run. you also have a couple linting problems that the Actions job identified. After that, this should be good to merge! |
if (!validateMsg(msg.w)) {return false;} | ||
|
||
// logic check | ||
// 1> the quaternion should be normalized: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for the comments -- checking the normalization is the same as any distance calculation sqrt(componentA*componentA + componentB*componentA + ...)
add validation check for map-message in `nav2_amcl` Signed-off-by: goes <GoesM@buaa.edu.cn>
Signed-off-by: goes <GoesM@buaa.edu.cn>
Signed-off-by: goes <GoesM@buaa.edu.cn>
Signed-off-by: goes <GoesM@buaa.edu.cn>
Signed-off-by: goes <GoesM@buaa.edu.cn>
Signed-off-by: goes <GoesM@buaa.edu.cn>
Signed-off-by: goes <GoesM@buaa.edu.cn>
Signed-off-by: goes <GoesM@buaa.edu.cn>
* Let BtActionServer overwrite xml Co-authored-by: Johannes Huemer <johannes.huemer@ait.ac.at> Signed-off-by: Johannes Huemer <johannes.huemer@ait.ac.at> Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> * Make a ROS parameter for it Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> * Rename flag to always reload BT xml file Signed-off-by: Johannes Huemer <johannes.huemer@ait.ac.at> --------- Signed-off-by: Johannes Huemer <johannes.huemer@ait.ac.at> Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> Co-authored-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> Signed-off-by: goes <GoesM@buaa.edu.cn>
* Set smaller timeout for service node Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> * Fix timeout calculation for service node Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> * Add a feasible timeout also for action node Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> --------- Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> Signed-off-by: goes <GoesM@buaa.edu.cn>
* 18.5% performance improvement in MPPI * adding in path angle update * path align improvements * adding views * more updates with some TODOs * massive improvements to cost critic * remove TODOs * removing some jitter * updates * use fabs * 1ms saved baby! * completed optimizations * remove TODO * linting * fixing test failure * indexing fix * fix bug * make MPPI default for Jazzy * Adding higher velocity limits --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: goes <GoesM@buaa.edu.cn>
* attempt to fix 22.04 CI * adding inline comment reminder Signed-off-by: goes <GoesM@buaa.edu.cn>
* Add API to gracefully cancel a controller Signed-off-by: Ramon Wijnands <ramon.wijnands@nobleo.nl> * Add `cancel_deceleration` to RegulatedPurePursuitController Signed-off-by: Ramon Wijnands <ramon.wijnands@nobleo.nl> * Update nav2_regulated_pure_pursuit_controller/src/parameter_handler.cpp Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: Ramon Wijnands <ramon.wijnands007@gmail.com> --------- Signed-off-by: Ramon Wijnands <ramon.wijnands@nobleo.nl> Signed-off-by: Ramon Wijnands <ramon.wijnands007@gmail.com> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: goes <GoesM@buaa.edu.cn>
* Refactor the plugin names for bt_navigator to use double colons Signed-off-by: Alan Xue <alan.xuefei@googlemail.com> * Refactor the plugin names for planner_server to use double colons Signed-off-by: Alan Xue <alan.xuefei@googlemail.com> * Refactor the plugin names for behavior_server to use double colons Signed-off-by: Alan Xue <alan.xuefei@googlemail.com> --------- Signed-off-by: Alan Xue <alan.xuefei@googlemail.com> Signed-off-by: goes <GoesM@buaa.edu.cn>
* remove unused header Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * First step. Return an optional value instead of user provided output. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Second step, update the consumers of this utility function Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Third step: swap source/target to make it consistent with tf lookups Otherwise is very confusing for any user who is user to the tf2::Buffer::lookupTransform method Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * transform tolerance -> transform timeout I find this "transform tolerance" to specify something else. Once again, I believe that sticking to tf2 name conventions is better and improve readability for users already used to the tf2 API Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Last step, convert functions to template functions This allow us to also query for the TransformStamped message from the lookupTransform method. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Add nodiscard to avoid confusiong API calls Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Update docs Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Revert "transform tolerance -> transform timeout" This reverts commit ca7d06b. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Fix linter 🤦 Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * reset to main Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Add 2 new utils functions to query transforms using messages Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Move utility function to base class to reuse implementation Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Fix Typo Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> --------- Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> Signed-off-by: goes <GoesM@buaa.edu.cn>
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: goes <GoesM@buaa.edu.cn>
…ult migration (#4236) * Adding config file for DWB to exercise in system tests from MPPI default migration * adding collision monitor * EOF line * correct plugin names * removing excess plugin defs Signed-off-by: goes <GoesM@buaa.edu.cn>
* Scale cost critic's weight when dynamically updated Signed-off-by: pepisg <pedro.gonzalez@eia.edu.co> * sign off Signed-off-by: pepisg <pedro.gonzalez@eia.edu.co> --------- Signed-off-by: pepisg <pedro.gonzalez@eia.edu.co> Signed-off-by: goes <GoesM@buaa.edu.cn>
Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl> Signed-off-by: goes <GoesM@buaa.edu.cn>
…map yaml. (#4258) * Add user home expander of home sequence Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Add passing home dir as string instead of const char* Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Add docs Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Fix function declaration Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Fix linter issues Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Uncrustify linter Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Uncrustify linter Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Uncrustify linter: remove remove whitespace Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> --------- Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> Signed-off-by: goes <GoesM@buaa.edu.cn>
* optimizations * Update test_nodehybrid.cpp Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: goes <GoesM@buaa.edu.cn>
* Set start and goal as float Signed-off-by: Brice <brice.renaudeau@gmail.com> * fix worldToMapContinuous type Signed-off-by: Brice <brice.renaudeau@gmail.com> * add static_cast<float> Signed-off-by: Brice <brice.renaudeau@gmail.com> * fix linting Signed-off-by: Brice <brice.renaudeau@gmail.com> * floor float to check start = goal Signed-off-by: Brice <brice.renaudeau@gmail.com> --------- Signed-off-by: Brice <brice.renaudeau@gmail.com> Signed-off-by: goes <GoesM@buaa.edu.cn>
* Adding new velocity deadband critic. - add some tests - cast double to float - add new features from "main" branch - fix formating - add cost test - fix linting issue - add README Signed-off-by: Denis Sokolov <denis.sokolov48@gmail.com> * Remove velocity deadband critic from defaults Signed-off-by: Denis Sokolov <denis.sokolov48@gmail.com> * remove old weight Signed-off-by: Denis Sokolov <denis.sokolov48@gmail.com> * fix velocity deadband critic tests Signed-off-by: Denis Sokolov <denis.sokolov48@gmail.com> --------- Signed-off-by: Denis Sokolov <denis.sokolov48@gmail.com> Signed-off-by: goes <GoesM@buaa.edu.cn>
* changed slam launch file according to the comments for the PR #4211 Signed-off-by: Ibrahim Özcan <ibrahim.ozcan@rwth-aachen.de> * Fixing litning problems --------- Signed-off-by: Ibrahim Özcan <ibrahim.ozcan@rwth-aachen.de> Co-authored-by: Ibrahim Özcan <ibrahim.ozcan@rwth-aachen.de> Signed-off-by: goes <GoesM@buaa.edu.cn>
Signed-off-by: goes <GoesM@buaa.edu.cn>
Signed-off-by: goes <GoesM@buaa.edu.cn>
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
Signed-off-by: goes <GoesM@buaa.edu.cn>
Signed-off-by: goes <GoesM@buaa.edu.cn>
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
Signed-off-by: goes <GoesM@buaa.edu.cn>
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
Oops, I noticed that the CI test failed due to the spin_behavior_test, which doesn't seem to be caused by the validation_message. |
This pull request is in conflict. Could you fix it @GoesM? |
Dont worry about the spin test - its flaky. You do though have a conflict you need to resolve before we can merge & Also, your pull / rebase did not work correctly, you have all of the commits from the work where this should only contain your commits by rebasing the branch on main or pulling in changes. Please fix this so that we only have your contributions in this PR 😄 Edit: It looks like that test was also flaky, you may ignore. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4206 +/- ##
==========================================
- Coverage 90.01% 89.64% -0.37%
==========================================
Files 432 435 +3
Lines 19406 19738 +332
==========================================
+ Hits 17469 17695 +226
- Misses 1937 2043 +106 ☔ View full report in Codecov by Sentry. |
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
I think my rebase did not work correctly and I believe it's more wise for me to open another PR #4276 |
Basic Info
Description of contribution in a few bullet points
nav2_util
pkgnav2_amcl
formap
message to avoid heap-buffer-overflow bug mentioned in Validate messages in subscription callbacks for critical error in population #4177Description of documentation updates required from your changes
validate_message.hpp
, which provide a structure of message-validation-check innav2_util
nav2_amcl
Future work that may be required in bullet points
For Maintainers: