Skip to content

Commit c02490e

Browse files
authored
Refactor rotational components of TCP orientation (#23)
* Fixes #22. Refactor TCP pose orientation Rotation components of TCP Pose are not Euler angles but instead are components of a vector that defines the rotation direction, whose magnitude is the rotation angle in radians. This is a large commit that touches many files and includes many breaking changes since many PVs needed to be renamed. Any PVs, GUIs, or code that used names like "Roll" "Pitch" and "Yaw" have been renamed to "Rx", "Ry", and "Rz" * also removed PoseR*CmdU "Tweaking" a component of the rotation vector representation of the orientation of the TCP does not make sense, therefore the PVs and cooresponding GUI elements have been removed
1 parent 61f08d0 commit c02490e

42 files changed

Lines changed: 2603 additions & 10269 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/pv_reference_guide.md

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ robot controller, `caput Dashboard:Play 1` and `caput Dashboard:Play.PROC 1` (an
9191
| Receive:ActualJointVelocities | waveform | Actual joint velocities |
9292
| Receive:ActualJointCurrents | waveform | Actual joint currents |
9393
| Receive:JointControlCurrents | waveform | Joint control currents |
94-
| Receive:ActualTCPPose | waveform | Actual TCP pose (x,y,z,r,p,y) |
94+
| Receive:ActualTCPPose | waveform | Actual TCP pose (x,y,z,rx,ry,rz) |
9595
| Receive:ActualTCPSpeed | waveform | Actual TCP speed |
9696
| Receive:ActualTCPForce | waveform | Actual TCP force |
9797
| Receive:Joint1 | ai | Joint 1 position (deg) |
@@ -103,17 +103,17 @@ robot controller, `caput Dashboard:Play 1` and `caput Dashboard:Play.PROC 1` (an
103103
| Receive:PoseX | ai | TCP X position (mm) |
104104
| Receive:PoseY | ai | TCP Y position (mm) |
105105
| Receive:PoseZ | ai | TCP Z position (mm) |
106-
| Receive:PoseRoll | ai | TCP roll (deg) |
107-
| Receive:PosePitch | ai | TCP pitch (deg) |
108-
| Receive:PoseYaw | ai | TCP yaw (deg) |
106+
| Receive:PoseRx | ai | TCP rotation vector X component (rad) |
107+
| Receive:PoseRy | ai | TCP rotation vector Y component (rad) |
108+
| Receive:PoseRz | ai | TCP rotation vector Z component (rad) |
109109
| Receive:JointModes | waveform | Joint control modes |
110110
| Receive:ActualToolAccelerometer | waveform | Tool accelerometer (X,Y,Z) |
111111
| Receive:TargetJointPositions | waveform | Target joint positions |
112112
| Receive:TargetJointVelocities | waveform | Target joint speeds |
113113
| Receive:TargetJointAccelerations | waveform | Target joint accelerations |
114114
| Receive:TargetJointCurrents | waveform | Target joint currents |
115115
| Receive:TargetJointMoments | waveform | Target joint moments |
116-
| Receive:TargetTCPPose | waveform | Target TCP pose (x,y,z,r,p,y) |
116+
| Receive:TargetTCPPose | waveform | Target TCP pose (x,y,z,rx,ry,rz) |
117117
| Receive:TargetTCPSpeed | waveform | Target TCP speed |
118118
| Receive:JointTemperatures | waveform | Joint temperatures in celsius |
119119
| Receive:ActualJointVoltages | waveform | Actual joint voltages |
@@ -207,27 +207,15 @@ robot controller, `caput Dashboard:Play 1` and `caput Dashboard:Play.PROC 1` (an
207207
| Control:PoseZTweakVal | ao | Z tweak step size |
208208
| Control:PoseZTweakFwd | calcout | Tweak TCP Z forward (writes to PoseZCmdU) |
209209
| Control:PoseZTweakRev | calcout | Tweak TCP Z backward (writes to PoseZCmdU) |
210-
| Control:PoseRollCmd | ao | Commanded TCP roll (deg). Does not trigger motion. |
211-
| Control:PoseRollCmdU | ao | Sets roll target and executes moveL |
212-
| Control:PoseRollTweakVal | ao | Roll tweak step size |
213-
| Control:PoseRollTweakFwd | calcout | Tweak TCP roll forward (writes to PoseRollCmdU) |
214-
| Control:PoseRollTweakRev | calcout | Tweak TCP roll backward (writes to PoseRollCmdU) |
215-
| Control:PosePitchCmd | ao | Commanded TCP pitch (deg). Does not trigger motion. |
216-
| Control:PosePitchCmdU | ao | Sets pitch target and executes moveL |
217-
| Control:PosePitchTweakVal | ao | Pitch tweak step size |
218-
| Control:PosePitchTweakFwd | calcout | Tweak TCP pitch forward (writes to PosePitchCmdU) |
219-
| Control:PosePitchTweakRev | calcout | Tweak TCP pitch backward (writes to PosePitchCmdU) |
220-
| Control:PoseYawCmd | ao | Commanded TCP yaw (deg). Does not trigger motion. |
221-
| Control:PoseYawCmdU | ao | Sets yaw target and executes moveL |
222-
| Control:PoseYawTweakVal | ao | Yaw tweak step size |
223-
| Control:PoseYawTweakFwd | calcout | Tweak TCP yaw forward (writes to PoseYawCmdU) |
224-
| Control:PoseYawTweakRev | calcout | Tweak TCP yaw backward (writes to PoseYawCmdU) |
210+
| Control:PoseRxCmd | ao | Commanded TCP Rx (rad). Does not trigger motion. |
211+
| Control:PoseRyCmd | ao | Commanded TCP Ry (rad). Does not trigger motion. |
212+
| Control:PoseRzCmd | ao | Commanded TCP Rz (rad). Does not trigger motion. |
225213
| Control:TCPOffset_X | ao | TCP offset X (mm) |
226214
| Control:TCPOffset_Y | ao | TCP offset Y (mm) |
227215
| Control:TCPOffset_Z | ao | TCP offset Z (mm) |
228-
| Control:TCPOffset_Roll | ao | TCP offset roll (rad) |
229-
| Control:TCPOffset_Pitch | ao | TCP offset pitch (rad) |
230-
| Control:TCPOffset_Yaw | ao | TCP offset yaw (rad) |
216+
| Control:TCPOffset_Rx | ao | TCP offset Rx (rad) |
217+
| Control:TCPOffset_Ry | ao | TCP offset Ry (rad) |
218+
| Control:TCPOffset_Rz | ao | TCP offset Rz (rad) |
231219
| Control:CustomScriptFile | lso | Path to a URScript file to run on the controller |
232220
| Control:CustomInlineScript | lso | Inline URScript string; executes immediately on write |
233221
| Control:RunCustomScriptFile | bo | Uploads and runs the script file set in CustomScriptFile |
@@ -253,9 +241,9 @@ robot controller, `caput Dashboard:Play 1` and `caput Dashboard:Play.PROC 1` (an
253241
| Control:JogSpeedX | ao | Jog speed in X (mm/s) |
254242
| Control:JogSpeedY | ao | Jog speed in Y (mm/s) |
255243
| Control:JogSpeedZ | ao | Jog speed in Z (mm/s) |
256-
| Control:JogSpeedRoll | ao | Jog speed in roll (deg/s) |
257-
| Control:JogSpeedPitch | ao | Jog speed in pitch (deg/s) |
258-
| Control:JogSpeedYaw | ao | Jog speed in yaw (deg/s) |
244+
| Control:JogSpeedRx | ao | Jog speed in Rx (rad/s) |
245+
| Control:JogSpeedRy | ao | Jog speed in Ry (rad/s) |
246+
| Control:JogSpeedRz | ao | Jog speed in Rz (rad/s) |
259247

260248
***
261249

@@ -371,9 +359,9 @@ robot controller, `caput Dashboard:Play 1` and `caput Dashboard:Play.PROC 1` (an
371359
| WaypointL:$(N):X | ao | X position of waypoint (mm) |
372360
| WaypointL:$(N):Y | ao | Y position of waypoint (mm) |
373361
| WaypointL:$(N):Z | ao | Z position of waypoint (mm) |
374-
| WaypointL:$(N):Roll | ao | Roll angle of waypoint (deg) |
375-
| WaypointL:$(N):Pitch | ao | Pitch angle of waypoint (deg) |
376-
| WaypointL:$(N):Yaw | ao | Yaw angle of waypoint (deg) |
362+
| WaypointL:$(N):Rx | ao | Rotation vector X component of waypoint (rad) |
363+
| WaypointL:$(N):Ry | ao | Rotation vector Y component of waypoint (rad) |
364+
| WaypointL:$(N):Rz | ao | Rotation vector Z component of waypoint (rad) |
377365
| WaypointL:$(N):ActionOpt | longout | Selects the waypoint action (0 = none, N = ActionSseqN) |
378366
| WaypointL:$(N):Speed | ao | Speed when moving to waypoint (mm/s) |
379367
| WaypointL:$(N):Acceleration | ao | Acceleration when moving to waypoint (mm/s/s) |

docs/usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ It also has a button to enable/disable teach (freedrive) mode.
7070
<img src="./assets/GUIs/ui/urRobot_control.png" alt="ui-control" width="600">
7171

7272
Although the default control GUI may look similar to typical EPICS motor screens, the robot's joints are *not* true EPICS motors.
73-
The x, y, z, roll, pitch, and yaw motors are virtual axes and moving them will move one or more joint motors. The joint motors
73+
The x, y, z, rx, ry, and rz axes are virtual axes and moving them will move one or more joint motors. The joint motors
7474
themselves are independent of each other, however motion of any joint motor will affect the position of the tool. To reconcile
7575
this and reduce the likelihood of accidentally commanding motion you didn't intend, every time motion completes, the command values
7676
are automatically set to the current readback values, similar to an EPICS motor record.
@@ -133,7 +133,7 @@ dbLoadRecords("$(URROBOT)/db/rtde_control_jog.db", "P=$(PREFIX), PORT=rtde_ctrl"
133133

134134
1. Set the desired speed vector by writing to the jog speed PVs
135135
(`JogSpeedX`, `JogSpeedY`, `JogSpeedZ` in mm/s;
136-
`JogSpeedRoll`, `JogSpeedPitch`, `JogSpeedYaw` in deg/s).
136+
`JogSpeedRx`, `JogSpeedRy`, `JogSpeedRz` in rad/s).
137137
2. Set the acceleration with `$(P)Control:JogAccel` (m/s/s, default 0.5).
138138
3. Process `$(P)Control:JogStart` to begin motion.
139139
4. **Continue processing `JogStart` periodically** to keep the robot moving.

urRobotApp/Db/rtde_control.db

Lines changed: 22 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -600,16 +600,16 @@ record(sseq, "$(P)Control:sync_pose_cmd")
600600
field(LNK4, "$(P)Control:PoseZCmdU CA")
601601
field(WAIT4, "After1")
602602

603-
field(DOL5, "$(P)Receive:PoseRoll")
604-
field(LNK5, "$(P)Control:PoseRollCmdU CA")
603+
field(DOL5, "$(P)Receive:PoseRx")
604+
field(LNK5, "$(P)Control:PoseRxCmd CA")
605605
field(WAIT5, "After1")
606606

607-
field(DOL6, "$(P)Receive:PosePitch")
608-
field(LNK6, "$(P)Control:PosePitchCmdU CA")
607+
field(DOL6, "$(P)Receive:PoseRy")
608+
field(LNK6, "$(P)Control:PoseRyCmd CA")
609609
field(WAIT6, "After1")
610610

611-
field(DOL7, "$(P)Receive:PoseYaw")
612-
field(LNK7, "$(P)Control:PoseYawCmdU CA")
611+
field(DOL7, "$(P)Receive:PoseRz")
612+
field(LNK7, "$(P)Control:PoseRzCmd CA")
613613
field(WAIT7, "After1")
614614

615615
field(LNK8, "$(P)Control:moveL.DISA CA")
@@ -749,129 +749,38 @@ record(calcout, "$(P)Control:PoseZTweakRev")
749749

750750
# -----------------------------------------------------------
751751

752-
record(ao, "$(P)Control:PoseRollCmd")
752+
record(ao, "$(P)Control:PoseRxCmd")
753753
{
754-
field(DESC, "Commanded TCP roll")
754+
field(DESC, "Commanded TCP rx")
755755
field(DTYP, "asynFloat64")
756756
field(OUT, "@asyn($(PORT),3,$(TIMEOUT=1))POSE_CMD")
757-
field(EGU, "deg")
757+
field(EGU, "rad")
758758
field(PINI, 1)
759759
field(PREC, 4)
760760
}
761-
record(ao, "$(P)Control:PoseRollCmdU")
762-
{
763-
field(DESC, "Sets roll target and executes moveL")
764-
field(OUT, "$(P)Control:PoseRollCmd.VAL PP")
765-
field(EGU, "deg")
766-
field(PREC, 4)
767-
field(FLNK, "$(P)Control:moveL.PROC")
768-
}
769-
record(ao, "$(P)Control:PoseRollTweakVal")
770-
{
771-
field(DESC, "TCP roll tweak step size")
772-
field(VAL, 1)
773-
field(EGU, "deg")
774-
field(PREC, 4)
775-
field(DRVL, "0.0")
776-
}
777-
record(calcout, "$(P)Control:PoseRollTweakFwd")
778-
{
779-
field(INPA, "$(P)Control:PoseRollCmdU.VAL")
780-
field(INPB, "$(P)Control:PoseRollTweakVal")
781-
field(CALC, "A + B")
782-
field(OUT, "$(P)Control:PoseRollCmdU PP")
783-
}
784-
record(calcout, "$(P)Control:PoseRollTweakRev")
785-
{
786-
field(INPA, "$(P)Control:PoseRollCmdU.VAL")
787-
field(INPB, "$(P)Control:PoseRollTweakVal")
788-
field(CALC, "A - B")
789-
field(OUT, "$(P)Control:PoseRollCmdU PP")
790-
}
791-
792761
# -----------------------------------------------------------
793762

794-
record(ao, "$(P)Control:PosePitchCmd")
763+
record(ao, "$(P)Control:PoseRyCmd")
795764
{
796-
field(DESC, "Commanded TCP pitch")
765+
field(DESC, "Commanded TCP ry")
797766
field(DTYP, "asynFloat64")
798767
field(OUT, "@asyn($(PORT),4,$(TIMEOUT=1))POSE_CMD")
799-
field(EGU, "deg")
768+
field(EGU, "rad")
800769
field(PINI, 1)
801770
field(PREC, 4)
802771
}
803-
record(ao, "$(P)Control:PosePitchCmdU")
804-
{
805-
field(DESC, "Sets pitch target and executes moveL")
806-
field(OUT, "$(P)Control:PosePitchCmd.VAL PP")
807-
field(EGU, "deg")
808-
field(PREC, 4)
809-
field(FLNK, "$(P)Control:moveL.PROC")
810-
}
811-
record(ao, "$(P)Control:PosePitchTweakVal")
812-
{
813-
field(DESC, "TCP pitch tweak step size")
814-
field(VAL, 1)
815-
field(EGU, "deg")
816-
field(PREC, 4)
817-
field(DRVL, "0.0")
818-
}
819-
record(calcout, "$(P)Control:PosePitchTweakFwd")
820-
{
821-
field(INPA, "$(P)Control:PosePitchCmdU.VAL")
822-
field(INPB, "$(P)Control:PosePitchTweakVal")
823-
field(CALC, "A + B")
824-
field(OUT, "$(P)Control:PosePitchCmdU PP")
825-
}
826-
record(calcout, "$(P)Control:PosePitchTweakRev")
827-
{
828-
field(INPA, "$(P)Control:PosePitchCmdU.VAL")
829-
field(INPB, "$(P)Control:PosePitchTweakVal")
830-
field(CALC, "A - B")
831-
field(OUT, "$(P)Control:PosePitchCmdU PP")
832-
}
833-
834772
# -----------------------------------------------------------
835773

836-
record(ao, "$(P)Control:PoseYawCmd")
774+
record(ao, "$(P)Control:PoseRzCmd")
837775
{
838-
field(DESC, "Commanded TCP yaw")
776+
field(DESC, "Commanded TCP rz")
839777
field(DTYP, "asynFloat64")
840778
field(OUT, "@asyn($(PORT),5,$(TIMEOUT=1))POSE_CMD")
841-
field(EGU, "deg")
779+
field(EGU, "rad")
842780
field(PINI, 1)
843781
field(PREC, 4)
844782
}
845-
record(ao, "$(P)Control:PoseYawCmdU")
846-
{
847-
field(DESC, "Sets yaw target and executes moveL")
848-
field(OUT, "$(P)Control:PoseYawCmd.VAL PP")
849-
field(EGU, "deg")
850-
field(PREC, 4)
851-
field(FLNK, "$(P)Control:moveL.PROC")
852-
}
853-
record(ao, "$(P)Control:PoseYawTweakVal")
854-
{
855-
field(DESC, "TCP yaw tweak step size")
856-
field(VAL, 1)
857-
field(EGU, "deg")
858-
field(PREC, 4)
859-
field(DRVL, "0.0")
860-
}
861-
record(calcout, "$(P)Control:PoseYawTweakFwd")
862-
{
863-
field(INPA, "$(P)Control:PoseYawCmdU.VAL")
864-
field(INPB, "$(P)Control:PoseYawTweakVal")
865-
field(CALC, "A + B")
866-
field(OUT, "$(P)Control:PoseYawCmdU PP")
867-
}
868-
record(calcout, "$(P)Control:PoseYawTweakRev")
869-
{
870-
field(INPA, "$(P)Control:PoseYawCmdU.VAL")
871-
field(INPB, "$(P)Control:PoseYawTweakVal")
872-
field(CALC, "A - B")
873-
field(OUT, "$(P)Control:PoseYawCmdU PP")
874-
}
783+
# -----------------------------------------------------------
875784

876785
record(ao, "$(P)Control:TCPOffset_X")
877786
{
@@ -900,27 +809,27 @@ record(ao, "$(P)Control:TCPOffset_Z")
900809
field(PINI, 1)
901810
field(PREC, 4)
902811
}
903-
record(ao, "$(P)Control:TCPOffset_Roll")
812+
record(ao, "$(P)Control:TCPOffset_Rx")
904813
{
905-
field(DESC, "Roll TCP offset")
814+
field(DESC, "Rx TCP offset")
906815
field(DTYP, "asynFloat64")
907816
field(OUT, "@asyn($(PORT),3,$(TIMEOUT=1))TCP_OFFSET")
908817
field(EGU, "rad")
909818
field(PINI, 1)
910819
field(PREC, 4)
911820
}
912-
record(ao, "$(P)Control:TCPOffset_Pitch")
821+
record(ao, "$(P)Control:TCPOffset_Ry")
913822
{
914-
field(DESC, "Pitch TCP offset")
823+
field(DESC, "Ry TCP offset")
915824
field(DTYP, "asynFloat64")
916825
field(OUT, "@asyn($(PORT),4,$(TIMEOUT=1))TCP_OFFSET")
917826
field(EGU, "rad")
918827
field(PINI, 1)
919828
field(PREC, 4)
920829
}
921-
record(ao, "$(P)Control:TCPOffset_Yaw")
830+
record(ao, "$(P)Control:TCPOffset_Rz")
922831
{
923-
field(DESC, "Yaw TCP offset")
832+
field(DESC, "Rz TCP offset")
924833
field(DTYP, "asynFloat64")
925834
field(OUT, "@asyn($(PORT),5,$(TIMEOUT=1))TCP_OFFSET")
926835
field(EGU, "rad")

urRobotApp/Db/rtde_control_jog.db

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,28 +50,28 @@ record(ao, "$(P)Control:JogSpeedZ") {
5050
field(EGU, "mm/s")
5151
field(PREC, 4)
5252
}
53-
record(ao, "$(P)Control:JogSpeedRoll") {
53+
record(ao, "$(P)Control:JogSpeedRx") {
5454
field(DTYP, "asynFloat64")
5555
field(OUT, "@asyn($(PORT),3,$(TIMEOUT=1))JOG_SPEED")
5656
field(PINI, "YES")
5757
field(VAL, 0.0)
58-
field(EGU, "deg/s")
58+
field(EGU, "rad/s")
5959
field(PREC, 4)
6060
}
61-
record(ao, "$(P)Control:JogSpeedPitch") {
61+
record(ao, "$(P)Control:JogSpeedRy") {
6262
field(DTYP, "asynFloat64")
6363
field(OUT, "@asyn($(PORT),4,$(TIMEOUT=1))JOG_SPEED")
6464
field(PINI, "YES")
6565
field(VAL, 0.0)
66-
field(EGU, "deg/s")
66+
field(EGU, "rad/s")
6767
field(PREC, 4)
6868
}
69-
record(ao, "$(P)Control:JogSpeedYaw") {
69+
record(ao, "$(P)Control:JogSpeedRz") {
7070
field(DTYP, "asynFloat64")
7171
field(OUT, "@asyn($(PORT),5,$(TIMEOUT=1))JOG_SPEED")
7272
field(PINI, "YES")
7373
field(VAL, 0.0)
74-
field(EGU, "deg/s")
74+
field(EGU, "rad/s")
7575
field(PREC, 4)
7676
}
7777

urRobotApp/Db/rtde_control_settings.req

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@ $(P)Control:J6TweakVal
88
$(P)Control:PoseXTweakVal.VAL
99
$(P)Control:PoseYTweakVal.VAL
1010
$(P)Control:PoseZTweakVal.VAL
11-
$(P)Control:PoseRollTweakVal.VAL
12-
$(P)Control:PosePitchTweakVal.VAL
13-
$(P)Control:PoseYawTweakVal.VAL
1411

1512
$(P)Control:TCPOffset_X.VAL
1613
$(P)Control:TCPOffset_Y.VAL
1714
$(P)Control:TCPOffset_Z.VAL
18-
$(P)Control:TCPOffset_Roll.VAL
19-
$(P)Control:TCPOffset_Pitch.VAL
20-
$(P)Control:TCPOffset_Yaw.VAL
15+
$(P)Control:TCPOffset_Rx.VAL
16+
$(P)Control:TCPOffset_Ry.VAL
17+
$(P)Control:TCPOffset_Rz.VAL
2118

2219
$(P)Control:JointSpeed.VAL
2320
$(P)Control:JointAcceleration.VAL

0 commit comments

Comments
 (0)