-
Notifications
You must be signed in to change notification settings - Fork 531
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
Consider simulated time #883
Conversation
Consider the simulated time in `CurrentStateMonitor::waitForCurrentState()`. Propagate the change in other packages and classes where necessary. Signed-off-by: Gaël Écorchard <gael.ecorchard@cvut.cz>
Back-ported in foxy in 307e0cc (https://github.com/galou/moveit2/tree/sim_time_wait_state_foxy). |
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.
This looks really good. Thank you for this change!
@@ -5,6 +5,7 @@ project(moveit_ros_planning_interface) | |||
find_package(moveit_common REQUIRED) | |||
moveit_package() | |||
|
|||
find_package(backward_ros) |
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 added this to moveit_common. I think by doing that it is already here from the moveit_package() call on line 6.
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'm sorry, I added this by mistake. I'll remove it but I first wait a bit if there is no other changes to carry out.
boost::shared_lock<boost::shared_mutex> lock(scene_update_mutex_); | ||
rclcpp::Time prev_robot_motion_time = last_robot_motion_time_; | ||
while (last_robot_motion_time_ < t && // Wait until the state update actually reaches the scene. | ||
timeout > std::chrono::seconds()) | ||
timeout > rclcpp::Duration(0)) |
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.
CI is failing because of this line I believe. The rclcpp::Duration(double)
constructor is deprecated. You should be able to get it to pass with this:
timeout > rclcpp::Duration(0)) | |
timeout > rclcpp::Duration::from_seconds(0)) |
or
timeout > rclcpp::Duration(0)) | |
timeout > rclcpp::Duration(0, 0)) |
Signed-off-by: Gaël Écorchard <gael.ecorchard@cvut.cz>
This pull request is in conflict. Could you fix it @galou? |
I fixed the merge conflict and re-triggered the CI jobs. I'll merge this once it passes. |
Codecov Report
@@ Coverage Diff @@
## main #883 +/- ##
==========================================
+ Coverage 60.81% 60.81% +0.01%
==========================================
Files 271 271
Lines 23815 23823 +8
==========================================
+ Hits 14481 14486 +5
- Misses 9334 9337 +3
Continue to review full report at Codecov.
|
Consider the simulated time in
CurrentStateMonitor::waitForCurrentState()
.Propagate the change in other packages and classes where necessary.
Signed-off-by: Gaël Écorchard gael.ecorchard@cvut.cz
Description
I had an issue with very slow simulated time where the robot status was not received within 1s of system time. This PR should solve the issue. The behavior with non-emulated time should not change.
Checklist