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

reset hasUnprocessedData to prevent zero pulses being sent by mpExRcsIncrementMove after trajectory is finished #191

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

iydv
Copy link
Contributor

@iydv iydv commented Nov 16, 2023

Fix for #190 . Currently, hasUnprocessedData is never reset after the queue is fully processed inside Ros_MotionControl_IncMoveLoopStart, which means that empty queue is constantly being read and zero pulse increment is constantly being sent by mpExRcsIncrementMove

@iydv
Copy link
Contributor Author

iydv commented Nov 16, 2023

I have conducted a test similar to #190 and resulting debug log shows that FSU speed handling part still works fine but empty mpExRcsIncrementMove is no longer sent when trajectory is finished.
20231116T135527_motoros2_debug_log.txt

@ted-miller ted-miller added this to the 0.1.2 milestone Nov 17, 2023
@ted-miller
Copy link
Collaborator

Hi @iydv
Good catch. I definitely missed that during testing.

This won't work for a multi-group system. The hasUnprocessedData would get cleared when calculating for R2.

I think we can simply move the hasUnprocessedData = FALSE; up a few lines so that it outside of the for-each-group loop.

What do you think?

@iydv
Copy link
Contributor Author

iydv commented Nov 17, 2023

Yes, you are right, I forgot about the multi-group system. I guess it should be moved here .

@ted-miller
Copy link
Collaborator

Looks good to me. My system is currently configured for single-group. But I should be able to reconfigure it on Wednesday for a quick test.

Copy link
Collaborator

@ted-miller ted-miller left a comment

Choose a reason for hiding this comment

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

Test was ok. Thanks for the fix.

@ted-miller ted-miller merged commit b6cc757 into Yaskawa-Global:main Nov 22, 2023
6 checks passed
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.

mpExRcsIncrementMove is constantly sending zero pulse increments after each motion
2 participants