-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial commit for SE3vel class, the extended SE3 group with velocity coordinates * SE3velCov class for compounding initial commit #72 * new line at the EOF * brackets function in namespace mrob, visible for all other files including SE3cov * brackets function now defined in SE3cov and used in other files, such as SE3velCov * test commit * headers to new classes * changing convention to SE3vel to be rot, trans, vel * updating convention on Se3vel and moving common left jacobian to SE3 * python bindings to SE3vel. Needs example. * adding to string pythong bindings for the SE3 vel * SE3 vel fix of Ln * python bindings to SE3vel adding test, not working now * SE3 vel adding inverse. SE3vel covariance not working. Ready to release (for SE3vel). --------- Co-authored-by: Aleksei Panchenko <nosmokingsurfer@gmail.com>
- Loading branch information
1 parent
bece1ea
commit c005a51
Showing
14 changed files
with
720 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
from mrob import SE3vel, SO3 | ||
import numpy as np | ||
|
||
# TODO, add proper test, this is just initial try | ||
|
||
# ------------------------------------------------------------------------- | ||
# 1 Testing contructors and print | ||
# ------------------------------------------------------------------------- | ||
T = SE3vel() | ||
print(T) | ||
|
||
|
||
theta = np.random.randn(3) | ||
R = SO3(theta) | ||
print(R) | ||
T1 = SE3vel(R, 0*np.random.randn(3), np.random.randn(3)) | ||
T1.print() | ||
|
||
|
||
xi = np.random.randn(9) | ||
print('xi initializator:\n', xi) | ||
T = SE3vel(xi) | ||
T.print() | ||
|
||
|
||
# ------------------------------------------------------------------------- | ||
# 2 Testing logarithm exponent | ||
# ------------------------------------------------------------------------- | ||
xi_reprojected = T.Ln() | ||
print('xi reprojected:\n', xi_reprojected) | ||
print('matrix proof:\n', SE3vel(xi_reprojected)) | ||
|
||
|
||
|
||
# ------------------------------------------------------------------------- | ||
# 2 Testing extracting data from T | ||
# ------------------------------------------------------------------------- | ||
print('full matrix: \n', T.T()) | ||
print('rotation: \n', T.R()) | ||
print('translation: \n', T.t()) | ||
print('velocity: \n', T.v()) | ||
print('full matrix compact: \n', T.T_compact()) | ||
|
||
|
||
|
||
|
||
|
||
# ------------------------------------------------------------------------- | ||
# 4 Testing Operations | ||
# ------------------------------------------------------------------------- | ||
print('testing inverse', T1*T1.inv()) | ||
|
||
|
||
|
||
# ------------------------------------------------------------------------- | ||
# 3 Testing Adjoint | ||
# ------------------------------------------------------------------------- | ||
#print(T.adj()) | ||
# create a T exp(xi) = Exp( adj_T xi ) T | ||
xi = np.random.randn(9) | ||
print(T * SE3vel(xi)) | ||
print(SE3vel(T.adj() @ xi) * T) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.