-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add rmw zenoh to nightly ci builds #5516
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
base: main
Are you sure you want to change the base?
Conversation
|
Two of the tests are still failing, this PR is not ready for review |
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.
Please leave the default as is before merging, but I understand it’s useful to test in CI for now.
Also, why did the docking test need to be updated? Did you find root cause or is that a workaround for zenoh to work? If a workaround, that might indicate a problem in the RMW if there’s not a logical error in the test.
Will do after all tests pass
I will explain the changes I made to the test here:
I can actually reproduce this as well in cyclonedds when running 1000 times repeatedly
We can actually decrease |
|
Ok sounds good to me. I might prefer spinning for those 10ms rather than having a background spin & 10ms sleeps, but I generally don’t nitpick over tests. Are you working on the last failure in CI? The rest LGTM |
Yes, it looks like that we need to overwrite the zenoh config at least for the CI ros2/rmw_zenoh#783 (comment), what do you think about that? |
|
It seems to me like something that should be addressed in the RMW / Zenoh layers. If this is a quirk of ROS 2, then either that should change, RMW Zenoh should adjust, or the default configurations should handle it. |
I share the same opinion. Admittedly, I am not a zenoh expert, so I think I might need to leave this PR open until we can find a solution together with the zenoh maintainers |
|
OK - did you open a ticket on this with the RMW? Might be good and then link this PR |
Good idea, I have open a new issue in the rmw repo |
|
This pull request is in conflict. Could you fix it @mini-1235? |
Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: mini-1235 <[email protected]>
f60a807 to
723ac34
Compare
Signed-off-by: Maurice <[email protected]>
723ac34 to
044b6ec
Compare
|
@SteveMacenski, I have just rebased this, now waiting for next rmw zenoh's release to pass all tests |
|
OK! Ping me when we can take a look again! |
I tried using
New test failing, and this is exactly the same error reported in #5470, I will try to reproduce it locally |
|
I cannot reproduce this locally, but I think I understand the cause. When AMCL is on configure stage, it calls navigation2/nav2_amcl/src/amcl_node.cpp Line 75 in 47327a5
In the function, it uses the variable navigation2/nav2_amcl/src/amcl_node.cpp Lines 1453 to 1460 in 47327a5
However, this two variables are initialized later when calling navigation2/nav2_amcl/src/amcl_node.cpp Line 80 in 47327a5
That's probably why we are seeing NaNs here #5470 (comment) I think we need to move |
Signed-off-by: mini-1235 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 7 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
@SteveMacenski All tests passing now! If you agree to all my changes here, I can switch back the default to |
| rclcpp::CallbackGroupType::MutuallyExclusive, false); | ||
| initParameters(); | ||
| initTransforms(); | ||
| initOdometry(); |
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.
I think this needs to be after init pubsub and init services in order to be able to have last_published_pose_ be usable
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.
Looking at the ros(1) code, https://github.com/ros-planning/navigation/blob/f44bb1fc2810399165115cc98b530fe4b9397c18/amcl/src/amcl_node.cpp#L793-L833, I think the init_pose_ is either [0,0,0] or [initial_pose_x,y,yaw] when set_initial_pose_ is enabled
However, I cannot find the parameters initial_cov_xx, initial_cov_yy in our code. Maybe it is removed at some point in Nav2?
So, I think
navigation2/nav2_amcl/src/amcl_node.cpp
Lines 102 to 115 in 8dbc929
| if (set_initial_pose_) { | |
| auto msg = std::make_shared<geometry_msgs::msg::PoseWithCovarianceStamped>(); | |
| msg->header.stamp = now(); | |
| msg->header.frame_id = global_frame_id_; | |
| msg->pose.pose.position.x = initial_pose_x_; | |
| msg->pose.pose.position.y = initial_pose_y_; | |
| msg->pose.pose.position.z = initial_pose_z_; | |
| msg->pose.pose.orientation = orientationAroundZAxis(initial_pose_yaw_); | |
| initialPoseReceived(msg); | |
| } else if (init_pose_received_on_inactive) { | |
| handleInitialPose(last_published_pose_); | |
| } |
and
initOdometry should be called before initParticleFilter
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.
I am not familiar with the amcl codebase, so I may have missed something. A simpler option would be initializing init_pose_ to [0,0,0] in the constructor so that there will be no garbage value when configuring amcl
.circleci/config.yml
Outdated
| # Start zenohd daemon only if using rmw_zenoh_cpp | ||
| if [ "$RMW_IMPLEMENTATION" = "rmw_zenoh_cpp" ]; then | ||
| . /opt/ros/$ROS_DISTRO/setup.sh | ||
| ros2 run rmw_zenoh_cpp rmw_zenohd & |
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.
Is doing this in the CI config the prevailing thought from the threads you brought up for how to handle this? I was kind of hoping for ros2 launch to deal with this so it was in the application code -- i.e. StartZenohRouter() method that we can do conditionally when the RMW implementation is set to zenoh.
... Actually, can we do that instead? Create in nav2_common that ros2 launch action and use the condition for checking that environnmental variable?
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.
Is doing this in the CI config the prevailing thought from the threads you brought up for how to handle this?
They provide CMake functions like ament_add_ros_isolated_xxxx to help when testing using RMW Zenoh
What I was thinking is that my solution would be more straightforward, especially since manually starting the Zenoh router will not be required in the future according to their README.
If you prefer to go with ament_add_ros_isolated I can add it :)
Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: mini-1235 <[email protected]>
Basic Info
Description of contribution in a few bullet points
Description of documentation updates required from your changes
Description of how this change was tested
Future work that may be required in bullet points
For Maintainers:
backport-*.