Skip to content

Commit

Permalink
[hsrb] changed naming and some description parts
Browse files Browse the repository at this point in the history
  • Loading branch information
sunava committed Apr 22, 2024
1 parent 5b88866 commit e7df23f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/pycram/process_modules/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .pr2_process_modules import Pr2Manager
from .boxy_process_modules import BoxyManager
from .donbot_process_modules import DonbotManager
from .hsr_process_modules import HSRBManager
from .hsrb_process_modules import HSRBManager
from .default_process_modules import DefaultManager
from .stretch_process_modules import StretchManager

Expand Down
6 changes: 3 additions & 3 deletions src/pycram/robot_descriptions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from .boxy_description import BoxyDescription
from .donbot_description import DonbotDescription
from .hsr_description import HSRDescription
from .hsrb_description import HSRBDescription
from .pr2_description import PR2Description
from .ur5_description import UR5Description
from .tiago_description import TiagoDescription
Expand Down Expand Up @@ -56,8 +56,8 @@ def update_robot_description(robot_name=None, from_ros=None):
description = PR2Description
elif 'boxy' in robot:
description = BoxyDescription
elif 'hsr' in robot:
description = HSRDescription
elif 'hsrb' in robot:
description = HSRBDescription
elif "ur5_robotiq" in robot:
description = UR5Description
elif "tiago_dual" in robot:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from ..robot_description import *


class HSRDescription(RobotDescription):
class HSRBDescription(RobotDescription):

def __init__(self):

super().__init__("hsrb", "base_footprint", "base_link", "arm_lift_link", "arm_lift_joint")
# Camera
head_center_camera = CameraDescription("head_center_camera_frame",
Expand All @@ -25,25 +24,29 @@ def __init__(self):
# Neck
neck_links = ["head_pan_link", "head_tilt_link"]
neck_joints = ["head_pan_joint", "head_tilt_joint"]
neck_forward = {"forward": [0.0, 0.0], "down": [0.0, -0.7]}
neck_forward = {"forward": [0.0, 0.0], "down": [0.0, 0, 0]}
neck_chain = ChainDescription("neck", neck_joints, neck_links, static_joint_states=neck_forward)
self.add_chain("neck", neck_chain)
# Arm
arm_joints = ["arm_flex_joint", "arm_roll_joint", "wrist_flex_joint", "wrist_roll_joint"]
arm_links = ["arm_flex_link", "arm_roll_link", "wrist_flex_link", "wrist_roll_link"]
arm_carry = {"park": [0, 1.5, -1.85, 0]}
gripper_links = ["hand_l_distal_link", "hand_l_spring_proximal_link", "hand_palm_link",
"hand_r_distal_link", "hand_r_spring_proximal_link"]
gripper_joints = ["hand_motor_joint"]
"hand_r_distal_link", "hand_r_spring_proximal_link", "hand_gripper_tool_frame"]
gripper_joints = ["hand_l_proximal_joint", "hand_r_proximal_joint", "hand_motor_joint"]
gripper = GripperDescription("gripper", gripper_links=gripper_links, gripper_joints=gripper_joints,
gripper_meter_to_jnt_multiplier=1.0, gripper_minimal_position=0.0,
gripper_convergence_delta=0.001)
arm_chain = ChainDescription("left", arm_joints, arm_links, static_joint_states=arm_carry)
arm_inter = InteractionDescription(arm_chain, "wrist_roll_link")
arm_manip = ManipulatorDescription(arm_inter, tool_frame="gripper_tool_frame", gripper_description=gripper)
self.add_chain("left", arm_manip)
arm_manip = ManipulatorDescription(arm_inter, tool_frame="hand_gripper_tool_frame", gripper_description=gripper)

self.add_static_gripper_chains("left", {"open": [0.3], "close": [0.0]})
self.grasps = GraspingDescription(
{"front": [-1, 0, -1, 0],
"left": [0, -1, 1, 0],
"right": [0, -1, -1, 0.0],
"top": [-1, 0, 0, 0]})

def get_camera_frame(self, name="head_center_camera"):
# TODO: Hacky since only one optical camera frame from pr2 is used
def get_camera_frame(self, name="head_center_camera_frame"):
return super().get_camera_frame(name)

0 comments on commit e7df23f

Please sign in to comment.