Damped Least-Squares Velocity Step
Implement dls_joint_velocity(J, v, damping) returning q˙ as a 1D array.
Examples
Identity Jacobian, no damping: joint velocity equals task velocity
- Input
- dls_joint_velocity([[1, 0], [0, 1]], [1, 0], 0)
- Output
- [1, 0]
Identity Jacobian, lambda = 1: the step is halved
- Input
- dls_joint_velocity([[1, 0], [0, 1]], [1, 0], 1)
- Output
- [0.5, 0]
Singular Jacobian with damping: the unreachable direction is dropped, not amplified
- Input
- dls_joint_velocity([[1, 0], [0, 0]], [0, 1], 1)
- Output
- [0, 0]
Hints
Hint 1
Solve the linear system rather than inverting by hand.
Hint 2
Watch for this: inverted J directly and blew up at the singularity.
Requirements
J: (m, n) Jacobianv: (m,) desired task-space velocitydamping: lambda >= 0Return (n,) joint velocities
Constraints
Allowed library: NumPy only
Time limit: 200 ms, Memory: 64 MB
Try similar problems(4)
Industrial Robotics: Kinematics and Control · ~16 min
Industrial Robotics: Kinematics and Control · ~14 min
Industrial Robotics: Kinematics and Control · ~18 min
Industrial Robotics: Kinematics and Control · ~16 min
Where this shows up
6 employers weight this skill
4 autonomy companies, 2 defense companies. Top match scores 92.
import numpy as np
def dls_joint_velocity(J, v, damping):
"""
Damped least-squares joint velocities for a task-space velocity.
Args:
J: (m, n) Jacobian
v: (m,) desired task-space velocity
damping: lambda >= 0
Returns:
(n,) joint velocities
"""
# YOUR CODE HERE
pass