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

Sensor base #15

Merged
merged 5 commits into from
Apr 15, 2017
Merged

Sensor base #15

merged 5 commits into from
Apr 15, 2017

Conversation

jimmychen623
Copy link
Contributor

Fix some compile bugs with imports

@TrevorEdwards
Copy link
Contributor

Holding off on reviewing this until #14 is merged since this contains some code from it. #14 still has some unaddressed comments.

Output.txt Outdated
HIIIIIIIHIIIIIIIHIIIIIIIGot: {"COLOR_SENSOR":{"data":0}}

Got: {"COLOR_SENSOR":{"data":0},"name":{"data":"INVALID: Abstract Sensor"}}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't push this file (git rm --cached)

script.py Outdated
return

bot = BaseMiniBot()
bot.turn_clockwise(50)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delet this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entire file

PhysicalObject po = new PhysicalObject("TESTBOT", 50, simvs.getWorld(), 0.4f, 0.0f, 1f, 1f, true);
SimBot simba;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please


ArrayList<PhysicalObject> pObjs = new ArrayList<>();
pObjs.add(po);
simvs.processPhysicalObjects(pObjs);

// Color sensor TODO put somewhere nice
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make a github issue for this plz (b4 i merge)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refer to this pullrequest

System.out.println("Exiting\n");
break;
case "GET":
String name = content.substring(content.indexOf(':') + 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

define content.substring(content.indexOf(':') + 1); as String value and refer to that string instead of parsing all over the place

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking as resolved. bingalee D1ngAl33

}

String prg = value;
BufferedWriter out = new BufferedWriter(new FileWriter("script.py"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edit .gitignore to have line
temp.py

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and rename to temp.py

int ret;
String line;
while ((line = in.readLine()) != null) {
ret = new Integer(line).intValue();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't we just declare int ret here?

}

String prg = value;
BufferedWriter out = new BufferedWriter(new FileWriter("script.py"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename out to scriptOut

ProcessBuilder pb = new ProcessBuilder("python","script.py");
Process p = pb.start();

BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scriptFeedbackInStream

}

sensors.put(s.getName(),s);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete alen yen file

@TrevorEdwards TrevorEdwards merged commit 69e7b51 into develop Apr 15, 2017
@TrevorEdwards TrevorEdwards deleted the sensor_base branch April 15, 2017 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants