How to use the condition.GoalPositionCondition function in condition

To help you get started, we’ve selected a few condition examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jhu-lcsr / costar_plan / costar_task_plan / python / costar_task_plan / simulation / option.py View on Github external
def samplePolicy(self, world):
        # Get the gating condition for a specific option.
        # - execution should continue until such time as this condition
        # is true.
        if not self.closed_loop:
            return CartesianMotionPolicy(self.position,
                                         self.rotation,
                                         goal=self.goal), \
                GoalPositionCondition(
                    self.goal,  # what object we care about
                    self.position,  # where we want to grab it
                    self.rotation,
                                # rotation with which we want to grab it
                    self.position_tolerance,
                    self.rotation_tolerance)
        else:
            obj = world.getObject(self.goal)
            pg = kdl.Vector(*self.position)
            Rg = kdl.Rotation.Quaternion(*self.rotation)
            Tg = kdl.Frame(Rg, pg)
            T = obj.state.T * Tg
            position = list(T.p)
            rotation = list(T.M.GetQuaternion())
            return CartesianMotionPolicy(position,
                                         rotation,
github jhu-lcsr / costar_plan / costar_task_plan / python / costar_task_plan / simulation / option.py View on Github external
def makePolicy(self, world):
        # Make the policy.
        # Get the gating condition for a specific option.
        # - execution should continue until such time as this condition
        # is true.
        return CartesianMotionPolicy(self.position,
                                     self.rotation,
                                     goal=self.goal), \
            GoalPositionCondition(
                self.goal,  # what object we care about
                self.position,  # where we want to grab it
                self.rotation,
                            # rotation with which we want to grab it
                self.position_tolerance,
                self.rotation_tolerance)

condition

A user friendly way to construct conditions for pandas dataframe query and sql

MIT
Latest version published 4 years ago

Package Health Score

33 / 100
Full package analysis