Skip to content

Commit bea84ec

Browse files
committed
remove where and get_location commands
1 parent 2ac4bd7 commit bea84ec

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

pylabrobot/arms/precise_flex/precise_flex_backend.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -856,36 +856,6 @@ async def get_version(self) -> str:
856856
return await self.send_command("version")
857857

858858
# region LOCATION COMMANDS
859-
async def get_location(
860-
self, location_index: int
861-
) -> tuple[int, int, float, float, float, float, float, float]:
862-
"""Get the location values for the specified station index.
863-
864-
Args:
865-
location_index: The station index, from 1 to N_LOC.
866-
867-
Returns:
868-
A tuple containing (type_code, station_index, val1, val2, val3, val4, val5, val6)
869-
- For Cartesian type (type_code=0): (0, station_index, X, Y, Z, yaw, pitch, roll, unused = 0.0)
870-
- For angles type (type_code=1): (1, station_index, angle1, angle2, angle3, angle4, angle5, angle6) - any unused angles are set to 0.0
871-
"""
872-
data = await self.send_command(f"loc {location_index}")
873-
parts = data.split(" ")
874-
875-
type_code = int(parts[0])
876-
station_index = int(parts[1])
877-
878-
# location stored as cartesian
879-
if type_code == 0:
880-
x, y, z, yaw, pitch, roll = self._parse_xyz_response(parts[2:8])
881-
return (type_code, station_index, x, y, z, yaw, pitch, roll)
882-
883-
# location stored as angles
884-
if type_code == 1:
885-
angle1, angle2, angle3, angle4, angle5, angle6 = self._parse_angles_response(parts[2:])
886-
return (type_code, station_index, angle1, angle2, angle3, angle4, angle5, angle6)
887-
888-
raise PreciseFlexError(-1, "Unexpected response format from loc command.")
889859

890860
async def get_location_angles(
891861
self, location_index: int
@@ -1181,28 +1151,6 @@ async def here_c(self, location_index: int) -> None:
11811151
"""
11821152
await self.send_command(f"hereC {location_index}")
11831153

1184-
# async def where(self) -> tuple[float, float, float, float, float, float, tuple[float, ...]]:
1185-
# """Return the current position of the selected robot in both Cartesian and joints format.
1186-
1187-
# Returns:
1188-
# A tuple containing (X, Y, Z, yaw, pitch, roll, (axis1, axis2, axis3, axis4, axis5, axis6))
1189-
# """
1190-
# data = await self.send_command("where")
1191-
# parts = data.split()
1192-
1193-
# if len(parts) < 6:
1194-
# # In case of incomplete response, wait for EOM and try to read again
1195-
# await self.wait_for_eom()
1196-
# data = await self.send_command("where")
1197-
# parts = data.split()
1198-
# if len(parts) < 6:
1199-
# raise PreciseFlexError(-1, "Unexpected response format from where command.")
1200-
1201-
# x, y, z, yaw, pitch, roll = self._parse_xyz_response(parts[0:6])
1202-
# axes = self._parse_angles_response(parts[6:])
1203-
1204-
# return (x, y, z, yaw, pitch, roll, axes)
1205-
12061154
# region PROFILE COMMANDS
12071155

12081156
async def get_profile_speed(self, profile_index: int) -> float:

0 commit comments

Comments
 (0)