ProcessDataManager.java
Go to the documentation of this file.
1 package grl;
2 
3 import com.kuka.roboticsAPI.applicationModel.RoboticsAPIApplication;
4 
5 /**
6  * Stores variables set in "Process Data" panel on
7  * the kuka iiwa tablet. Loaded from RoboticsAPI.data.xml.
8  * @author Andrew Hundt
9  *
10  */
11 public class ProcessDataManager {
12 
13 
14 
15  private RoboticsAPIApplication _app;
16  private String _controllingLaptopIPAddress;
17  private String _controllingLaptopZMQPort;
18  private String _controllingLaptop_ROS_MASTER_URI_Port;
19  private String _RobotIPAddress;
20  private String _FRI_KONI_RobotIPAddress;
21  private String _FRI_KONI_LaptopIPAddress;
22  private String _ROS_MASTER_URI;
23  private String _ZMQ_MASTER_URI;
24 
25  private double _jointVelRel;
26  private double _jointAccelRel;
27 
28  // joint impedence
29  private double _jointImpedenceDamping;
30  private double _jointImpedenceStiffness;
31 
32  // joint stiffness
33  private double _cartesianImpedenceStiffnessX;
34  private double _cartesianImpedenceStiffnessY;
35  private double _cartesianImpedenceStiffnessZ;
36  private double _cartesianImpedenceStiffnessA;
37  private double _cartesianImpedenceStiffnessB;
38  private double _cartesianImpedenceStiffnessC;
39 
40  // joint damping
41  private double _cartesianImpedenceDampingX;
42  private double _cartesianImpedenceDampingY;
43  private double _cartesianImpedenceDampingZ;
44  private double _cartesianImpedenceDampingA;
45  private double _cartesianImpedenceDampingB;
46  private double _cartesianImpedenceDampingC;
47 
48  // end effector settings
49  private double eeWeight;
50  private double eeX;
51  private double eeY;
52  private double eeZ;
53 
54  public String get_ZMQ_MASTER_URI() {
55  return _ZMQ_MASTER_URI;
56  }
57 
58  public double getEndEffectorWeight() {
59  return eeWeight;
60  }
61 
62  public double getEndEffectorX() {
63  return eeX;
64  }
65 
66  public double getEndEffectorY() {
67  return eeY;
68  }
69 
70  public double getEndEffectorZ() {
71  return eeZ;
72  }
73 
74  private void update_ZMQ_MASTER_URI() {
75  this._ZMQ_MASTER_URI = "tcp://" + _controllingLaptopIPAddress + ":" + _controllingLaptopZMQPort;
76  }
77 
78 
79  public String get_ROS_MASTER_URI() {
80  return _ROS_MASTER_URI;
81  }
82 
83  private void update_ROS_MASTER_URI() {
84  this._ROS_MASTER_URI = "http://" + _controllingLaptopIPAddress + ":" + _controllingLaptop_ROS_MASTER_URI_Port;
85  }
86 
88  return _controllingLaptopIPAddress;
89  }
90 
91  public void set_controllingLaptopIPAddress(String _controllingLaptopIPAddress) {
92  this._controllingLaptopIPAddress = _controllingLaptopIPAddress;
93  update_ZMQ_MASTER_URI();
94  update_ROS_MASTER_URI();
95  }
96 
98  return _controllingLaptopZMQPort;
99  }
100 
101  public void set_controllingLaptopJAVAPort(String _controllingLaptopJAVAPort) {
102  this._controllingLaptopZMQPort = _controllingLaptopJAVAPort;
103  update_ZMQ_MASTER_URI();
104  }
105 
107  return _controllingLaptop_ROS_MASTER_URI_Port;
108  }
109 
110  public void set_controllingLaptopROSPort(String _controllingLaptopROSPort) {
111  this._controllingLaptop_ROS_MASTER_URI_Port = _controllingLaptopROSPort;
112  update_ROS_MASTER_URI();
113  }
114 
115  public String get_RobotIPAddress() {
116  return _RobotIPAddress;
117  }
118 
119  public void set_RobotIPAddress(String _RobotIPAddress) {
120  this._RobotIPAddress = _RobotIPAddress;
121  }
122 
123  public String get_FRI_KONI_RobotIPAddress() {
124  return _FRI_KONI_RobotIPAddress;
125  }
126 
127  public void set_FRI_KONI_RobotIPAddress(String _FRI_KONI_RobotIPAddress) {
128  this._FRI_KONI_RobotIPAddress = _FRI_KONI_RobotIPAddress;
129  }
130 
132  return _FRI_KONI_LaptopIPAddress;
133  }
134 
135  public void set_FRI_KONI_LaptopIPAddress(String _FRI_KONI_LaptopIPAddress) {
136  this._FRI_KONI_LaptopIPAddress = _FRI_KONI_LaptopIPAddress;
137  }
138 
139 
140  public double get_JointImpedenceDamping() {
141  return _jointImpedenceDamping;
142  }
143 
144  public double get_JointImpedenceStiffness() {
145  return _jointImpedenceStiffness;
146  }
147 
149  return _cartesianImpedenceStiffnessX;
150  }
151 
153  return _cartesianImpedenceStiffnessY;
154  }
155 
157  return _cartesianImpedenceStiffnessZ;
158  }
159 
161  return _cartesianImpedenceStiffnessA;
162  }
163 
165  return _cartesianImpedenceStiffnessB;
166  }
167 
169  return _cartesianImpedenceStiffnessC;
170  }
171 
172 
173 
175  return _cartesianImpedenceDampingX;
176  }
177 
179  return _cartesianImpedenceDampingY;
180  }
181 
183  return _cartesianImpedenceDampingZ;
184  }
185 
187  return _cartesianImpedenceDampingA;
188  }
189 
191  return _cartesianImpedenceDampingB;
192  }
193 
195  return _cartesianImpedenceDampingC;
196  }
197 
198  public ProcessDataManager(final RoboticsAPIApplication app){
199  this._app = app;
200  // **********************************************************************
201  // *** change next line to the FRIClient's IP address ***
202  // **********************************************************************
203  _controllingLaptopIPAddress = _app.getApplicationData().getProcessData("Laptop_IP").getValue(); //"192.170.10.100";
204  _controllingLaptopZMQPort = _app.getApplicationData().getProcessData("Laptop_Port").getValue(); //"192.170.10.100";
205  _controllingLaptop_ROS_MASTER_URI_Port = _app.getApplicationData().getProcessData("Laptop_ROS_MASTER_URI_Port").getValue(); //"192.170.10.100";
206  //http://172.31.1.100:11311
207 
208  // **********************************************************************
209  // *** change next line to the KUKA address and Port Number ***
210  // **********************************************************************
211  _RobotIPAddress = _app.getApplicationData().getProcessData("Robot_IP").getValue(); //"tcp://172.31.1.100:30010";
212 
213  // **********************************************************************
214  // *** change next line to the FRIClient's IP address ***
215  // **********************************************************************
216  _FRI_KONI_LaptopIPAddress = _app.getApplicationData().getProcessData("Laptop_KONI_FRI_IP").getValue(); //"192.170.10.100";
217 
218 
219  // **********************************************************************
220  // *** change next line to the KUKA address and Port Number ***
221  // **********************************************************************
222  _FRI_KONI_RobotIPAddress = _app.getApplicationData().getProcessData("Robot_KONI_FRI_IP").getValue(); //"tcp://172.31.1.100:30010";
223 
224 
225  _jointVelRel = _app.getApplicationData().getProcessData("JointVelRel").getValue();
226  _jointAccelRel = _app.getApplicationData().getProcessData("JointAccelRel").getValue();
227 
228  _jointImpedenceDamping = _app.getApplicationData().getProcessData("JointImpedenceDamping").getValue();
229  _jointImpedenceStiffness = _app.getApplicationData().getProcessData("JointImpedenceStiffness").getValue();
230 
231 
232  _cartesianImpedenceStiffnessX = _app.getApplicationData().getProcessData("CartesianImpedenceStiffnessX").getValue();
233  _cartesianImpedenceStiffnessY = _app.getApplicationData().getProcessData("CartesianImpedenceStiffnessY").getValue();
234  _cartesianImpedenceStiffnessZ = _app.getApplicationData().getProcessData("CartesianImpedenceStiffnessZ").getValue();
235  _cartesianImpedenceStiffnessA = _app.getApplicationData().getProcessData("CartesianImpedenceStiffnessA").getValue();
236  _cartesianImpedenceStiffnessB = _app.getApplicationData().getProcessData("CartesianImpedenceStiffnessB").getValue();
237  _cartesianImpedenceStiffnessC = _app.getApplicationData().getProcessData("CartesianImpedenceStiffnessC").getValue();
238 
239  _cartesianImpedenceDampingX = _app.getApplicationData().getProcessData("CartesianImpedenceDampingX").getValue();
240  _cartesianImpedenceDampingY = _app.getApplicationData().getProcessData("CartesianImpedenceDampingY").getValue();
241  _cartesianImpedenceDampingZ = _app.getApplicationData().getProcessData("CartesianImpedenceDampingZ").getValue();
242  _cartesianImpedenceDampingA = _app.getApplicationData().getProcessData("CartesianImpedenceDampingA").getValue();
243  _cartesianImpedenceDampingB = _app.getApplicationData().getProcessData("CartesianImpedenceDampingB").getValue();
244  _cartesianImpedenceDampingC = _app.getApplicationData().getProcessData("CartesianImpedenceDampingC").getValue();
245 
246  eeWeight = _app.getApplicationData().getProcessData("eeWeight").getValue();
247  eeX = _app.getApplicationData().getProcessData("eeX").getValue();
248  eeY = _app.getApplicationData().getProcessData("eeY").getValue();
249  eeZ = _app.getApplicationData().getProcessData("eeZ").getValue();
250 
251  update_ROS_MASTER_URI();
252  update_ZMQ_MASTER_URI();
253  }
254 
255  /**
256  * @return the _jointVelRel
257  */
258  public double get_jointVelRel() {
259  return _jointVelRel;
260  }
261 
262  /**
263  * @param _jointVelRel the _jointVelRel to set
264  */
265  public void set_jointVelRel(double _jointVelRel) {
266  this._jointVelRel = _jointVelRel;
267  }
268 
269  /**
270  * @return the _jointAccelRel
271  */
272  public double get_jointAccelRel() {
273  return _jointAccelRel;
274  }
275 
276  /**
277  * @param _jointAccelRel the _jointAccelRel to set
278  */
279  public void set_jointAccelRel(double _jointAccelRel) {
280  this._jointAccelRel = _jointAccelRel;
281  }
282 
283 }
void set_jointVelRel(double _jointVelRel)
void set_jointAccelRel(double _jointAccelRel)
void set_FRI_KONI_LaptopIPAddress(String _FRI_KONI_LaptopIPAddress)
void set_RobotIPAddress(String _RobotIPAddress)
void set_controllingLaptopIPAddress(String _controllingLaptopIPAddress)
void set_controllingLaptopROSPort(String _controllingLaptopROSPort)
ProcessDataManager(final RoboticsAPIApplication app)
void set_FRI_KONI_RobotIPAddress(String _FRI_KONI_RobotIPAddress)
void set_controllingLaptopJAVAPort(String _controllingLaptopJAVAPort)