오늘 일지
[4/8]
1. numpy diag
numpy.diag(v,k=0)
대각행렬을 만들거나 대각 요소를 추출한다.
3x3행렬이 있다고 가정했을때
[추출]
np.diag(x) <- 대각 요소 추출한 배열
np.diag(x, k=1) <- 한줄 위의 대각요소
np.diag(x, k=-1) <- 한줄 밑의 대각요소ㅗ
[생성]
np.diag(np.diag(x))
x배열을 대각요소로하고 나머지는 0인 행렬 생성
2. numpy.random.randn
nupy.random.rand(d0, d1, ..., dn)
정규분포에서 샘플추출
인자 튜플 만큼 크기의 배열 생성
N(mu, sigma**2) 구현할려면
sigma * np.random.randn(...) + mu 하면됨
3. matplotlib
plt.cla
- clear the current axes.
4. numpy hastack
numpy.hastack(tup)
- column wise로 배열을 쌓는 것
- append 가 아니라 extend 느낌이다
5. 자코비안
- vector 함수의 모든 값에 대한 1차 편미분 값의 행렬
[로봇과 자코비안]
http://t-robotics.blogspot.com/2013/12/jacobian.html#.XKsSBtszY5k
[좀더 수학적 해석]
https://wikidocs.net/4053
reference frame(기준좌표계)
(1) Cartesian coordinate(직교 좌표계)
(2) Polar coordinate(극 좌표계)
좌표게의 변환을 해주는 역할
joint space <-> task space
foward kinematics: joint-> task $x=f(q)$
inverse kinematics: task-> joint $q=f^{-1}(x)$
$dx = Jdq$
$dq = J^{-1}dx$
그러므로 $q_{2} = q_{1} + J^{-1}dx$