Skip to content

Commit

Permalink
FieldData: Don't throw on missing data (#776)
Browse files Browse the repository at this point in the history
  • Loading branch information
Starlight220 authored Mar 27, 2023
1 parent 8cda56c commit c2743d1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public FieldData(SimplePose2d robot, Map<String, SimplePose2d[]> objects) {

@SuppressWarnings("JavadocMethod")
public FieldData(Map<String, Object> map) {
this.robot = new SimplePose2d((double[]) map.get("Robot"));
this.robot = new SimplePose2d((double[]) map.getOrDefault("Robot", new double[3]));
this.objects = new HashMap<>();

for (Map.Entry<String, Object> entry : map.entrySet()) {
Expand Down

0 comments on commit c2743d1

Please sign in to comment.