basic_robotics.plotting.vis_matplotlib module
Utility Plotting Functions for Basic-Robotics using matplotlib.
- basic_robotics.plotting.vis_matplotlib.drawManipulability(jacobian_matrix: ndarray[float], transform: tm, len_factor: float, ax: Axes3D) None[source]
Draw Manipulability Ellipsoid based on a Jacobian Matrix.
- basic_robotics.plotting.vis_matplotlib.drawSTL(transform: tm, file_name: str, ax: Axes3D, scale: float = 1.0)[source]
Draw an STL file at a set scale.
- basic_robotics.plotting.vis_matplotlib.getSTLProps(fname: str)[source]
Get Mass properties of a Mesh.
- Parameters:
fname (str) – file name
- Returns:
Mass Props – Mesh Mass Properties
- basic_robotics.plotting.vis_matplotlib.drawArm(arm, ax: Axes3D, jheight: float = 0.1, jdia: float = 0.3, axes_lens: float = 1.0, c: str = 'grey', forces: ndarray[float] = array([0.]))[source]
Draw A Serial Arm.
- Parameters:
arm (Arm) – Serial Arm To Draw
ax (Axes3D) – Axes object to plot to.
jrad (float, optional) – joint circle height. Defaults to .1.
jdia (float, optional) – joint circle diameter. Defaults to .3.
axes_lens (float, optional) – joint axis marker lengths. Defaults to 1.0.
c (str, optional) – _description_. Defaults to ‘grey’.
forces (np.ndarray[float], optional) – arm joint torques. Defaults to np.zeros((1)).
- basic_robotics.plotting.vis_matplotlib.drawLine(tf1: tm, tf2: tm, ax: Axes3D, col: str = 'blue')[source]
Draw a line Between Two Points.
- basic_robotics.plotting.vis_matplotlib.drawSP(sp, ax: Axes3D, col: str = 'green', forces: bool = False)[source]
Draw A Stewart Platform.
- basic_robotics.plotting.vis_matplotlib.drawInterPlate(sp1, sp2, ax: Axes3D, col: str = 'green')[source]
Draw interplate medium between two stacked stewart platforms.
Congratulations! You found an Easter Egg. ASSEMBLERS aren’t included in Basic-Robotics yet.
- basic_robotics.plotting.vis_matplotlib.drawAssembler(spl, ax: Axes3D, col: str = 'green', forces: bool = True)[source]
Draw an Assembler.
Congratulations! You found an Easter Egg. ASSEMBLERS aren’t included in Basic-Robotics yet.
- basic_robotics.plotting.vis_matplotlib.drawCamera(cam, size: float, ax: Axes3D)[source]
Draw a Camera.
- basic_robotics.plotting.vis_matplotlib.drawAxes(zed: tm, lv: float, ax: Axes3D, makelegend: str = None, zdir: tm = None)[source]
Draw a set of Axes in a frame.
Red indicates X Blue indicates Y Green indicates Z
- basic_robotics.plotting.vis_matplotlib.drawTrussElement(transform: tm, truss_length: float, truss_radius: float, ax: Axes3D, c: str = 'blue', c2: str = 'blue', hf: bool = False, delt: float = 0.5, RB: float = 0.1)[source]
Draw a Three Segment Truss.
- Parameters:
transform (tm) – Truss Center and Orientation transform
truss_length (float) – Length of Truss
truss_radius (float) – Truss Radius
ax (Axes3D) – Axes object to plot to.
c (str, optional) – Truss Tower Color. Defaults to ‘blue’.
c2 (str, optional) – Truss Crosses Color. Defaults to ‘blue’.
hf (bool, optional) – Draw truss crosses. Defaults to False.
delt (float, optional) – Distance for truss crossees. Defaults to .5.
RB (float, optional) – Truss Crosses Radius. Defaults to .1.
- basic_robotics.plotting.vis_matplotlib.drawRectangle(transform: ~basic_robotics.general.faser_transform.tm, dims: [<class 'float'>], ax: ~mpl_toolkits.mplot3d.axes3d.Axes3D, c: str = 'grey', a: float = 0.1)[source]
Draw a Rectanglular Prism.
- basic_robotics.plotting.vis_matplotlib.makeVideo(dir: str = 'VideoTemp')[source]
Make a video from a directory full of images.
- Parameters:
dir (str, optional) – Directory. Defaults to “VideoTemp”.
- basic_robotics.plotting.vis_matplotlib.drawRRT(listPoints, ax: Axes3D)[source]
Draw A RRT.
- Parameters:
listPoints (RRT Nodes List) – RRT Nodes List
ax (Axes3D) – Axes object to plot to.
- basic_robotics.plotting.vis_matplotlib.drawRRTPath(listPoints, ax: Axes3D, col: str = 'red')[source]
Draw a RRT path do destination.
- Parameters:
listPoints (List of RRT Nodes) – List of RRT Nodes
ax (Axes3D) – Axes object to plot to.
col (str, optional) – color. Defaults to ‘red’.
- basic_robotics.plotting.vis_matplotlib.drawObstructions(listObs, ax: Axes3D, col: str = 'red', a: float = 0.1)[source]
Draw RRT Obstructions.
- basic_robotics.plotting.vis_matplotlib.drawMesh(mesh: Mesh, ax: Axes3D)[source]
Draw a Mesh.
- Parameters:
mesh (mesh.Mesh) – Mesh To Draw
ax (Axes3D) – Axes object to plot to.
- basic_robotics.plotting.vis_matplotlib.drawWrench(wrench, weight: float, ax: Axes3D)[source]
Draw a Wrench.
- basic_robotics.plotting.vis_matplotlib.drawTube(T: tm, height: float, r: float, ax: Axes3D, c: str = 'blue', res: int = 12)[source]
Draw a Tube.
- basic_robotics.plotting.vis_matplotlib.DrawManipulability(jacobian_matrix: ndarray[float], transform: tm, len_factor: float, ax: Axes3D) None[source]
Deprecated alias for drawManipulability().
- basic_robotics.plotting.vis_matplotlib.DrawSTL(transform: tm, file_name: str, ax: Axes3D, scale: float = 1.0)[source]
Deprecated alias for drawSTL().
- basic_robotics.plotting.vis_matplotlib.DrawArm(arm, ax: Axes3D, jheight: float = 0.1, jdia: float = 0.3, axes_lens: float = 1.0, c: str = 'grey', forces: ndarray[float] = array([0.]))[source]
Deprecated alias for drawArm().
- basic_robotics.plotting.vis_matplotlib.DrawLine(tf1: tm, tf2: tm, ax: Axes3D, col: str = 'blue')[source]
Deprecated alias for drawLine().
- basic_robotics.plotting.vis_matplotlib.DrawSP(sp, ax: Axes3D, col: str = 'green', forces: bool = True)[source]
Deprecated alias for drawSP().
- basic_robotics.plotting.vis_matplotlib.DrawInterPlate(sp1, sp2, ax: Axes3D, col: str = 'green')[source]
Deprecated alias for drawInterPlate().
- basic_robotics.plotting.vis_matplotlib.DrawAssembler(spl, ax: Axes3D, col: str = 'green', forces: bool = True)[source]
Deprecated alias for drawAssembler().
- basic_robotics.plotting.vis_matplotlib.DrawCamera(cam, size: float, ax: Axes3D)[source]
Deprecated alias for drawCamera().
- basic_robotics.plotting.vis_matplotlib.DrawAxes(zed: tm, lv: float, ax: Axes3D, makelegend: str = None, zdir: tm = None)[source]
Deprecated alias for drawAxes().
- basic_robotics.plotting.vis_matplotlib.DrawTrussElement(transform: tm, truss_length: float, truss_radius: float, ax: Axes3D, c: str = 'blue', c2: str = 'blue', hf: bool = False, delt: float = 0.5, RB: float = 0.1)[source]
Deprecated alias for drawTrussElement().
- basic_robotics.plotting.vis_matplotlib.DrawRectangle(transform: ~basic_robotics.general.faser_transform.tm, dims: [<class 'float'>], ax: ~mpl_toolkits.mplot3d.axes3d.Axes3D, c: str = 'grey', a: float = 0.1)[source]
Deprecated alias for drawRectangle().
- basic_robotics.plotting.vis_matplotlib.DrawRRT(listPoints, ax: Axes3D)[source]
Deprecated alias for drawRRT().
- basic_robotics.plotting.vis_matplotlib.DrawRRTPath(listPoints, ax: Axes3D, col: str = 'red')[source]
Deprecated alias for drawRRTPath().
- basic_robotics.plotting.vis_matplotlib.DrawObstructions(listObs, ax: Axes3D, col: str = 'red', a: float = 0.1)[source]
Deprecated alias for drawObstructions().