ParallelRtActivities represent a bunch of RtActivities that are started in parallel in the same real-time context. A ParallelRtActivity makes it possible to actuate two or more devices/robots at once, since every child Activity of a ParallelActivity is auto-started at the same time. This way, an arm can move in a desired position while driving a platform on which the arm is mounted.
While very versatile in use, the following points should be kept in mind when operating with ParallelRtActivities:
1. Contradicted movements within the same device/robot are not allowed and will
lead the program to fail.
Example: If two Activities affect the same Actuator (e.g. Joint) and both
Activities need to move the Actuator in opposite directions, the program will
abort the entire ParallelActivity since such an action cannot be computed.
2. A ParallelRtActivity just STARTS every committed Activity at the same time,
meaning that every individual activity will finish at it’s own pace unless
parameterized accordingly.
3. A ParallelRtActivity is considered completed when all of its committed Activities
did execute and finished moving without fail.
4. If a preceding Activity ended in a ”‘Maintain”’ State, then the sum of
the devices controlled by the child-activities need to uphold that state too.
5. Likewise, if one of the child-Activities enters a ”‘Maintain”’-state, the entire
ParallelActivity will change to this after every child-Activity is finished and the
subsequent Activity must be capable of upholding this state.
6. The ParallelActivity can only be taken over by a subsequent Activity if EVERY
child has finished moving or allow takeover themselves.
7. Likewise, a preceded Activity can only be taken over if the child Activities (in
sum) are able to take over the Activity
How to create | Summary |
ParallelRtActivity(RtActivity... activities) | returns a ParallelRtActivity |
ParallelRtActivity(String name, RtActivity... activities) | returns a ParallelRtActivity with a given name |
Alternative: Invoke RtActivities.parallel(activities) | Returns an instantly created and anonymous ParallelRtActivity |
Methods | Summary |
addActivity(T activity); | -adds an activity into the ParallelRtActivity |
getActivites(); | -returns a List of all committed activities |