Skip to content

Commit

Permalink
Change draw_grid so that it draws one more block past the max values.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlee-gk committed Jan 13, 2015
1 parent 6b75f28 commit a4e6d59
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lfd/rapprentice/plotting_openrave.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import numpy as np

def draw_grid(env, f, mins, maxes, xres = .1, yres = .1, zres = .04, color = (1,1,0,1)):
def draw_grid(env, f, mins, maxes, xres=.1, yres=.1, zres=.04, color=(1,1,0,1)):

xmin, ymin, zmin = mins
xmax, ymax, zmax = maxes

nfine = 30
xcoarse = np.arange(xmin, xmax, xres)
xcoarse = np.arange(xmin, xmax+xres, xres)
xmax = xcoarse[-1];
ycoarse = np.arange(ymin, ymax, yres)
ycoarse = np.arange(ymin, ymax+yres, yres)
ymax = ycoarse[-1];
if zres == -1:
zcoarse = [(zmin+zmax)/2.]
else:
zcoarse = np.arange(zmin, zmax, zres)
zcoarse = np.arange(zmin, zmax+zres, zres)
zmax = zcoarse[-1];
xfine = np.linspace(xmin, xmax, nfine)
yfine = np.linspace(ymin, ymax, nfine)
Expand Down

0 comments on commit a4e6d59

Please sign in to comment.