Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
441 changes: 441 additions & 0 deletions RVC3/tools/pvplus.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions figures/3d/fig2_14.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import numpy as np
from spatialmath import SE3
from math import cos, sin, pi
import pvplus
import rvcprint
from RVC3.tools import pvplus


plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000), off_screen=True)
Expand Down
3 changes: 1 addition & 2 deletions figures/3d/fig2_16.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import numpy as np
from spatialmath import SE3
from math import pi
import pvplus
import rvcprint
from RVC3.tools import pvplus

plotter = pv.Plotter(border=False, polygon_smoothing=True, window_size=(2000,1000))
plotter.set_background('white')
Expand Down
1 change: 0 additions & 1 deletion figures/3d/fig2_24.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from spatialmath import SE3, Twist3
from spatialmath import base
from math import cos, sin, pi
import rvcprint
from PIL import Image

def add_arrow(i, T):
Expand Down
2 changes: 1 addition & 1 deletion figures/3d/fig2_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from spatialmath import SE3
from math import cos, sin, pi

import pvplus
from RVC3.tools import pvplus

plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))

Expand Down
2 changes: 1 addition & 1 deletion figures/3d/fig3_1a.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from spatialmath import SE3
from math import cos, sin, pi

import pvplus
from RVC3.tools import pvplus

plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))
plotter.enable_parallel_projection()
Expand Down
2 changes: 1 addition & 1 deletion figures/3d/fig3_1b.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np
from spatialmath import SE3
from math import cos, sin, pi
import pvplus
from RVC3.tools import pvplus


plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))
Expand Down
2 changes: 1 addition & 1 deletion figures/3d/fig7_13a.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from spatialmath import SE3
from math import cos, sin, pi

import pvplus
from RVC3.tools import pvplus

def zoom(plotter, value):
if not plotter.camera_set:
Expand Down
2 changes: 1 addition & 1 deletion figures/3d/fig7_4a.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from math import cos, sin, pi
from roboticstoolbox import ETS2 as ET

import pvplus
from RVC3.tools import pvplus

plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))
overlap = 0.2
Expand Down
2 changes: 1 addition & 1 deletion figures/3d/fig7_4b.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from math import cos, sin, pi


import pvplus
from RVC3.tools import pvplus

plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))
overlap = 0.2
Expand Down
2 changes: 1 addition & 1 deletion figures/3d/fig7_4c.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from spatialmath import SE3
from math import cos, sin, pi

import pvplus
from RVC3.tools import pvplus



Expand Down
2 changes: 1 addition & 1 deletion figures/3d/fig7_7.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from spatialmath import SE3
from math import cos, sin, pi

import pvplus
from RVC3.tools import pvplus

def zoom(plotter, value):
if not plotter.camera_set:
Expand Down
3 changes: 1 addition & 2 deletions figures/3d/fig8_8a.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
# from spatialmath import SE3
from spatialmath import base
from math import cos, sin, pi
import pvplus
from RVC3.tools import pvplus
import roboticstoolbox as rtb
from rvcprint import outfile

plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))
print(pv.__version__)
Expand Down
3 changes: 1 addition & 2 deletions figures/3d/fig8_8b.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
# from spatialmath import SE3
from spatialmath import base
from math import cos, sin, pi
import pvplus
from RVC3.tools import pvplus
import roboticstoolbox as rtb
from rvcprint import outfile


plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))
Expand Down
3 changes: 1 addition & 2 deletions figures/3d/fig9_17.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
# from spatialmath import SE3
from spatialmath import base
from math import cos, sin, pi
import pvplus
from RVC3.tools import pvplus
import roboticstoolbox as rtb
from rvcprint import outfile

plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))
print(pv.__version__)
Expand Down
2 changes: 1 addition & 1 deletion figures/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ saving --> fig10_20.pdf
Some files generate multiple sub-figures with lowercase letter suffixes.

All these files use `RVC3.tools.rvcprint` to save the created files. The
package `rvcpython` must have been installed.
package `rvc3python` must have been installed.



2 changes: 1 addition & 1 deletion figures/code/chapter2/fig2_14.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
from spatialmath import SE3
from math import cos, sin, pi
import pvplus
from RVC3.tools import pvplus
from RVC3.tools import rvcprint


Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter2/fig2_15.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pyvista as pv
import numpy as np
from spatialmath import SE3
import pvplus
from RVC3.tools import pvplus
from RVC3.tools import rvcprint

plotter = pv.Plotter(shape=(2,3), border=False, polygon_smoothing=True, window_size=(2000,1000))
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter2/fig2_16.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
from spatialmath import SE3
from math import pi
import pvplus
from RVC3.tools import pvplus
from RVC3.tools import rvcprint

plotter = pv.Plotter(shape=(2,3), border=False, polygon_smoothing=True, window_size=(2000,1000))
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter2/fig2_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from spatialmath import SE3
from math import cos, sin, pi

import pvplus
from RVC3.tools import pvplus

plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))

Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter2/fig2_6/aruco_markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import cv2.aruco as aruco
from spatialmath import SE3, SO3
import pyvista as pv
import pvplus
from RVC3.tools import pvplus


def main():
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter2/fig2_6/aruco_markers_pyvista.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import cv2.aruco as aruco
from spatialmath import SE3
import pyvista as pv
import pvplus
from RVC3.tools import pvplus


def main():
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter2/fig2_6/fig2_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import matplotlib.pyplot as plt
import pyvista as pv
import vtk
import pvplus
from RVC3.tools import pvplus

scene = Image('IMG_8787.JPG')

Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter2/screw.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pyvista as pv
import numpy as np
from spatialmath import SE3
import pvplus
from RVC3.tools import pvplus

plotter = pv.Plotter(shape=(2,3), border=False, polygon_smoothing=True, window_size=(2000,1000))
plotter.enable_parallel_projection()
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter2/vtkbug2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import matplotlib.pyplot as plt
import pyvista as pv
import vtk
import pvplus
from RVC3.tools import pvplus
from spatialmath import SE3
import numpy as np

Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter3/fig3_1a.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from spatialmath import SE3
from math import cos, sin, pi

import pvplus
from RVC3.tools import pvplus

plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))
plotter.enable_parallel_projection()
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter3/fig3_1b.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np
from spatialmath import SE3
from math import cos, sin, pi
import pvplus
from RVC3.tools import pvplus


plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter3/fig3_1c.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np
from spatialmath import SE3
from math import cos, sin, pi
import pvplus
from RVC3.tools import pvplus


plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter7/fig7_10b.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from roboticstoolbox import *
import pyvista as pv
import pvplus
from RVC3.tools import pvplus

plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))

Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter7/fig7_13a.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from spatialmath import SE3
from math import cos, sin, pi

import pvplus
from RVC3.tools import pvplus

def zoom(plotter, value):
if not plotter.camera_set:
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter7/fig7_4a.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from math import cos, sin, pi
from roboticstoolbox import ETS2 as ET

import pvplus
from RVC3.tools import pvplus

plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))
overlap = 0.2
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter7/fig7_4b.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from math import cos, sin, pi


import pvplus
from RVC3.tools import pvplus

plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))
overlap = 0.2
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter7/fig7_4c.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from spatialmath import SE3
from math import cos, sin, pi

import pvplus
from RVC3.tools import pvplus



Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter7/fig7_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from spatialmath import SE3
from math import cos, sin, pi

import pvplus
from RVC3.tools import pvplus

def zoom(plotter, value):
if not plotter.camera_set:
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter7/fig7_7.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from spatialmath import SE3
from math import cos, sin, pi

import pvplus
from RVC3.tools import pvplus

def zoom(plotter, value):
if not plotter.camera_set:
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter7/pyvista/extrude.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from spatialmath import SE3
from math import cos, sin, pi

import pvplus
from RVC3.tools import pvplus

def zoom(plotter, value):
if not plotter.camera_set:
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter7/pyvista/fig7_2a.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from roboticstoolbox import ETS2 as ET


import pvplus
from RVC3.tools import pvplus


plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter7/pyvista/fig7_2b.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from math import cos, sin, pi


import pvplus
from RVC3.tools import pvplus

plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))
overlap = 0.2
Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter7/pyvista/fig7_2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from spatialmath import SE3
from math import cos, sin, pi

import pvplus
from RVC3.tools import pvplus



Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter7/pyvista/fig7_7b.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from roboticstoolbox import *
import pyvista as pv
import pvplus
from RVC3.tools import pvplus

plotter = pv.Plotter(polygon_smoothing=True, window_size=(2000,2000))

Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter8/fig8_8a.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# from spatialmath import SE3
from spatialmath import base
from math import cos, sin, pi
import pvplus
from RVC3.tools import pvplus
import roboticstoolbox as rtb
from rvcprint import outfile

Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter8/fig8_8b.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# from spatialmath import SE3
from spatialmath import base
from math import cos, sin, pi
import pvplus
from RVC3.tools import pvplus
import roboticstoolbox as rtb
from rvcprint import outfile

Expand Down
2 changes: 1 addition & 1 deletion figures/code/chapter9/fig9_17.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# from spatialmath import SE3
from spatialmath import base
from math import cos, sin, pi
import pvplus
from RVC3.tools import pvplus
import roboticstoolbox as rtb
from rvcprint import outfile

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ dependencies = [

pytorch = ["torch", "torchvision"]
dev = ["pre-commit", "nbstripout"]
figures = ["pyvista", "vtk", "pillow"]

[project.scripts]

Expand Down