Exemple #1
0
    def __init__(self,
                 max_linear_velocity,
                 max_steering_angle,
                 L,
                 axis_dist,
                 commands_format=['C', 'C'],
                 commands_range=[[-1, +1], [-1, +1]],
                 desc='Simple car dynamics'):
        self.max_linear_velocity = max_linear_velocity
        self.max_steering_angle = max_steering_angle
        self.L = L
        self.axis_dist = axis_dist
        spec = {
            'desc': desc,
            'shape': [2],
            'format': commands_format,
            'range': commands_range,
            'names': ['driving velocity', 'steering angle'],
            'default': [0, 0],
            'extra': {
                'max_linear_velocity': max_linear_velocity,
                'max_steering_angle': max_steering_angle,
                'L': L,
                'pose_space': 'SE2'
            }
        }

        SimpleKinematics.__init__(self, pose_space=SE2, commands_spec=spec)
Exemple #2
0
 def __init__(self,
              max_linear_velocity,
              max_angular_velocity,
              noise_drift=None,
              noise_mult=None):
     self.max_linear_velocity = max_linear_velocity
     self.max_angular_velocity = max_angular_velocity
     spec = {
         'desc': 'Particle in SE2 controlled in velocity',
         'shape': [3],
         'format': ['C', 'C', 'C'],
         'range': [[-1, +1], [-1, +1], [-1, +1]],
         'names': ['vx', 'vy', 'angular velocity'],
         'default': [0, 0, 0],
         'extra': {
             'max_linear_velocity': max_linear_velocity,
             'max_angular_velocity': max_angular_velocity,
             'pose_space': 'SE2'
         }
     }
     SimpleKinematics.__init__(self,
                               pose_space=SE2,
                               commands_spec=spec,
                               noise_mult=noise_mult,
                               noise_drift=noise_drift)
Exemple #3
0
    def __init__(self, max_angular_velocity):
        self.max_angular_velocity = np.array(max_angular_velocity)
        spec = {
            'desc': 'Particle in SO3 controlled in velocity.',
            'shape': [3],
            'format': ['C', 'C', 'C'],
            'range': [[-1, +1], [-1, +1], [-1, +1]],
            'names': ['w1', 'w2', 'w3'],
            'default': [0, 0, 0],
            'extra': {'max_angular_velocity': max_angular_velocity,
                      'pose_space': 'SO3'}
        }

        SimpleKinematics.__init__(self, pose_space=SO3, commands_spec=spec)
Exemple #4
0
 def __init__(self, ndim, max_velocity):
     self.ndim = ndim
     self.max_velocity = np.array(max_velocity)
     pose_space = {1: Tran1, 2: Tran2, 3: Tran3}[ndim]
     spec = {
         'desc': 'Particle in Euclidean space controlled in velocity',
         'shape': [ndim],
         'format': ['C'] * ndim,
         'range': [[-1, +1]] * ndim,
         'names': ['vel%d' % d for d in range(1, ndim + 1)],
         'default': [0] * ndim,
         'extra': {'max_velocity': max_velocity,
                   'pose_space': '%s' % pose_space}
     }
     SimpleKinematics.__init__(self, pose_space, commands_spec=spec)
Exemple #5
0
    def __init__(self, max_angular_velocity):
        self.max_angular_velocity = np.array(max_angular_velocity)
        spec = {
            'desc': 'Particle in SO3 controlled in velocity.',
            'shape': [3],
            'format': ['C', 'C', 'C'],
            'range': [[-1, +1], [-1, +1], [-1, +1]],
            'names': ['w1', 'w2', 'w3'],
            'default': [0, 0, 0],
            'extra': {
                'max_angular_velocity': max_angular_velocity,
                'pose_space': 'SO3'
            }
        }

        SimpleKinematics.__init__(self, pose_space=SO3, commands_spec=spec)
