Skip to content
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

Joint Trajectory Server: Replace time.sleep() with rate.sleep() #153

Open
hello-amal opened this issue Jul 30, 2024 · 0 comments
Open

Joint Trajectory Server: Replace time.sleep() with rate.sleep() #153

hello-amal opened this issue Jul 30, 2024 · 0 comments

Comments

@hello-amal
Copy link
Contributor

Currently, the Joint Trajectory Server (JTS) uses time.sleep() to control the loop rate. This blocks the thread that is currently executing the action e.g., that thread cannot be used for other work while sleeping. That might be okay because the sleep is just for 0.1 seconds, but it may be better to replace it with a rate.sleep() which handles control of the thread back to the executor, and uses the next available thread when the sleep is done. However, making this change could introduce other issues (like not having threads available when the sleep is done). Thus, this change should be coupled with thorough testing to ensure the JTS still executes as expected.

See this comment thread for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant