Creating complex real-time operations

The Robotics API provides mechanisms to combine single RtActivities to more complex RtActivity structures, which are still executed with real-time guarantees. For example, when two RtActivities should be started exactly in parallel, starting them subsequently via beginExecute() will not provide adequate synchronization, as each call to beginExecute() will consume a substantial amount of time. Even if two separate Java threads are used to call beginExecute() of each of the RtActivities in parallel, the Java Virtual Machine scheduler will not give tight timing guarantees regarding the threads’ parallelism. While in many cases, the resulting timing behavior will be good enough, there are some use cases in robotics applications that require tighter and more deterministic synchronization of operations.

The following sections introduce the mechanisms for combining RtActivities which are provided by the Robotics API. These mechanisms guarantee hard real-time synchronization among RtActivities according to certain patterns. Some patterns employ the Robotics API’s State concept introduced in section 1.4.6. More about sensor-based States will be introduced in  1.6.3.

Note

Please make sure that all RtActivities that get combined to a complex RtActivity use the same RoboticsRuntime. Every RtActivity has one and its type usually depends on the Device from which the RtActivity was created (via the respective DeviceInterface)

Listed below are all complex operations, along with a short explanation on what they can accomplish: