No display when using smash viewer with ROS Kinetic

asked 2019-10-28 05:25:37 -0600

Alrevan gravatar image

Hello,

I have several state machine using smash in ROS kinetic but when I try to use smash viewer to display them, it does not display anything:

Screen

I believe my introspection servers are correct, here is an example:

def main():
rospy.init_node('mbf_state_machine')

mbf_sm = smach.StateMachine(outcomes=['aborted', 'succeeded', 'preempted'])
mbf_sm.userdata.path = Path()
mbf_sm.userdata.previous_state = None
mbf_sm.userdata.act_pos = None
mbf_sm.userdata.error = None
mbf_sm.userdata.error_status = None
mbf_sm.userdata.goal_position = None
mbf_sm.userdata.recovery_behavior = None
mbf_sm.userdata.clear_costmap_flag = False
mbf_sm.userdata.controller = 'eband'
mbf_sm.userdata.planner = 'planner'
mbf_sm.userdata.recovery_behaviors = ['clear_costmap', 'rotate_recovery']

with mbf_sm:
    smach.StateMachine.add('WAIT_FOR_GOAL',
                           WaitForGoal(),
                           transitions={'succeeded': 'MOVE_BASE',
                                        'preempted': 'preempted'})

    smach.StateMachine.add('MOVE_BASE',
                           smach_ros.SimpleActionState(
                               'move_base_flex/move_base',
                               MoveBaseAction,
                               goal_cb=move_base_goal_cb,
                               result_cb=move_base_result_cb
                           ),
                           transitions={
                               'success': 'WAIT_FOR_GOAL',
                               'general_failure': 'WAIT_FOR_GOAL',
                               'plan_failure': 'WAIT_FOR_GOAL',
                               'ctrl_failure': 'WAIT_FOR_GOAL',
                               'undefined_failure': 'aborted'}
                           )

sis = smach_ros.IntrospectionServer('mbf_move_base_server', mbf_sm, '/SM_ROOT')
sis.start()
outcome = mbf_sm.execute()
rospy.spin()
sis.stop()

Thanks for your help!

edit retag flag offensive close merge delete