Skip to content

Commit

Permalink
Merge pull request #240 from sunava/costmaplocation
Browse files Browse the repository at this point in the history
[CostmapLocation] for reachability should restrict to hand_links corr…
  • Loading branch information
Tigul authored Dec 12, 2024
2 parents a67b659 + d02b8f0 commit 77e0ca9
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/pycram/designators/location_designator.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,18 @@ def __iter__(self):
World.current_world)
if self.reachable_for:
hand_links = []
if self.reachable_arm is not None:
hand_links = RobotDescription.current_robot_description.get_arm_chain(
self.reachable_arm).end_effector.links

if self.reachable_arm:
arm_chain = RobotDescription.current_robot_description.get_arm_chain(self.reachable_arm)
hand_links += arm_chain.end_effector.links
else:
for chain in RobotDescription.current_robot_description.get_manipulator_chains():
hand_links += chain.end_effector.links
valid, arms = reachability_validator(maybe_pose, test_robot, target_pose,
allowed_collision={test_robot: hand_links})
if self.reachable_arm:
res = res and valid and self.reachable_arm in arms

else:
for description in RobotDescription.current_robot_description.get_manipulator_chains():
hand_links += description.end_effector.links
Expand Down

0 comments on commit 77e0ca9

Please sign in to comment.