File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,3 +107,27 @@ Usage Examples
107107 destination_bin = asset_registry.get_asset_by_name(" sorting_bin" )()
108108
109109 task = G1LocomanipPickAndPlaceTask(pick_object, destination_bin, galileo_scene)
110+
111+ Sequential Tasks
112+ ----------------
113+
114+ Tasks can be composed sequentially to form longer horizon, more complex tasks using the ``SequentialTaskBase `` class.
115+ ``SequentialTaskBase `` takes a list of ``TaskBase `` instances and automatically composes them into a single task.
116+ The order of the tasks in the list determines the order in which subtasks must be completed.
117+
118+ **Usage Example (Pick and Place Task and Close Door Task Composition) **
119+
120+ .. code-block :: python
121+
122+ pick_object = asset_registry.get_asset_by_name(" mustard_bottle" )()
123+ destination = ObjectReference(" refrigerator_shelf" , parent_asset = kitchen)
124+ pick_and_place_task = PickAndPlaceTask(pick_object, destination, kitchen)
125+
126+ openable_object = OpenableObjectReference(" refrigerator" , parent_asset = kitchen, openable_joint_name = " fridge_door_joint" )
127+ close_door_task = CloseDoorTask(openable_object, closedness_threshold = 0.10 )
128+
129+ sequential_task = SequentialTaskBase(subtasks = [pick_and_place_task, close_door_task])
130+
131+ **Available Examples **
132+
133+ - **PutAndCloseDoorTask **: Pick up and move an object to a destination location and then close a door (within **GR1PutAndCloseDoorEnvironment **).
You can’t perform that action at this time.
0 commit comments