Removing tasks from the world

Hello there :)

Is there anyway to remove tasks from the world after it is added?
I am adding a task to the world as follows:


I would like to remove this task if it exists.
Thank you in advance.

Hi @CaioViturino. Looks like this is an Isaac Sim question so I’m moving it over to the right forum.

Hi @CaioViturino

Attending the implementation of the next methods for the World class (exts/omni.isaac.core/omni/isaac/core/world/

    def add_task(self, task: BaseTask) -> None:
        """Tasks should have a unique name.

            task (BaseTask): [description]
        if in self._current_tasks:
            raise Exception("Task name should be unique in the world")
        self._current_tasks[] = task

    def get_current_tasks(self) -> List[BaseTask]:

            List[BaseTask]: [description]
        return self._current_tasks

… and identifying that self._current_tasks = dict(), you should be able to remove a task by doing:

del world.get_current_tasks()[]
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.