How can one pass userdata into a SMACH state machine wrapped by ActionServerWrapper
Hi all,
I am trying to execute a state machine via an Action Service Wrapper. I would like to pass in userdata which has multiple fields. Here's how I would typically call the state machine:
sm = Navigate()
userdata = smach.UserData()
userdata.map_loc_name = map_loc_name
sm.execute(userdata)
Here's how I'm currently using the ActionServerWrapper
asw = ActionServerWrapper(
'navigation_state_machine', New, sm,
['did_something','did_something_else'], ['aborted'], ['preempted'],
goal_key = 'map_loc_name',
result_key = 'egad_its_a_result' )
asw.run_server()
I was wondering if anyone has suggestions on how I might pass in userdata.
Thanks!
Asked by aceofspade on 2019-05-22 18:56:37 UTC
Comments
After searching, I found this: https://answers.ros.org/question/270600/can-actionserverwrapper-use-a-dynamically-set-smach-state/ which I believe answers my question. I will validate that this works on ROS Kinetic tomorrow.
Asked by aceofspade on 2019-05-23 02:03:26 UTC