feedback frequency and getNextFeedback #105
-
According to the document (https://docs.hebi.us/tools.html#cpp-feedback, https://docs.hebi.us/tools.html#get-next-feedback-2) and example,
we set feedback frequency for a background thread on host computer to collect feedbacks from actuators. We call getNextFeedback to get the next new (not previously accessed) synchronized feedback. If F2 is faster than F1, the getNextFeedback call blocks, according to the document. Thank you very much.
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
getNextFeedback always returns the latest state or blocks until a new state is available. If F2 is slower than F1, it will end up skipping some measurements rather than adding lag by buffering. The only exception to this are offline log-groups where getNextFeedback always advances by one.
|
Beta Was this translation helpful? Give feedback.
-
Cool, that is perfect! Thanks a lot :)
|
Beta Was this translation helpful? Give feedback.
-
A few more questions :mrgreen: So we have two loops in two threads,
(1) (2) (3) (4) Thanks a lot.
|
Beta Was this translation helpful? Give feedback.
-
Any update for the questions in the previous post, please?
|
Beta Was this translation helpful? Give feedback.
-
Sorry for the late response. For some reason we didn't see a notification about it.
I hope this answers your questions. Let me know whether we can help with anything else. If for some reason it takes 2+ days to respond, please feel free to also send an email on our support address.
|
Beta Was this translation helpful? Give feedback.
-
Ah yes! I forgot about feedback timeout!
|
Beta Was this translation helpful? Give feedback.
Sorry for the late response. For some reason we didn't see a notification about it.
Both F1 and F2 run concurrently in separate OS threads
Workflow:
a) F1 sends messages requesting feedback. This also increments the sequence number and sets the "pc transmit" timestamp. Afterwards, F1 goes to sleep for the specified period.
b) The receiving thread "F3" blocks on the udp socket for feedback responses
c) Each incoming feedback updates the corresponding index. This also sets the "pc receive" timestamp and the receive-sequence number.
d) After receiving at least one feedback message from every actuator, the messages get packaged together and are made available as "new feedback"
No, it wi…