Created
September 13, 2018 18:05
-
-
Save pvazteixeira/f5048be0206b78f6334221493c2a94d7 to your computer and use it in GitHub Desktop.
use of composition operator
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
using CoordinateTransformations | |
wTp1 = Translation(1.0, 0.0, 0.0); | |
wRp1 = LinearMap(RotXYZ(0.0, 0.0, 0.0)) | |
wPp1 = compose(wTp1, wRp1) | |
To = Translation(1.0, 0.0, 0.0) | |
Ro = LinearMap(RotXYZ(0.0,0.0,pi/6.0)) | |
odom = compose(To, Ro) | |
# expected odom ∘ wPp1 (odom after wPp1), but syntax is like oplus... | |
wPp2 = compose(wPp1, odom) | |
# visualize results | |
using MeshCat | |
vis = Visualizer() | |
open(vis) | |
setobject!(vis[:x1],Triad(0.5)) | |
settransform!(vis[:x1],wPp1) | |
setobject!(vis[:x2],Triad(0.5)) | |
settransform!(vis[:x2],wPp2) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment