Republish a message already existed with Header

asked 2017-01-07 20:03:38 -0500

Marcosdp gravatar image

updated 2017-01-07 21:54:22 -0500

ahendrix gravatar image

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(): 
    h = std_msgs.msg.Header()
    h.stamp =
    pub = rospy.Publisher('bumpermio',bumpermsg, queue_size=10)
    bumperob= bumper(h,pub)
    rospy.Subscriber("/mobile_base/events/bumper",BumperEvent, bumperob.callback)   
edit retag flag offensive close merge delete



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.

ahendrix gravatar image ahendrix  ( 2017-01-07 22:00:12 -0500 )edit

And show all the code. Where is the callback?

NEngelhard gravatar image NEngelhard  ( 2017-01-08 03:31:28 -0500 )edit