ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Additionally to the answer presented you can use a lambda like:
def callback(data, dict_1, dict_2):
...
callback_lambda = lambda x: callback(x,dict_1,dict_2)
sub = rospy.Subscriber("text", String, callback_lambda)
This was useful to me since the version of ROS I was using (hydro) did not seem to have callback_args implemented yet.
2 | No.2 Revision |
Additionally to the answer presented you can use a lambda like:
def callback(data, dict_1, dict_2):
...
callback_lambda = lambda x: callback(x,dict_1,dict_2)
sub = rospy.Subscriber("text", String, callback_lambda)
This was useful to me since the version of ROS I was using (hydro) did not seem to have callback_args (see http://docs.ros.org/melodic/api/rospy/html/rospy.topics.Subscriber-class.html) implemented yet. yet.