diff --git a/armer/models/URDFRobot.py b/armer/models/URDFRobot.py index 9e04fd9..0b3897b 100644 --- a/armer/models/URDFRobot.py +++ b/armer/models/URDFRobot.py @@ -34,8 +34,14 @@ def __init__(self, self.urdf_rtb_path = urdf_file links, name, urdf_string, urdf_filepath = self.URDF_read(urdf_file) else: + self.urdf_rtb_path = None links, name, urdf_string, urdf_filepath = URDFRobot.URDF_read_description(wait=wait_for_description) + # Error handling on missing links (no description was validly provided) + if not links: + rospy.logerr(f"Could not define links (description error)") + return None + self.gripper = gripper if gripper else URDFRobot.resolve_gripper(links) gripper_link = list(filter(lambda link: link.name == self.gripper, links)) diff --git a/cfg/panda_ur5_sim.yaml b/cfg/panda_ur5_sim.yaml index f3514a8..7be5a1e 100644 --- a/cfg/panda_ur5_sim.yaml +++ b/cfg/panda_ur5_sim.yaml @@ -3,12 +3,17 @@ robots: model: urdf_file: franka_description/robots/panda_arm_hand.urdf.xacro qr: [0, -0.3, 0, -2.2, 0, 2.0, 0.78539816339] + gripper: 'panda_hand' + collision_check_start_link: panda_hand + collision_check_stop_link: panda_link7 singularity_thresh: 0.02 - name: ur5 model: urdf_file: ur_description/urdf/ur5_robot.urdf.xacro qr: [-1.57, -0.96, -2.18, -1.57, 1.57, 3.14] gripper: tool0 + collision_check_start_link: wrist_3_link + collision_check_stop_link: wrist_1_link singularity_thresh: 0.02 origin: [-1, 0, 0, 0, 0, 0] # (xyzrpy) publish_transforms: true diff --git a/cfg/ur10_sim.yaml b/cfg/ur10_sim.yaml new file mode 100644 index 0000000..07c1944 --- /dev/null +++ b/cfg/ur10_sim.yaml @@ -0,0 +1,12 @@ +robots: + - name: arm # default namespace + model: + urdf_file: ur_description/urdf/ur10_robot.urdf.xacro + qr: [-1.57, -0.96, -2.18, -1.57, 1.57, 3.14] + gripper: tool0 + collision_check_start_link: wrist_3_link + collision_check_stop_link: wrist_1_link + singularity_thresh: 0.02 +backend: + type: roboticstoolbox.backends.swift.Swift +publish_transforms: true \ No newline at end of file diff --git a/cfg/ur10_ur10_sim.yaml b/cfg/ur10_ur10_sim.yaml index 3ef769c..12198a7 100644 --- a/cfg/ur10_ur10_sim.yaml +++ b/cfg/ur10_ur10_sim.yaml @@ -4,12 +4,16 @@ robots: urdf_file: ur_description/urdf/ur10_robot.urdf.xacro qr: [-1.57, -0.96, -2.18, -1.57, 1.57, 3.14] gripper: tool0 + collision_check_start_link: wrist_3_link + collision_check_stop_link: wrist_1_link singularity_thresh: 0.02 - name: ur10_2 model: urdf_file: ur_description/urdf/ur10_robot.urdf.xacro qr: [-1.57, -0.96, -2.18, -1.57, 1.57, 3.14] gripper: tool0 + collision_check_start_link: wrist_3_link + collision_check_stop_link: wrist_1_link singularity_thresh: 0.02 origin: [1, 0, 0, 0, 0, 3.14] # (xyzrpy) publish_transforms: true diff --git a/cfg/ur3_sim.yaml b/cfg/ur3_sim.yaml index d0f09d6..ca3ad4b 100644 --- a/cfg/ur3_sim.yaml +++ b/cfg/ur3_sim.yaml @@ -2,8 +2,10 @@ robots: - name: arm # default namespace model: urdf_file: ur_description/urdf/ur3_robot.urdf.xacro - gripper: tool0 qr: [-1.57, -0.96, -2.18, -1.57, 1.57, 3.14] + gripper: tool0 + collision_check_start_link: wrist_3_link + collision_check_stop_link: wrist_1_link singularity_thresh: 0.02 backend: type: roboticstoolbox.backends.swift.Swift diff --git a/cfg/ur5_sim.yaml b/cfg/ur5_sim.yaml index 2948c95..0fa4ce1 100644 --- a/cfg/ur5_sim.yaml +++ b/cfg/ur5_sim.yaml @@ -4,6 +4,8 @@ robots: urdf_file: ur_description/urdf/ur5_robot.urdf.xacro qr: [-1.57, -0.96, -2.18, -1.57, 1.57, 3.14] gripper: tool0 + collision_check_start_link: wrist_3_link + collision_check_stop_link: wrist_1_link singularity_thresh: 0.02 backend: type: roboticstoolbox.backends.swift.Swift