[ros-users] Smach Concurrence transitions
Wim Meeussen
meeussen at willowgarage.com
Thu Feb 24 18:29:04 UTC 2011
> I want to pass an output of an action in a state, lets say State_A, into
> another state State_B. State_B is inside a Concurrence but State_A is
> outside of it. Is this possible?
>
> So far I have managed to pass parameters by using userdata, result_slots
> and remapping between states in the same state_machine.
> However, when one state is inside a Concurrence, it complains that
> userdata is empty.
Passing userdata is the right mechanism to get data from one state to
another state. If you want e.g. userdata 'B_data' from state B to get
outside of the concurrence container, you need to:
* Make sure 'B_data' is available inside the container [1]. So you do
exactly the same as when you want to pass userdata between two states
in the same container.
* Specify 'B_data' as an output_key of the container [2]. This will
make 'B_data' available to peers of the container.
[1] http://www.ros.org/wiki/smach/Tutorials/User%20Data
[2] http://www.ros.org/wiki/smach/Tutorials/Concurrence%20container
Hope this helps,
Wim
--
--
Wim Meeussen
Willow Garage Inc.
<http://www.willowgarage.com)
More information about the ros-users
mailing list