Republish a message already existed with Header
Hey guys, I 'm trying to republish a bumper's message with Header for message_filters (I'm using rospy) but doesn't work.Help me this is my code:
import rospy
from kobuki_msgs.msg import BumperEvent
from bumpertest.msg import bumpermsg
import std_msgs.msg
def main():
rospy.init_node('bumpertest')
h = std_msgs.msg.Header()
h.stamp = rospy.Time.now()
pub = rospy.Publisher('bumpermio',bumpermsg, queue_size=10)
bumperob= bumper(h,pub)
rospy.Subscriber("/mobile_base/events/bumper",BumperEvent, bumperob.callback)
rospy.spin()
Saying "it doesn't work" doesn't help us help you. Please be specific, describe the expected behavior, what it actually does, and include any console output or stack traces that show how it doesn't work.
And show all the code. Where is the callback?