Minor fixes

This commit is contained in:
scharalambous-sony
2024-04-22 13:15:51 +02:00
parent 9c087a0dd2
commit e070deab90

View File

@@ -81,7 +81,7 @@ class JointState(State):
@staticmethod @staticmethod
def from_numpy( def from_numpy(
joint_names: List[str], joint_names: List[str],
position: np.ndarry, position: np.ndarray,
velocity: Optional[np.ndarray] = None, velocity: Optional[np.ndarray] = None,
acceleration: Optional[np.ndarray] = None, acceleration: Optional[np.ndarray] = None,
jerk: Optional[np.ndarray] = None, jerk: Optional[np.ndarray] = None,
@@ -91,6 +91,8 @@ class JointState(State):
vel = acc = je = None vel = acc = je = None
if velocity is not None: if velocity is not None:
vel = tensor_args.to_device(velocity) vel = tensor_args.to_device(velocity)
else:
vel = pos * 0.0
if acceleration is not None: if acceleration is not None:
acc = tensor_args.to_device(acceleration) acc = tensor_args.to_device(acceleration)
else: else: