ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I have resolved the issue.. I just changed the sequence of the code.
Previously: class MyFsm: def __init__(self): self.pub = rospy.Publisher('state', State, queue_size=10) self.server = rospy.Service('transition', MyService, self.handle_trigger_transition) #self.duration = rospy.get_param("Duration") self.timer = rospy.Timer(rospy.Duration(0.5), self.my_callback(self)) self.state = State.START
2 | No.2 Revision |
I have resolved the issue.. I just changed the sequence of the code.
Previously:
class MyFsm:
def __init__(self): self.pub = rospy.Publisher('state', State, queue_size=10) self.server = rospy.Service('transition', MyService, self.handle_trigger_transition) #self.duration
self.timer = rospy.Timer(rospy.Duration(0.5), self.my_callback(self)) self.state = State.START
Now: class MyFsm: def __init__(self): self.pub = rospy.Publisher('state', State, queue_size=10) self.state = State.START self.server = rospy.Service('transition', MyService, self.handle_trigger_transition) self.timer = rospy.Timer(rospy.Duration(0.5), self.my_callback)
It solved the issue..!
3 | No.3 Revision |
I have resolved the issue.. I just changed the sequence of the code.
Previously:
Previously:
class MyFsm:
def __init__(self):
self.pub = rospy.Publisher('state', State, queue_size=10)
self.server = rospy.Service('transition', MyService, self.handle_trigger_transition) #self.duration = rospy.get_param("Duration") self.duration = rospy.get_param("Duration")
self.timer = rospy.Timer(rospy.Duration(0.5), self.my_callback(self))
self.state = State.STARTState.START
Now:
Now:
class MyFsm:
def __init__(self):
self.pub = rospy.Publisher('state', State, queue_size=10)
self.state = State.START
self.server = rospy.Service('transition', MyService, self.handle_trigger_transition)
self.timer = rospy.Timer(rospy.Duration(0.5), It solved the issue..!