[ros-users] smach state transition latency
Wim Meeussen
meeussen at willowgarage.com
Fri Apr 22 16:22:18 UTC 2011
Travis,
> Even after my "fix" of eliminating the concurrency container, the problem
> persisted. I've now successfully reproduced the bug... basically, it occurs
> when you're trying to store large amounts of userdata in the smach system.
All userdata is sent to the smach_viewer over ROS. So when you have a
large userdata structure, all that data needs to get serialized and
send over the wire. I can imagine that can take a long time.
> See the attached program. It works fine when there is relatively little
> userdata content, but starts taking progressively more time to transition
> between states as the amount of userdata grows. This occurs even between
> transitions that do not use any userdata content.
>
> My guess: the userdata is being copied upon each transition. The attached
> code uses PoseArray datatypes; when using my own custom types, the
> (normally) 12-second program takes several minutes to execute!
>
> Again, I'm going to work around this problem in another (less ideal) way...
> but it seems like this is something of a bug. (Memory / variable
> management)
You're right, Smach could be smarter about when to send userdata over
the wire. Could you file a bug for this, and attach your example?
<https://code.ros.org/trac/ros-pkg/newticket?component=executive_smach&type=defect&&executive_smach>.
Thanks for tracking down this issue!
Wim
--
--
Wim Meeussen
Willow Garage Inc.
<http://www.willowgarage.com)
More information about the ros-users
mailing list