Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

Commit 75062b2

Browse files
Pyreach sync 20220701
1 parent 974df52 commit 75062b2

25 files changed

+3806
-217
lines changed

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ ensure_installed wget
2828
ensure_installed python3-pip
2929
ensure_installed python3-opencv
3030
ensure_installed python3-scipy
31+
ensure_installed python3-absl
32+
ensure_installed python3-shapely
3133

3234
pip3 install --upgrade pip
3335

pyreach/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
from pyreach.oracle import Prediction
4141
from pyreach.oracle import PredictionPickPlacePoint
4242
from pyreach.oracle import PredictionPoint
43+
from pyreach.run_script import RunScript
4344
from pyreach.sim import Sim
4445
from pyreach.text_instruction import TextInstruction
4546
from pyreach.text_instruction import TextInstructions

pyreach/arm.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ class ArmState:
116116
tip_adjust_t_flange: Adjust transform for the tooltip.
117117
tip_adjust_t_base: Pose with the tip adjust applied relative to the base of
118118
the arm.
119+
base_t_origin: Pose of the base of the robot relative to the workcell world
120+
origin.
121+
flange_t_origin: Pose of robot flange relative to the workcell world origin.
122+
tip_adjust_t_origin: Pose with the tip adjust applied relative to the
123+
workcell world origin.
119124
"""
120125

121126
time: float = 0.0
@@ -140,6 +145,9 @@ class ArmState:
140145
robot_mode: RobotMode = RobotMode.DEFAULT
141146
tip_adjust_t_flange: Optional[core.Pose] = None
142147
tip_adjust_t_base: Optional[core.Pose] = None
148+
base_t_origin: Optional[core.Pose] = None
149+
flange_t_origin: Optional[core.Pose] = None
150+
tip_adjust_t_origin: Optional[core.Pose] = None
143151

144152

145153
class Arm(object):
@@ -356,6 +364,7 @@ def to_pose(self,
356364
servo_gain: float = 0.0,
357365
preemptive: bool = False,
358366
controller_name: str = "",
367+
pose_in_world_coordinates: bool = False,
359368
timeout: Optional[float] = None) -> core.PyReachStatus:
360369
"""Move the arm to a target pose synchronously.
361370
@@ -379,6 +388,8 @@ def to_pose(self,
379388
only).
380389
preemptive: True to preempt existing scripts.
381390
controller_name: The name of the controller to send the command to.
391+
pose_in_world_coordinates: If true, pose is in world coordinates,
392+
otherwise if false, pose is in arm base coordinates.
382393
timeout: The amount time to wait before giving up. (Default: no timeout)
383394
384395
Returns:
@@ -404,6 +415,7 @@ def async_to_pose(
404415
servo_gain: float = 0.0,
405416
preemptive: bool = False,
406417
controller_name: str = "",
418+
pose_in_world_coordinates: bool = False,
407419
timeout: Optional[float] = None,
408420
callback: Optional[Callable[[core.PyReachStatus], None]] = None,
409421
finished_callback: Optional[Callable[[], None]] = None) -> None:
@@ -429,6 +441,8 @@ def async_to_pose(
429441
only).
430442
preemptive: True to preempt existing scripts.
431443
controller_name: The name of the controller to send the command to.
444+
pose_in_world_coordinates: If true, pose is in world coordinates,
445+
otherwise if false, pose is in arm base coordinates.
432446
timeout: The amount time to wait before giving up. (Default: no timeout)
433447
callback: An optional callback routine call upon completion.
434448
finished_callback: An optional callback when done.
@@ -563,14 +577,17 @@ def async_stop(
563577

564578
def fk(self,
565579
joints: Union[Tuple[float, ...], List[float], np.ndarray],
566-
apply_tip_adjust_transform: bool = False) -> Optional[core.Pose]:
580+
apply_tip_adjust_transform: bool = False,
581+
pose_in_world_coordinates: bool = False) -> Optional[core.Pose]:
567582
"""Uses forward kinematics to get the pose from the joint angles.
568583
569584
Args:
570585
joints: The robot joints.
571586
apply_tip_adjust_transform: If True, will use the data in the calibration
572587
file for the robot to change the returned pose from the end of the arm
573588
to the tip of the end-effector.
589+
pose_in_world_coordinates: If true, pose is in world coordinates,
590+
otherwise if false, pose is in arm base coordinates.
574591
575592
Returns:
576593
The pose for the end of the arm, or if apply_tip_adjust_transform was

pyreach/common/proto_gen/proxy_downlink_service_pb2.py

Lines changed: 1527 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)