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

Add joint state publisher and periodic polling #2

Merged
merged 11 commits into from
Oct 19, 2023

Conversation

thettasch
Copy link

Added two complementary features to code:

Periodic Polling

Allows for the ACF telemetry to be published at a fixed frequency without requiring constant publishing on /ACF/force. Can be deactivated (by setting the frequency parameter to zero) to yield the old behavior.

Joint State Publisher

The latest position of the ACF can be published as a joint state, for simple integration with robot state publishers. This feature is best used in conjunction with periodic polling to give frequent joint state updates.

Reverse compatibility

When running the package without setting the new parameters (frequency and joint_name), behaviour is unaltered from before.

Tested and works on an ACF/111/04.

@gavanderhoorn
Copy link
Member

There is no way to get the ACF itself to periodically broadcast its state?

Polling is typically expensive, so is best avoided if possible.

Copy link
Member

@gavanderhoorn gavanderhoorn left a comment

Choose a reason for hiding this comment

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

Some comments.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/acf.py Outdated Show resolved Hide resolved
src/acf.py Outdated Show resolved Hide resolved
src/acf.py Outdated Show resolved Hide resolved
src/acf.py Show resolved Hide resolved
src/acf.py Outdated Show resolved Hide resolved
@thettasch
Copy link
Author

There is no way to get the ACF itself to periodically broadcast its state?

Polling is typically expensive, so is best avoided if possible.

For the TCP/IP Ethernet interface we're using, unfortunately the ACF only sends force/position information after receiving a command. Thus the necessity for polling to get frequent position updates.

@thettasch
Copy link
Author

Finished reviewing comments, have incorporated improvements/modifications where appropriate. Still need to test the modified code on the physical ACF.

@thettasch thettasch mentioned this pull request Oct 6, 2023
@thettasch
Copy link
Author

Tested on physical ACF, all appears to be working. Decided to move all topics/services to private naming (except for joint_states).

@thettasch
Copy link
Author

@Pugens This should now be ready to merge, unless there are any other minor changes to be made. We can handle the other issues/major changes in future PRs.

@gavanderhoorn
Copy link
Member

Friendly ping @Pugens.

@Pugens
Copy link
Collaborator

Pugens commented Oct 19, 2023

Went through the code comments and fixes again. Everything looks good, merging now

@Pugens Pugens merged commit 8abe875 into sam-xl:humble Oct 19, 2023
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.

3 participants