-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Currently, operator uses incrementalMove commands for small adjustments with the lift, head, and wrist. However, incrementalMove's nature makes it much harder to read and understand what it's doing compared to one of the autogenerated functions called "lookLeft" for example. As such, we want to replace the incrementalMoves inside of the operator file with the appropriate autogenerated functions from remoterobot to make the code base cleaner and more readable.
The lines where the remoterobot autogenerated functions are being created (might need to change modifier's type to any):
stretch_web_interface/src/pages/operator/ts/remoterobot.ts
Lines 198 to 214 in c250acd
| for (let [groupName, groups] of Object.entries(RemoteRobot.COMMANDS)) { | |
| for (let [name, methodName] of Object.entries(groups)) { | |
| if (methodName === null) { | |
| methodName = groupName + name[0].toUpperCase() + name.substr(1); | |
| } | |
| RemoteRobot.prototype[methodName] = function (modifier: string) { | |
| let cmd: cmd = { | |
| type: "command", | |
| subtype: groupName, | |
| name: name, | |
| modifier: modifier, | |
| }; | |
| this.robotChannel(cmd); | |
| this.emitCommandEvent(cmd); | |
| } | |
| } | |
| } |
The commit where we changed from the autogenerated functions to incrementalMove:
b42724f