def __init__(self, space):
        super(GridStateSampler, self).__init__(space)
        self.name_ = "GridStateSampler"
        self.rng_ = ou.RNG()
        self.space = space

        # Store bounds of state space
        self.x_lo, self.x_hi = self.space.getBounds(
        ).low[0], self.space.getBounds().high[0]
        self.y_lo, self.y_hi = self.space.getBounds(
        ).low[1], self.space.getBounds().high[1]

        # Set grid density (n x n) on state bounds
        self.n = rospy.get_param('grid_n', default=15)
        rospy.loginfo("GridStateSampler using nxn grid with n = {}".format(
            self.n))
예제 #2
0
 def __init__(self, si):
     super(MyValidStateSampler, self).__init__(si)
     self.name_ = "my sampler"
     self.rng_ = ou.RNG()
예제 #3
0
 def __init__(self, space):
     super(MyStateSampler, self).__init__(space)
     self.rng_ = ou.RNG()