ros-industrial / abb_libegm

A C++ library for interfacing with ABB robot controllers supporting Externally Guided Motion (689-1)
BSD 3-Clause "New" or "Revised" License
93 stars 53 forks source link

Added an optional condition variable for notifying external control loops #116

Closed jontje closed 3 years ago

jontje commented 3 years ago

As per title.

This can for example be useful when having multiple communication channels. I.e. for getting a notification that any of the channels have received an EGM message.

gavanderhoorn commented 3 years ago

Can you explain a little more about how this is supposed to be used by users of this library?

Exposing variables is not something I typically like to do. Could a callback based interface not be used?

jontje commented 3 years ago

Can you explain a little more about how this is supposed to be used by users of this library?

This PR adds the possibility to use a condition variable, for which a user can get a notification on that an EGM message has arrived on a given EGM communication channel.

Example:

At least this is the idea, and I hope I my description isn't too unclear.

Exposing variables is not something I typically like to do. Could a callback based interface not be used?

I guess, but I will unfortunately not have time to rework this right now due to time constraints.

The optional condition variable felt like a minimal intrusion.