-
Notifications
You must be signed in to change notification settings - Fork 166
Add ability to preempt execution and add test #684
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
Conversation
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.
The original review comments (#363 (review)) still apply.
It would be much more reasonable to provide access to the ActionServer:
auto as = task.getExecutionActionServer()
auto goal_handle = as->async_send_goal(solution) // convert solution to goal and send it to action server
...
Additionally, I have a few other remarks:
- Your approach to reuse demo.launch.py from moveit_task_constructor_demo doesn't work as this is a downstream package of moveit_task_constructor_capabilities
- You don't use callback groups as in #363. Isn't that needed?
- The code is overly complex, partially. I will commit some simplifications.
Thanks for the simplifications and updates Robert!
The problem with this approach is that the user would need access to the
I also looked into having the user pass in their own node to The user can always create their own ActionClient and node to handle request as they see best if they need fine control over execution. Given that
I can copy the launch file into the execution test or move it over to the demo package, do you have a preference on how I fix this?
I did not find it a requirement for the ActionServer to be |
Agreed. Given that situation, handling the cancellation internal to task seems reasonable.
Could you simply reuse |
I'm still looking into this but wouldn't it still require a busy loop blocking |
No. I think you would simply use the existing code: |
So sorry, I though I hit quote and it edited your post 😊.
|
Really? Is that documented somewhere? What happens if one spins a node from several threads simultaneously? |
I was actually thinking of calling spin multiple times on an executor. For example the single_threaded_executor throws an exception if you do this. I tried saving the goal handle and moved the cancel call to
To fix this I tried to make sure the thread was joinable but it still segfaults so I suspect something is going out of scope when cancel and
Removing waiting for the cancel result in |
Why does move_group crash on shutdown? This shouldn't happen. |
This reverts commit 7b63c9866c81ebbcaa0a9e9d005760a742e967ea.
This crash is flaky. With the asan build move_group seems to crash even before running the test binary. |
move_group has been flaky at shutting down for me for quite a while. Here is the crash I normally see.
|
I pulled
|
This reverts commit 3fc04e3.
If planning fails, we cannot access the solution...
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## ros2 #684 +/- ##
==========================================
+ Coverage 42.47% 49.69% +7.22%
==========================================
Files 83 99 +16
Lines 8086 8967 +881
==========================================
+ Hits 3434 4455 +1021
+ Misses 4652 4512 -140 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@rhaschke I was able to reproduce the issue locally by pulling Plugin loading when using -fsanitize=address strongly suggests an ABI incompatibility or a runtime linking issue between the plugin compiled with AddressSanitizer and other parts of the ROS 2 system (like class_loader, move_group itself, or underlying libraries) that were not compiled with it. From my research, if you link or dynamically load modules where some are instrumented and some are not, you can run into crashes, especially around memory allocation/deallocation or when the sanitizer's runtime tries to manage state across these boundaries. Do we have access to a docker container with MoveIt also built with |
This PR is an update of #363 and adds a test to ensure it is working as expected.
Additional changes I made to make it possible:
Task
Extended testing of my motion system has found that recreating the node on each execution request can cause a seg fault after many hours of running. I am continuing to test this and will update with any results, but if you feel this is out of scope I can move this feature to a different PR. Here is a link to the upstream issue with cyclonedds and changes they have made.