-
Notifications
You must be signed in to change notification settings - Fork 291
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
spawner.py in controller_manager is a bit unstable #475
Comments
Very strange that this happens though. One would think that
Maybe I'm missing something... I'm using a custom |
Update: |
Needed to be able to start my robot base reliably, so added this to my fork for now: |
@samiamlabs thanks you for your interest in the library. Indeed this seems to be a "bug" on your platform. We currently test everything on PC/laptops, and they are probably faster with spawning services after starting the Before we decide to increase this wait time to Do I understand your problem correctly? |
I don't completely understand the problem myself at the moment. Increasing the sleep to 1.0 only made the issue less frequent, but it still crashed sometimes for me. It's possible that I think it is more likely that My current understanding is that "wait_for_service" is only supposed to check if relevant topics are available etc, not if, for example, something is blocking a single tread executor from processing callbacks in the action server node. |
@samiamlabs I think you understood this correctly. There is basically a timeout between of I am currently working on control of HW's lifecycle, and this can lead that we start hardware asynchronously from the main CM thread. Still, this would probably lead to spawners making successful service calls, but their execution will fail if hardware is not ready. In that case, we would probably need a "retry_times" parameter in spawner. For now, it could be safe to timeout even longer than 10 seconds. This should also help (if |
This issue I believe I solved now. If you guys find any new occurrence please feel free to reopen this issue or create a new one 👍 |
Hi folks!
Thank you for this project.
It feels like a big step up from the original ros_control framework in terms of design and architecture.
I started having some issues with loading the controllers reliably after I moved my code from my laptop to a Jetson Xavier and the launch file got bigger.
The spawner.py script sometimes throws an unhandled RuntimeError on this line:
ros2_control/controller_manager/scripts/spawner.py
Line 51 in 0393d59
RuntimeError: Could not contact service /controller_manager/list_controllers
If I increase the sleep here to 1.0 seconds, everything works fine:
ros2_control/controller_manager/scripts/spawner.py
Line 45 in 0393d59
It's probably better to catch the exception in and try again until the
list_controllers
service responds, right?Do you want me to make an attempt at a fix and submit it as a PR or do you prefer if someone in the project team looks at it?
The text was updated successfully, but these errors were encountered: