Skip to content

Is it possible to set the agent's location for predfined tasks? #112

Answered by muchvo
Bpoole908 asked this question in Q&A
Discussion options

You must be logged in to vote

I'm very sorry for overlooking this discussion. Yes, you can certainly fix the position of any object. Please refer to this parameter. Here’s how you could use this feature:

class GoalLevel0(BaseTask):
    """An agent must navigate to a goal."""

    def __init__(self, config) -> None:
        super().__init__(config=config)

        self.placements_conf.extents = [-1, -1, 1, 1]

        self._add_geoms(Goal(keepout=0.305))

        self.last_dist_goal = None
        self.agent.locations = [(0, 0)] # location
        self.agent.rot= np.pi/2 * 0 # rotation

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Bpoole908
Comment options

@muchvo
Comment options

Answer selected by Bpoole908
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants