Skip to content

Commit

Permalink
Only subscribe to the necessary TF
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-amal committed Jun 18, 2024
1 parent 770eb8d commit 0d98522
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/pages/robot/tsx/robot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ export class Robot extends React.Component {
this.createRunStopService();
this.createRobotFrameTFClient();
this.createMapFrameTFClient();
this.subscribeToGripperFingerTF();
this.subscribeToTabletTF();
this.subscribeToWristYawTF();
this.subscribeToHeadTiltTF();
this.subscribeToMapTF();

Expand Down Expand Up @@ -230,6 +227,19 @@ export class Robot extends React.Component {

this.stretchToolParam.get((value: string) => {
console.log("stretch tool: ", value);
if (value === "eoa_wrist_dw3_tool_tablet_12in") {
this.subscribeToTabletTF();
} else if (
[
"eoa_wrist_dw3_tool_sg3",
"tool_stretch_dex_wrist",
"tool_stretch_gripper",
].includes(value)
) {
this.subscribeToGripperFingerTF();
} else {
this.subscribeToWristYawTF();
}
if (this.stretchToolCallback) this.stretchToolCallback(value);
});
}
Expand Down

0 comments on commit 0d98522

Please sign in to comment.