You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to know if there is a way to use a struct method as callback similar to how class methods can be used in roscpp and rospy. On a very cursory look at some online threads, it seems rust is not very callback friendly, but I still wanted to know if there is a way to do it.
The text was updated successfully, but these errors were encountered:
The approach would be the same as any other callbacks in Rust. Just encapsulate the method into a callback.
So MyStruct::something would be called with move || my_struct.something(). If you do not want ownership to be given, you can use Arc.
I wanted to know if there is a way to use a struct method as callback similar to how class methods can be used in roscpp and rospy. On a very cursory look at some online threads, it seems rust is not very callback friendly, but I still wanted to know if there is a way to do it.
The text was updated successfully, but these errors were encountered: