Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def callback(data):
- rospy.loginfo (" Publisher1 Value %s ", custom_msg1.custom_string1)
- rospy.loginfo (" Publisher2 Value %s ", custom_msg2.custom_string2)
- rospy.loginfo (" Publisher3 Value %s ", custom_msg3.custom_string3)
- rospy.loginfo (" Publisher4 Value %s ", custom_msg4.custom_string4)
- rospy.loginfo (" float_publisher value %f ", data.float)
- def python_code():
- rospy.init_node("python_code")
- rospy.Subscriber("float_publisher",Float64,callback)
- rospy.Subscriber("publisher1", custom_msg1,callback)
- rospy.Subscriber("publisher2", custom_msg2,callback)
- rospy.Subscriber("publisher3", custom_msg3,callback)
- rospy.Subscriber("publisher4", custom_msg4,callback)
- rospy.loginfo(" Test: start spinning!")
- rospy.spin()
- rospy.loginfo("node has shutdown!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement