Skip to content

Commit 203d85e

Browse files
committed
fix types
1 parent 748b410 commit 203d85e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

roboticstoolbox/tools/p_servo.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
import numpy as np
44
from spatialmath import SE3, base
55
import math
6+
from typing import Union
67

8+
ArrayLike = Union[list, np.ndarray, tuple, set]
79

810
def _angle_axis(T, Td):
911
e = np.empty(6)
@@ -28,7 +30,7 @@ def _angle_axis(T, Td):
2830
return e
2931

3032

31-
def p_servo(wTe, wTep, gain=1.0, threshold=0.1, method="rpy"):
33+
def p_servo(wTe, wTep, gain: Union[float, ArrayLike]=1.0, threshold=0.1, method="rpy"):
3234
"""
3335
Position-based servoing.
3436

0 commit comments

Comments
 (0)