Exemple #6
0
 def __init__(self, max_linear_velocity, max_angular_velocity):
     self.max_linear_velocity = max_linear_velocity
     self.max_angular_velocity = max_angular_velocity
     spec = {
         'desc': 'Differential drive dynamics',
         'shape': [2],
         'format': ['C', 'C'],
         'range': [[-1, +1], [-1, +1]],
         'names': ['angular velocity', 'linear velocity'],
         'default': [0, 0],
         'extra': {
             'max_linear_velocity': max_linear_velocity,
             'max_angular_velocity': max_angular_velocity,
             'pose_space': 'SE2'
         }
     }
     SimpleKinematics.__init__(self, pose_space=SE2, commands_spec=spec)
 def __init__(self, max_linear_velocity, max_angular_velocity):
     self.max_linear_velocity = max_linear_velocity
     self.max_angular_velocity = max_angular_velocity
     spec = {
         'desc': 'Differential drive dynamics',
         'shape': [2],
         'format': ['C', 'C'],
         'range': [[-1, +1], [-1, +1]],
         'names': ['angular velocity', 'linear velocity'],
         'default': [0, 0],
         'extra': {'max_linear_velocity': max_linear_velocity,
                   'max_angular_velocity': max_angular_velocity,
                   'pose_space': 'SE2'}
     }
     SimpleKinematics.__init__(self,
                       pose_space=SE2,
                       commands_spec=spec)
Exemple #8
0
 def __init__(self, ndim, max_velocity):
     self.ndim = ndim
     self.max_velocity = np.array(max_velocity)
     pose_space = {1: Tran1, 2: Tran2, 3: Tran3}[ndim]
     spec = {
         'desc': 'Particle in Euclidean space controlled in velocity',
         'shape': [ndim],
         'format': ['C'] * ndim,
         'range': [[-1, +1]] * ndim,
         'names': ['vel%d' % d for d in range(1, ndim + 1)],
         'default': [0] * ndim,
         'extra': {
             'max_velocity': max_velocity,
             'pose_space': '%s' % pose_space
         }
     }
     SimpleKinematics.__init__(self, pose_space, commands_spec=spec)
Exemple #9
0
 def __init__(self, max_linear_velocity, max_angular_velocity,
              noise_drift=None, noise_mult=None):
     self.max_linear_velocity = max_linear_velocity
     self.max_angular_velocity = max_angular_velocity
     spec = {
         'desc': 'Particle in SE2 controlled in velocity',
         'shape': [3],
         'format': ['C', 'C', 'C'],
         'range': [[-1, +1], [-1, +1], [-1, +1]],
         'names': ['vx', 'vy', 'angular velocity'],
         'default': [0, 0, 0],
         'extra': {'max_linear_velocity': max_linear_velocity,
                   'max_angular_velocity': max_angular_velocity,
                   'pose_space': 'SE2'}
     }
     SimpleKinematics.__init__(self,
                       pose_space=SE2,
                       commands_spec=spec,
                       noise_mult=noise_mult,
                       noise_drift=noise_drift)
Exemple #10
0
    def __init__(self, linear_velocity, max_angular_velocity,
                 noise_mult=None, noise_drift=None):
        self.linear_velocity = linear_velocity
        self.max_angular_velocity = max_angular_velocity
        spec = {
            'desc': 'Kinematic fly: fixed forward velocity',
            'shape': [1],
            'format': ['C'],
            'range': [[-1, +1]],
            'names': ['angular velocity'],
            'default': [0],
            'extra': {'linear_velocity': linear_velocity,
                      'max_angular_velocity': max_angular_velocity,
                      'pose_space': 'SE2'}
        }

        SimpleKinematics.__init__(self,
                          pose_space=SE2,
                          commands_spec=spec,
                          noise_mult=noise_mult,
                          noise_drift=noise_drift)
Exemple #11
0
    def __init__(self, max_linear_velocity, max_steering_angle, L,
                       axis_dist,
                       commands_format=['C', 'C'],
                       commands_range=[[-1, +1], [-1, +1]],
                       desc='Simple car dynamics'):
        self.max_linear_velocity = max_linear_velocity
        self.max_steering_angle = max_steering_angle
        self.L = L
        self.axis_dist = axis_dist
        spec = {
            'desc': desc,
            'shape': [2],
            'format': commands_format,
            'range': commands_range,
            'names': ['driving velocity',
                      'steering angle'],
            'default': [0, 0],
            'extra': {'max_linear_velocity': max_linear_velocity,
                      'max_steering_angle': max_steering_angle,
                      'L': L,
                      'pose_space': 'SE2'}
        }

        SimpleKinematics.__init__(self, pose_space=SE2, commands_spec=spec)