Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. def callback(data):
  2. rospy.loginfo (" Publisher1 Value %s ", custom_msg1.custom_string1)
  3. rospy.loginfo (" Publisher2 Value %s ", custom_msg2.custom_string2)
  4. rospy.loginfo (" Publisher3 Value %s ", custom_msg3.custom_string3)
  5. rospy.loginfo (" Publisher4 Value %s ", custom_msg4.custom_string4)
  6. rospy.loginfo (" float_publisher value %f ", data.float)
  7.  
  8. def python_code():
  9. rospy.init_node("python_code")
  10. rospy.Subscriber("float_publisher",Float64,callback)
  11. rospy.Subscriber("publisher1", custom_msg1,callback)
  12. rospy.Subscriber("publisher2", custom_msg2,callback)
  13. rospy.Subscriber("publisher3", custom_msg3,callback)
  14. rospy.Subscriber("publisher4", custom_msg4,callback)
  15. rospy.loginfo(" Test: start spinning!")
  16. rospy.spin()
  17. rospy.loginfo("node has shutdown!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement