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()
Asked by Marcosdp on 2017-01-07 21:03:38 UTC
Comments
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.
Asked by ahendrix on 2017-01-07 23:00:12 UTC
And show all the code. Where is the callback?
Asked by NEngelhard on 2017-01-08 04:31:28 UTC