Skip to content

Commit

Permalink
pushed testing data
Browse files Browse the repository at this point in the history
  • Loading branch information
NakuraMino committed Jun 9, 2020
1 parent 9fa5d3b commit 661a787
Show file tree
Hide file tree
Showing 180 changed files with 4,031 additions and 24 deletions.
24 changes: 12 additions & 12 deletions holomonic_data/createData.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,31 +65,31 @@ def get_label(xt, xtt):
# First setup the environment and the robot.
dim = 2 # change to 3 for holonomic

image_num = 100 # how many maps do you already have
total_paths = 101 # what map # do you want to end on?
with open("data.csv", mode='a', newline='') as csv_file:
image_num = 0 # how many maps do you already have
total_paths = 25 # what map # do you want to end on?
with open("test_data.csv", mode='w', newline='') as csv_file:
csv_writer = csv.writer(csv_file, delimiter=',')
for dirname, dirnames, filenames in os.walk('../train_maps'):
for dirname, dirnames, filenames in os.walk('../test_maps'):
while image_num < total_paths:
for subdirname in dirnames:

map_path = dirname + "/" + subdirname + "/floor_trav_0_v2.png"

img_path = "./images/" + str(image_num) + ".png"
ticks_path = "./ticks/" + str(image_num) + ".png"
img_path = "./test_images/" + str(image_num) + ".png"
# ticks_path = "./test_ticks/" + str(image_num) + ".png"

planning_env = MapEnvironment(map_path, image_num)
cv2.imwrite(img_path, planning_env.get_map())
planning_env.init_visualizer()
planning_env.visualize_plan(path=ticks_path)
# planning_env.init_visualizer()
# planning_env.visualize_plan(path=ticks_path)

image_num += 1

for i in range(2):
if i == 0:
planning_env.setStates()
else:
planning_env.setRandomStates()
# if i == 0:
# planning_env.setStates()
# else:
planning_env.setRandomStates()

args.start = planning_env.start
args.goal = planning_env.goal
Expand Down
Loading

0 comments on commit 661a787

Please sign in to comment.