-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for SE3 in terms of quaternions with Exp map
- Loading branch information
1 parent
3632576
commit daf5336
Showing
6 changed files
with
231 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
build/ | ||
.cache/ | ||
*/.ipynb_checkpoints/ |
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 |
---|---|---|
|
@@ -5,6 +5,15 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | |
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_STANDARD 20) | ||
|
||
include(FetchContent) | ||
|
||
FetchContent_Declare( | ||
Sabai | ||
GIT_REPOSITORY [email protected]:taylorpool/sabai.git | ||
GIT_TAG constexpr | ||
) | ||
FetchContent_MakeAvailable(Sabai) | ||
|
||
add_library(onogawa | ||
src/onogawa.cpp | ||
) | ||
|
@@ -13,7 +22,7 @@ target_include_directories(onogawa | |
include | ||
) | ||
target_link_libraries(onogawa | ||
PUBLIC | ||
sabai | ||
) | ||
|
||
option(BUILD_Onogawa_TESTS "Build Onogawa Tests" OFF) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"id": "f47e81ef-a415-4f7e-9897-407c6f9ef0f0", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import sympy as sy" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"id": "7623509f-fccb-4a91-ae2f-6c6b57538268", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"wx, wy, wz, theta, k = sy.symbols('omega_x omega_y omega_z theta k')" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"id": "01f138f4-cf23-4267-bda9-c05d819c370c", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/latex": [ | ||
"$\\displaystyle \\left[\\begin{matrix}0 & - \\omega_{x} & - \\omega_{y} & - \\omega_{z}\\\\\\omega_{x} & 0 & \\omega_{z} & - \\omega_{y}\\\\\\omega_{y} & - \\omega_{z} & 0 & \\omega_{x}\\\\\\omega_{z} & \\omega_{y} & - \\omega_{x} & 0\\end{matrix}\\right]$" | ||
], | ||
"text/plain": [ | ||
"Matrix([\n", | ||
"[ 0, -omega_x, -omega_y, -omega_z],\n", | ||
"[omega_x, 0, omega_z, -omega_y],\n", | ||
"[omega_y, -omega_z, 0, omega_x],\n", | ||
"[omega_z, omega_y, -omega_x, 0]])" | ||
] | ||
}, | ||
"execution_count": 4, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"what = sy.Matrix([\n", | ||
" [0, -wx, -wy, -wz],\n", | ||
" [wx, 0, wz, -wy],\n", | ||
" [wy, -wz, 0, wx],\n", | ||
" [wz, wy, -wx, 0]\n", | ||
"])\n", | ||
"what" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 6, | ||
"id": "1eac4770-a0c0-4ba4-90dd-c960e4f4a6e7", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/latex": [ | ||
"$\\displaystyle \\left[\\begin{matrix}- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2} & 0 & 0 & 0\\\\0 & - \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2} & 0 & 0\\\\0 & 0 & - \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2} & 0\\\\0 & 0 & 0 & - \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\end{matrix}\\right]$" | ||
], | ||
"text/plain": [ | ||
"Matrix([\n", | ||
"[-omega_x**2 - omega_y**2 - omega_z**2, 0, 0, 0],\n", | ||
"[ 0, -omega_x**2 - omega_y**2 - omega_z**2, 0, 0],\n", | ||
"[ 0, 0, -omega_x**2 - omega_y**2 - omega_z**2, 0],\n", | ||
"[ 0, 0, 0, -omega_x**2 - omega_y**2 - omega_z**2]])" | ||
] | ||
}, | ||
"execution_count": 6, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"what@what" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 7, | ||
"id": "f731e190-ce6f-43b9-9aeb-e09fcdf75237", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/latex": [ | ||
"$\\displaystyle \\left[\\begin{matrix}0 & - \\omega_{x} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) & - \\omega_{y} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) & - \\omega_{z} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right)\\\\\\omega_{x} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) & 0 & \\omega_{z} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) & - \\omega_{y} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right)\\\\\\omega_{y} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) & - \\omega_{z} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) & 0 & \\omega_{x} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right)\\\\\\omega_{z} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) & \\omega_{y} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) & - \\omega_{x} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) & 0\\end{matrix}\\right]$" | ||
], | ||
"text/plain": [ | ||
"Matrix([\n", | ||
"[ 0, -omega_x*(-omega_x**2 - omega_y**2 - omega_z**2), -omega_y*(-omega_x**2 - omega_y**2 - omega_z**2), -omega_z*(-omega_x**2 - omega_y**2 - omega_z**2)],\n", | ||
"[omega_x*(-omega_x**2 - omega_y**2 - omega_z**2), 0, omega_z*(-omega_x**2 - omega_y**2 - omega_z**2), -omega_y*(-omega_x**2 - omega_y**2 - omega_z**2)],\n", | ||
"[omega_y*(-omega_x**2 - omega_y**2 - omega_z**2), -omega_z*(-omega_x**2 - omega_y**2 - omega_z**2), 0, omega_x*(-omega_x**2 - omega_y**2 - omega_z**2)],\n", | ||
"[omega_z*(-omega_x**2 - omega_y**2 - omega_z**2), omega_y*(-omega_x**2 - omega_y**2 - omega_z**2), -omega_x*(-omega_x**2 - omega_y**2 - omega_z**2), 0]])" | ||
] | ||
}, | ||
"execution_count": 7, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"what@what@what" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 8, | ||
"id": "44b5c045-b7dd-4284-89dd-d0d9d32b6519", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/latex": [ | ||
"$\\displaystyle \\left[\\begin{matrix}- \\omega_{x}^{2} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) - \\omega_{y}^{2} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) - \\omega_{z}^{2} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) & 0 & 0 & 0\\\\0 & - \\omega_{x}^{2} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) - \\omega_{y}^{2} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) - \\omega_{z}^{2} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) & 0 & 0\\\\0 & 0 & - \\omega_{x}^{2} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) - \\omega_{y}^{2} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) - \\omega_{z}^{2} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) & 0\\\\0 & 0 & 0 & - \\omega_{x}^{2} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) - \\omega_{y}^{2} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right) - \\omega_{z}^{2} \\left(- \\omega_{x}^{2} - \\omega_{y}^{2} - \\omega_{z}^{2}\\right)\\end{matrix}\\right]$" | ||
], | ||
"text/plain": [ | ||
"Matrix([\n", | ||
"[-omega_x**2*(-omega_x**2 - omega_y**2 - omega_z**2) - omega_y**2*(-omega_x**2 - omega_y**2 - omega_z**2) - omega_z**2*(-omega_x**2 - omega_y**2 - omega_z**2), 0, 0, 0],\n", | ||
"[ 0, -omega_x**2*(-omega_x**2 - omega_y**2 - omega_z**2) - omega_y**2*(-omega_x**2 - omega_y**2 - omega_z**2) - omega_z**2*(-omega_x**2 - omega_y**2 - omega_z**2), 0, 0],\n", | ||
"[ 0, 0, -omega_x**2*(-omega_x**2 - omega_y**2 - omega_z**2) - omega_y**2*(-omega_x**2 - omega_y**2 - omega_z**2) - omega_z**2*(-omega_x**2 - omega_y**2 - omega_z**2), 0],\n", | ||
"[ 0, 0, 0, -omega_x**2*(-omega_x**2 - omega_y**2 - omega_z**2) - omega_y**2*(-omega_x**2 - omega_y**2 - omega_z**2) - omega_z**2*(-omega_x**2 - omega_y**2 - omega_z**2)]])" | ||
] | ||
}, | ||
"execution_count": 8, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"what@what@what@what" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "4bc41fef-2aad-44a0-a334-5e4f7768093d", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.8.10" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
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