Ejemplo n.º 1
0
    def __init__(self, pose_space, commands_spec,
                 noise_drift=None, noise_mult=None):
        if not pose_space.embeddable_in(SE3):
            msg = 'I expect a subgroup of SE3.'
            raise ValueError(msg)
        algebra = pose_space.get_algebra()
        n = algebra.get_dimension()

        if noise_drift is None:
            noise_drift = np.zeros(n)

        if noise_mult is None:
            noise_mult = np.zeros(n)

        noise_drift = np.array(noise_drift)
        noise_mult = np.array(noise_mult)

        if noise_mult.size != n:
            msg = 'Wrong size for noise_mult: %s' % str(noise_mult)
            raise ValueError(msg)

        if noise_drift.size != n:
            msg = 'Wrong size for noise_mult: %s' % str(noise_mult)
            raise ValueError(msg)

        self.noise_drift = noise_drift
        self.noise_mult = noise_mult
        self.pose_space = pose_space

        conf_space = pose_space.tangent_bundle()

        Dynamics.__init__(self, state_space=conf_space,
                          commands_spec=commands_spec)
Ejemplo n.º 2
0
    def __init__(self, **kwargs):
        self.car = SimpleCar(**kwargs)

        state_space = ProductManifold((self.car.get_state_space(), R1))
        commands_spec = self.car.get_commands_spec()
        Dynamics.__init__(self, state_space=state_space,
                                commands_spec=commands_spec)
Ejemplo n.º 3
0
    def __init__(self, **kwargs):
        self.car = SimpleCar(**kwargs)

        state_space = ProductManifold((self.car.get_state_space(), R1))
        commands_spec = self.car.get_commands_spec()
        Dynamics.__init__(self,
                          state_space=state_space,
                          commands_spec=commands_spec)
Ejemplo n.º 4
0
    def __init__(self, base, top):
        self.base = base
        self.top = top

        cmd1 = StreamSpec.from_yaml(self.base.get_commands_spec())
        cmd2 = StreamSpec.from_yaml(self.top.get_commands_spec())

        cmd_spec = StreamSpec.join(cmd1, cmd2).to_yaml()

        components = [self.base.get_state_space(),
                      self.top.get_state_space()]
        state_space = ProductManifold(components)
        Dynamics.__init__(self, commands_spec=cmd_spec,
                          state_space=state_space)
Ejemplo n.º 5
0
    def __init__(self, base, top):
        self.base = base
        self.top = top

        cmd1 = StreamSpec.from_yaml(self.base.get_commands_spec())
        cmd2 = StreamSpec.from_yaml(self.top.get_commands_spec())

        cmd_spec = StreamSpec.join(cmd1, cmd2).to_yaml()

        components = [self.base.get_state_space(), self.top.get_state_space()]
        state_space = ProductManifold(components)
        Dynamics.__init__(self,
                          commands_spec=cmd_spec,
                          state_space=state_space)
Ejemplo n.º 6
0
    def __init__(self,
                 pose_space,
                 commands_spec,
                 noise_drift=None,
                 noise_mult=None):
        if not pose_space.embeddable_in(SE3):
            msg = 'I expect a subgroup of SE3.'
            raise ValueError(msg)
        algebra = pose_space.get_algebra()
        n = algebra.get_dimension()

        if noise_drift is None:
            noise_drift = np.zeros(n)

        if noise_mult is None:
            noise_mult = np.zeros(n)

        noise_drift = np.array(noise_drift)
        noise_mult = np.array(noise_mult)

        if noise_mult.size != n:
            msg = 'Wrong size for noise_mult: %s' % str(noise_mult)
            raise ValueError(msg)

        if noise_drift.size != n:
            msg = 'Wrong size for noise_mult: %s' % str(noise_mult)
            raise ValueError(msg)

        self.noise_drift = noise_drift
        self.noise_mult = noise_mult
        self.pose_space = pose_space

        conf_space = pose_space.tangent_bundle()

        Dynamics.__init__(self,
                          state_space=conf_space,
                          commands_spec=commands_spec)