This commit is contained in:
gobbo_a
2023-02-01 16:21:10 +01:00
parent 981a7bf9f3
commit 97b9f86516
27 changed files with 66 additions and 11 deletions

8
config/config.properties Normal file → Executable file
View File

@@ -1,4 +1,4 @@
#Tue Jan 31 08:37:20 CET 2023
#Wed Feb 01 14:17:52 CET 2023
autoSaveScanData=true
simulation=false
dataScanSaveOutput=false
@@ -30,7 +30,7 @@ versionTrackingRemote=git@git.psi.ch\:pshell_config/bernina_robot.git
dataScanLazyTableCreation=false
logDaysToLive=-1
logLevelConsole=Off
filePermissionsConfig=Default
filePermissionsConfig=Public
scanStreamerPort=-1
dataScanSaveSetpoints=false
versionTrackingManual=true
@@ -42,9 +42,9 @@ hideServerMessages=false
dataScanReleaseRecords=false
dataScanPreserveTypes=false
dataScanFlushRecords=false
filePermissionsLogs=Default
filePermissionsLogs=Public
logPath={logs}/{date}_{time}
filePermissionsScripts=Default
filePermissionsScripts=Public
filePermissionsData=Default
dataProvider=h5
saveCommandStatistics=false

0
config/devices.properties Normal file → Executable file
View File

0
config/mail.properties Normal file → Executable file
View File

0
config/plugins.properties Normal file → Executable file
View File

0
config/preferences.json Normal file → Executable file
View File

0
config/setup.properties Normal file → Executable file
View File

0
devices/cam_n.properties Normal file → Executable file
View File

0
devices/cam_s.properties Normal file → Executable file
View File

0
devices/cam_w.properties Normal file → Executable file
View File

0
plugins/.DS_Store vendored Normal file → Executable file
View File

27
plugins/RobotBernina.form Normal file → Executable file
View File

@@ -61,6 +61,11 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="spinnerOffsetX" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="buttonTweakX1" min="-2" pref="138" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="spinnerOffsetY" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
@@ -78,6 +83,11 @@
<Component id="buttonTweakX" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerOffsetX" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="buttonTweakX1" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerOffsetY" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
@@ -115,6 +125,21 @@
</Property>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="buttonTweakX1">
<Properties>
<Property name="text" type="java.lang.String" value="Tweak Y"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonTweakX1ActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JSpinner" name="spinnerOffsetY">
<Properties>
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
<SpinnerModel initial="1.0" maximum="10.0" minimum="-10.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="panelRobot">
@@ -746,7 +771,7 @@
<Component id="jPanel8" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jPanel9" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="200" max="32767" attributes="0"/>
<EmptySpace pref="229" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>

29
plugins/RobotBernina.java Normal file → Executable file
View File

