Plotting 2D and 3D coordinate systems can be time-consuming and difficult. As such, I created this repository to help make things a bit easier.
To install this package, download the wheel from this repository's Releases page.
The following code:
- Imports the
numpy
library asnp
for convenience, - Imports the
plot_frames
library, - Imports all of the modules from the
spatialmath
library.
import numpy as np
from plot_frames import *
from spatialmath import *
The following code:
- Creates a new figure,
- Creates a 2D pose, and
- Plots the 2D pose.
new_plot2d()
T = SE2()
print(T)
plot_pose2d(T, frame='T')
Afterwards, something similar to the following will be displayed:
The following code:
- Creates a new figure,
- Creates a 3D pose, and
- Draws the 3D pose.
new_plot3d()
T = SE3()
print(T)
plot_pose3d(T, frame='T')
Afterwards, something similar to the following will be displayed:
Dr Frazer K. Noble
L: https://www.linkedin.com/in/drfknoble/
G: https://github.com/drfknoble