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

Added target_frequency to RTDEClient #85

Merged

Conversation

jornb
Copy link

@jornb jornb commented Aug 5, 2021

For some scenarios, e.g. state monitoring, 500 Hz is overkill, and may lead to performance issues on some platforms or with multiple RTDE clients.

This PR adds a target_frequency argument to the RTDE constructor, defaulting to the maximum frequency (i.e. 125 or 500).

Copy link
Collaborator

@fmauch fmauch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

I added some minor comments, but I think there's also one major thing that could be changed: The max_frequency_ member doesn't make much sense anymore. It could at least be a local variable instead.

src/rtde/rtde_client.cpp Outdated Show resolved Hide resolved
src/rtde/rtde_client.cpp Outdated Show resolved Hide resolved
src/rtde/rtde_client.cpp Outdated Show resolved Hide resolved
@jornb
Copy link
Author

jornb commented Aug 18, 2021

Updated now based on previous review by @fmauch.

I agree with the max_frequency_ field. However, I saw that it was used in RTDEClient::getMaxFrequency(), so I left it there, since it is not determined until call to RTDEClient::init().

Copy link
Collaborator

@fmauch fmauch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @jornb

@stefanscherzinger if you agree, please go ahead and merge this.

@stefanscherzinger stefanscherzinger merged commit 90338a7 into UniversalRobots:master Aug 20, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants