Functions | Variables
hrl_tilting_hokuyo::display_3d_mayavi Namespace Reference

Functions

def plot
 plot 3D points connected to each other
def plot_cuboid
 Plot a yellow cuboid.
def plot_normals
 Use mayavi2 to plot normals, and curvature of a point cloud.
def plot_points
 plot 3D points as a cloud.
def savefig
 save plot as a png
def show
 show the plot.
def white_bg
 make a figure with a white background.

Variables

list color_list
string dest = 'max_pan_angle'
tuple dict = ut.load_pickle(dict_pkl_fname)
 dict_pkl_fname = opt.dict_pkl
tuple dist_mat = ut.norm(pts)
string help = 'pkl file with 3D points'
tuple idxs = np.where(dist_mat<max_dist)
 max_dist = opt.max_dist
 max_pan_angle = opt.max_pan_angle
tuple p = optparse.OptionParser()
tuple pts = ut.load_pickle(pts_pkl_fname)
 pts_pkl_fname = opt.pts_pkl
 save_cloud_flag = opt.save_cloud

Function Documentation

def hrl_tilting_hokuyo.display_3d_mayavi.plot (   pts,
  color = (1.,1.,
  scalar_list = None 
)

plot 3D points connected to each other

Check mlab.points3d documentation for details.

Parameters:
pts- 3xN numpy matrix of points.
color- 3 tuple of color. (float b/w 0 and 1)
mode- how to display the points ('point','sphere','cube' etc.)
scale_fator- controls size of the spheres. not sure what it means.

Definition at line 64 of file display_3d_mayavi.py.

Plot a yellow cuboid.

cuboid is defined by 12 tuples of corners that define the 12 edges, as returned by occupancy_grig.grid_lines() function.

Definition at line 126 of file display_3d_mayavi.py.

def hrl_tilting_hokuyo.display_3d_mayavi.plot_normals (   pts,
  normals,
  curvature = None,
  mask_points = 1,
  color = (0.,1.,
  scale_factor = 0.1 
)

Use mayavi2 to plot normals, and curvature of a point cloud.

Parameters:
pts- 3xN np matrix
normals- 3xN np matrix of surface normals at the points in pts.
curvature- list of curvatures.
mask_points- how many point to skip while drawint the normals
color- of the arrows
scale_factor- modulate size of arrows.

Surface normals are plotted as arrows at the pts, curvature is colormapped and shown as spheres. The radius of the sphere also indicates the magnitude of the curvature. If curvature is None then it is not plotted. The pts are then displayed as pixels.

Definition at line 100 of file display_3d_mayavi.py.

def hrl_tilting_hokuyo.display_3d_mayavi.plot_points (   pts,
  color = (1.,1.,
  mode = 'point',
  scale_factor = 0.01,
  scalar_list = None 
)

plot 3D points as a cloud.

Check mlab.points3d documentation for details.

Parameters:
pts- 3xN numpy matrix of points.
color- 3 tuple of color. (float b/w 0 and 1)
mode- how to display the points ('point','sphere','cube' etc.)
scale_fator- controls size of the spheres. not sure what it means.

Definition at line 80 of file display_3d_mayavi.py.

save plot as a png

Parameters:
name- file name size - (r,c) e.g. (1024, 768)

Definition at line 54 of file display_3d_mayavi.py.

show the plot.

call this function after plotting everything.

Definition at line 136 of file display_3d_mayavi.py.

make a figure with a white background.

Definition at line 47 of file display_3d_mayavi.py.


Variable Documentation

Initial value:
00001 [(1.,1.,1.),(1.,0.,0.),(0.,1.,0.),(0.,0.,1.),(1.,1.,0.),(1.,0.,1.),\
00002               (0.,1.,1.),(0.5,1.,0.5),(1.,0.5,0.5)]

Definition at line 40 of file display_3d_mayavi.py.

Definition at line 151 of file display_3d_mayavi.py.

Definition at line 169 of file display_3d_mayavi.py.

Definition at line 160 of file display_3d_mayavi.py.

Definition at line 180 of file display_3d_mayavi.py.

string hrl_tilting_hokuyo::display_3d_mayavi::help = 'pkl file with 3D points'

Definition at line 145 of file display_3d_mayavi.py.

Definition at line 181 of file display_3d_mayavi.py.

Definition at line 163 of file display_3d_mayavi.py.

Definition at line 162 of file display_3d_mayavi.py.

tuple hrl_tilting_hokuyo::display_3d_mayavi::p = optparse.OptionParser()

Definition at line 142 of file display_3d_mayavi.py.

Definition at line 166 of file display_3d_mayavi.py.

Definition at line 159 of file display_3d_mayavi.py.

Definition at line 161 of file display_3d_mayavi.py.



hrl_tilting_hokuyo
Author(s): Advait Jain, Advisor: Prof. Charlie Kemp, Lab: Healthcare Robotics Lab at Georgia Tech
autogenerated on Wed Nov 27 2013 11:56:18