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

Servo cannot reach the desired control rate #2955

Closed
AndyZe opened this issue Aug 7, 2024 · 4 comments
Closed

Servo cannot reach the desired control rate #2955

AndyZe opened this issue Aug 7, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@AndyZe
Copy link
Member

AndyZe commented Aug 7, 2024

Description

Launch a Servo demo, e.g.

ros2 launch moveit_servo demo_ros_api.launch.py

ros2 run moveit_servo servo_keyboard_input

Monitor the joint command publication rate:

ros2 topic hz -w 500 /panda_arm_controller/joint_trajectory

It's nowhere close to the desired rate of 100 Hz. I get ~60 Hz. Not sure exactly when this regression happened but I suspect PR #2651.

@AndyZe AndyZe added the bug Something isn't working label Aug 7, 2024
@AndyZe
Copy link
Member Author

AndyZe commented Aug 7, 2024

It looks like changing to the online_signal_smoothing::ButterworthFilterPlugin instead of online_signal_smoothing::AccelerationLimitedPlugin does help, it increases the control rate to ~75 Hz. But that's still lower than the requested 100Hz, which used to be easy to achieve. Previously 1,000 Hz was achievable.

@sea-bass
Copy link
Contributor

sea-bass commented Aug 8, 2024

I see a lower rate when I try to toggle directions back and forth, maybe because there is some dead time in between switching keys somewhere between me and what servo receives.

But if I just hold down a button and go right into joint limits/singularity, I hit 100 Hz no problem on my 4 year old laptop?

servo_rate.mp4

@sea-bass
Copy link
Contributor

sea-bass commented Aug 8, 2024

Here's another one in which I am just spamming arrow keys in twist mode.

servo_rate_2.mp4

@AndyZe
Copy link
Member Author

AndyZe commented Aug 8, 2024

You're right, it must be some kind of Linux button debouncing issue.

@AndyZe AndyZe closed this as completed Aug 8, 2024
@github-project-automation github-project-automation bot moved this to ✅ Done in MoveIt Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants