Commit fa38ca9e authored by René Schöne's avatar René Schöne
Browse files

More debugging messages in starter.

parent d921e51f
aspect Computation {
syn boolean RobotArm.isInSafetyZone() {
System.out.println("isInSafetyZone()");
for (Joint joint : getJointList()) {
if (model().getZoneModel().isInSafetyZone(joint.getCurrentPosition())) {
return true;
......@@ -10,6 +11,7 @@ aspect Computation {
cache ZoneModel.isInSafetyZone(IntPosition pos);
syn boolean ZoneModel.isInSafetyZone(IntPosition pos) {
System.out.println("isInSafetyZone(" + pos + ")");
for (Zone sz : getSafetyZoneList()) {
for (Coordinate coordinate : sz.getCoordinateList()) {
IntPosition inside = coordinate.getPosition();
......
......@@ -10,19 +10,23 @@ RobotArm.AppropriateSpeed canDependOn Joint.CurrentPosition as dependency1 ;
// --- mapping definitions ---
ParseLinkState maps byte[] bytes to panda.Linkstate.PandaLinkState {:
System.out.println("ParseLinkState");
return panda.Linkstate.PandaLinkState.parseFrom(bytes);
:}
SerializeRobotConfig maps config.Robotconfig.RobotConfig rc to byte[] {:
System.out.println("SerializeRobotConfig");
return rc.toByteArray();
:}
LinkStateToIntPosition maps panda.Linkstate.PandaLinkState pls to IntPosition {:
System.out.println("LinkStateToIntPosition");
panda.Linkstate.PandaLinkState.Position p = pls.getPos();
return IntPosition.of((int) (Math.round(p.getPositionX() * 2)), (int) (Math.round(p.getPositionY() * 2)), (int) (Math.round(p.getPositionZ() * 2 + 0.5)));
:}
CreateSpeedMessage maps double speed to config.Robotconfig.RobotConfig {:
System.out.println("CreateSpeedMessage");
return config.Robotconfig.RobotConfig.newBuilder()
.setSpeed(speed)
.setLoopTrajectory(true)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment