rofunc.utils.visualab.ellipsoid
#
1. Module Contents#
1.1. Functions#
Plot 3D sphere or ellipsoid |
|
Plot the 3-d Ellipsoid ell on the Axes3D ax. |
|
Plot the ellipsoids in 3d, used by rf.robolab.manipulability.mpb.get_mpb_from_model |
1.2. API#
- rofunc.utils.visualab.ellipsoid.sphere_plot3d(mean, cov, color=[1, 0, 0], alpha=0.2, ax=None)[source]#
Plot 3D sphere or ellipsoid
Example:
>>> import rofunc as rf >>> import numpy as np >>> from matplotlib import pyplot as plt >>> means = np.array([0.5, 0.0, 0.0]) >>> covs = np.diag([6, 12, 0.1]) >>> rf.visualab.sphere_plot3d(means, covs) >>> plt.show()
- Parameters:
mean – the mean point coordinate of sphere
cov – the covariance matrix of the sphere
color – the color of the ellipsoid
alpha – the transparency of the ellipsoid
ax – the axis to plot the ellipsoid
- rofunc.utils.visualab.ellipsoid.plot_ellipsoid_3d(ell, ax, color, alpha)[source]#
Plot the 3-d Ellipsoid ell on the Axes3D ax.
- Parameters:
ell – the ellipsoid to plot
ax – the axis to plot the ellipsoid
color – the color of the ellipsoid
alpha – the transparency of the ellipsoid
- rofunc.utils.visualab.ellipsoid.ellipsoid_plot3d(ellipsoids, mode='quaternion', Rs=None)[source]#
Plot the ellipsoids in 3d, used by rf.robolab.manipulability.mpb.get_mpb_from_model
- Parameters:
ellipsoids – list of ellipsoids to plot
mode – ‘quaternion’ or ‘euler’ or ‘given’
Rs – rotation matrices
- Returns:
None