[ros-users] [Discourse.ros.org] [Next Generation ROS] Callba…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Adam Seiwert via ros-users
Date:  
To: ros-users
CC: Adam Seiwert
Subject: [ros-users] [Discourse.ros.org] [Next Generation ROS] Callback Args in ROS2


Thanks for the feedback and sorry for the delayed response. I haven't filed a feature request yet but I did find a temporary fix. I was able to get similar functionality utilizing [partial functions in python](https://docs.python.org/3/library/functools.html#functools.partial).

For example:
```
from functools import partial
create_subscription(msg_type, ros_topic, partial(callback_function(), passed_variable))
```





---
[Visit Topic](https://discourse.ros.org/t/callback-args-in-ros2/4727/3) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list

http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>