@@ -299,6 +299,8 @@ public class RobotBernina extends Panel {
moveHome = new javax.swing.JButton();
buttonTweakX = new javax.swing.JButton();
spinnerOffsetX = new javax.swing.JSpinner();
buttonTweakX1 = new javax.swing.JButton();
spinnerOffsetY = new javax.swing.JSpinner();
panelRobot = new javax.swing.JPanel();
deviceStatePanel1 = new ch.psi.pshell.swing.DeviceStatePanel();
jPanel4 = new javax.swing.JPanel();
@@ -382,6 +384,15 @@ public class RobotBernina extends Panel {
spinnerOffsetX.setModel(new javax.swing.SpinnerNumberModel(1.0d, -10.0d, 10.0d, 1.0d));
buttonTweakX1.setText("Tweak Y");
buttonTweakX1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonTweakX1ActionPerformed(evt);
}
});
spinnerOffsetY.setModel(new javax.swing.SpinnerNumberModel(1.0d, -10.0d, 10.0d, 1.0d));
javax.swing.GroupLayout panelCommandsLayout = new javax.swing.GroupLayout(panelCommands);
panelCommands.setLayout(panelCommandsLayout);
panelCommandsLayout.setHorizontalGroup(
@@ -394,7 +405,11 @@ public class RobotBernina extends Panel {
.addGroup(panelCommandsLayout.createSequentialGroup()
.addComponent(buttonTweakX, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(spinnerOffsetX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(spinnerOffsetX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelCommandsLayout.createSequentialGroup()
.addComponent(buttonTweakX1, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(spinnerOffsetY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
panelCommandsLayout.setVerticalGroup(
@@ -408,6 +423,10 @@ public class RobotBernina extends Panel {
.addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonTweakX)
.addComponent(spinnerOffsetX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonTweakX1)
.addComponent(spinnerOffsetY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
@@ -993,7 +1012,7 @@ public class RobotBernina extends Panel {
.addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(200, Short.MAX_VALUE))
.addContainerGap(229, Short.MAX_VALUE))
);
panelCameras.add(panelControls, java.awt.BorderLayout.WEST);
@@ -1129,6 +1148,10 @@ public class RobotBernina extends Panel {
evalCmd("robot.tweak_x(" + spinnerOffsetX.getValue() + ")");
}//GEN-LAST:event_buttonTweakXActionPerformed
private void buttonTweakX1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonTweakX1ActionPerformed
evalCmd("robot.tweak_y(" + spinnerOffsetY.getValue() + ")");
}//GEN-LAST:event_buttonTweakX1ActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton butonStop;
private javax.swing.JButton buttonAbort;
@@ -1148,6 +1171,7 @@ public class RobotBernina extends Panel {
private javax.swing.JButton buttonPause;
private javax.swing.JButton buttonResume;
private javax.swing.JButton buttonTweakX;
private javax.swing.JButton buttonTweakX1;
private javax.swing.JButton buttonZooHome;
private javax.swing.JButton buttonZoomIn;
private javax.swing.JButton buttonZoomOut;
@@ -1188,6 +1212,7 @@ public class RobotBernina extends Panel {
private javax.swing.JPanel panelRobot;
private ch.psi.pshell.imaging.Renderer renderer;
private javax.swing.JSpinner spinnerOffsetX;
private javax.swing.JSpinner spinnerOffsetY;
private javax.swing.JSpinner spinnerSpeed;
private javax.swing.JTextField textMode;
private javax.swing.JTextField textPosition;

0
plugins/RobotPanel.form Normal file → Executable file
View File

0
plugins/RobotPanel.java Normal file → Executable file
View File

0
script/.DS_Store vendored Normal file → Executable file
View File

0
script/client/.history Normal file → Executable file
View File

0
script/client/BerninaRobotClient.py Normal file → Executable file
View File

0
script/client/PShellClient.py Normal file → Executable file
View File

0
script/client/sseclient.py Normal file → Executable file
View File

0
script/client/test.py Normal file → Executable file
View File

0
script/devices/Axis.py Normal file → Executable file
View File

View File

@@ -1,5 +1,5 @@
KNOWN_POINTS = P_PARK, P_HOME = "park", "home"
TASKS = MOVE_PARK, MOVE_HOME, TWEAK_X = "movePark", "moveHome", "tweakX"
TASKS = MOVE_PARK, MOVE_HOME, TWEAK_X , TWEAK_Y = "movePark", "moveHome", "tweakX", "tweakY"
DESCS = DESC_FAST,DESC_SLOW, = "mFast", "mSlow"
DESC_DEFAULT = DESCS[0]
@@ -14,7 +14,7 @@ DEFAULT_SPEED=20
run("devices/RobotTCP")
simulation = False
simulation = True
class RobotSC(RobotTCP):
@@ -25,7 +25,7 @@ class RobotSC(RobotTCP):
self.setPolling(DEFAULT_ROBOT_POLLING)
self.last_command_timestamp = None
self.last_command_position = None
self.setSimulated()
self.setSimulated() # TODO: Remove me
def move_home(self):
@@ -43,6 +43,11 @@ class RobotSC(RobotTCP):
def tweak_x(self, offset):
self.start_task(TWEAK_X, offset)
self.wait_task_finished(TASK_WAIT_ROBOT_POLLING)
def tweak_y(self, offset):
self.start_task(TWEAK_Y, offset)
self.wait_task_finished(TASK_WAIT_ROBOT_POLLING)
def on_event(self,ev):
#print "EVT: " + ev
@@ -101,7 +106,7 @@ class RobotSC(RobotTCP):
raise Exception("Robot not in cleared position")
def wait_ready(self):
robot.waitState(State.Ready, 1000) #robot.state.assertReady()
self.waitState(State.Ready, 1000) #robot.state.assertReady()
if simulation:
add_device(RobotSC("robot","localhost:1000"),force = True)

0
script/devices/RobotMotors.py Normal file → Executable file
View File

0
script/devices/RobotTCP.py Normal file → Executable file
View File

0
script/local.groovy Normal file → Executable file
View File

0
script/local.js Normal file → Executable file
View File

0
script/local.py Normal file → Executable file
View File