Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed issue = load_all() missing 1 required positional argument: 'Loader' #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
5 changes: 3 additions & 2 deletions MapEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,15 @@ def read(self, fn):
fn_yaml = os.path.splitext(fn)[0] + '.yaml'
try:
stream = open(fn_yaml, "r")
docs = yaml.load_all(stream)
docs = yaml.load_all(stream,Loader=yaml.FullLoader)
for doc in docs:
self.occupied_thresh = doc['occupied_thresh'] # probability its occupied
self.free_thresh = doc['free_thresh'] # probability its uncertain or occupied
self.resolution = doc['resolution'] # in meters per cell
self.origin_x = doc['origin'][0]
self.origin_y = doc['origin'][1]
except:
except Exception as e:
print(e)
print("ERROR: Corresponding YAML file", fn_yaml, "is missing or incorrectly formatted.")
sys.exit(1)

Expand Down
Binary file added __pycache__/ui_map_editor.cpython-310.pyc
Binary file not shown.
Binary file added __pycache__/ui_map_editor.cpython-311.pyc
Binary file not shown.
Binary file added testing_world_map.pgm
Binary file not shown.
7 changes: 7 additions & 0 deletions testing_world_map.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
image: testing_world_map.pgm
mode: trinary
resolution: 0.05
origin: [-12.6, -35, 0]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.25