Skip to content

Instantly share code, notes, and snippets.

@jbohren
Created March 15, 2015 17:53
Show Gist options
  • Save jbohren/085c529c9063aed64386 to your computer and use it in GitHub Desktop.
Save jbohren/085c529c9063aed64386 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import rospy
from std_msgs.msg import Empty
def cb(msg, args):
a1, a2, a3 = args
rospy.logwarn('args: %s %d %g' % (a1, a2, a3))
rospy.init_node('cb_args')
s = rospy.Subscriber('/e',Empty,cb,callback_args=['a',1,5.5])
rospy.spin()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment