Improve UR5e Joint Positions

Hi,

I’ve imported a UR5e with the urdf-importer to recreate the follow-target task with the UR5e.
So far everything works. But I encountered some bad behavior of the manipulator.

The shoulder_joint always orients itself horizontally. This leads to the issue that some points can’t be reached even if another joint position would make that point reachable. An example of that behavior is shown in the picture below.

I already played around with the Articulation Inspector and Gain Tuner but I actually have no idea what specifically I need to do there to get the intended result.

How can I improve the behavior of the joints?

Many thanks in advance!

1 Like

I recognized that the behavior changes if I load the UR10 model which comes directly with Isaac Sim.
So, I think the .usd file which I use to load my UR5e isn’t the problem.

So this precises my question further:

How do I need to design the robot_descriptor.yaml and ur5e_rmpflow_common.yaml files to improve the behavior of the UR5e.
I didn’t create these files myself because I had no clue what each entry means and couldn’t find a documentation about it.
Currently they look as follows:

robot_descriptor.yaml:

api_version: 1.0

# Defines the generalized coordinates. Each generalized coordinate is assumed
# to have an entry in the URDF, except when otherwise specified below under
# cspace_urdf_bridge.
cspace:
  - shoulder_pan_joint
  - shoulder_lift_joint
  - elbow_joint
  - wrist_1_joint
  - wrist_2_joint
  - wrist_3_joint

root_link: world
subtree_root_link: base_link

default_q: [-1.57, -1.57, -1.57, -1.57, 1.57, 0]

# Most dimensions of the cspace have a direct corresponding element
# in the URDF. This list of rules defines how unspecified coordinates
# should be extracted.
cspace_to_urdf_rules:
  # Example:
  # - {name: robot_finger_joint1, rule: fixed, value: 0.025}

composite_task_spaces: []

collision_spheres:
  - upper_arm_link:
      - center: [0.0, -0.045, 0.01]
        radius: 0.1
      - center: [0.0, -0.045, 0.06]
        radius: 0.09
      - center: [0.0, -0.045, 0.12]
        radius: 0.06
      - center: [0.0, -0.045, 0.18]
        radius: 0.06
      - center: [0.0, -0.045, 0.24]
        radius: 0.06
      - center: [0.0, -0.045, 0.3]
        radius: 0.06
      - center: [0.0, -0.045, 0.36]
        radius: 0.06
      - center: [0.0, -0.045, 0.42]
        radius: 0.06
      - center: [0.0, -0.045, 0.48]
        radius: 0.06
      - center: [0.0, -0.045, 0.54]
        radius: 0.06
      - center: [0.0, -0.045, 0.6]
        radius: 0.08
  - forearm_link:
      - center: [0.0, 0.0, 0.0]
        radius: 0.08
      - center: [0.0, 0.0, 0.06]
        radius: 0.07
      - center: [0.0, 0.0, 0.12]
        radius: 0.05
      - center: [0.0, 0.0, 0.18]
        radius: 0.05
      - center: [0.0, 0.0, 0.24]
        radius: 0.05
      - center: [0.0, 0.0, 0.30]
        radius: 0.05
      - center: [0.0, 0.0, 0.36]
        radius: 0.05
      - center: [0.0, 0.0, 0.42]
        radius: 0.05
      - center: [0.0, 0.0, 0.48]
        radius: 0.05
      - center: [0.0, 0.0, 0.54]
        radius: 0.05
      - center: [0.0, 0.0, 0.57]
        radius: 0.065
  - wrist_1_link:
      - center: [0.0, 0.0, 0.0]
        radius: 0.05
      - center: [0.0, 0.055, 0.0]
        radius: 0.05
      - center: [0.0, 0.11, 0.0]
        radius: 0.065
  - wrist_2_link:
      - center: [0.0, 0.0, 0.0]
        radius: 0.05
      - center: [0.0, 0.0, 0.055]
        radius: 0.05
      - center: [0.0, 0, 0.11]
        radius: 0.065
  - wrist_3_link:
      - center: [0.0, 0.0, 0.0]
        radius: 0.045
      - center: [0.0, 0.05, 0.0]
        radius: 0.05

ur5e_rmpflow_common.yaml:

api_version: 1.0

joint_limit_buffers: [.01, .01, .01, .01, .01, .01]

rmp_params:
    cspace_target_rmp:
        metric_scalar: 50.
        position_gain: 100.
        damping_gain: 50.
        robust_position_term_thresh: .5
        inertia: 1.
    cspace_trajectory_rmp:
        p_gain: 80.
        d_gain: 10.
        ff_gain: .25
        weight: 50.
    cspace_affine_rmp:
        final_handover_time_std_dev: .25
        weight: 2000.
    joint_limit_rmp:
        metric_scalar: 1000.
        metric_length_scale: .01
        metric_exploder_eps: 1e-3
        metric_velocity_gate_length_scale: .01
        accel_damper_gain: 200.
        accel_potential_gain: 1.
        accel_potential_exploder_length_scale: .1
        accel_potential_exploder_eps: 1e-2
    joint_velocity_cap_rmp:
        max_velocity: 2.15
        velocity_damping_region: 0.5
        damping_gain: 300.
        metric_weight: 100.
    target_rmp:
        accel_p_gain: 80.
        accel_d_gain: 120.
        accel_norm_eps: .075
        metric_alpha_length_scale: .05
        min_metric_alpha: .01
        max_metric_scalar: 10000.
        min_metric_scalar: 2500.
        proximity_metric_boost_scalar: 20.
        proximity_metric_boost_length_scale: .02
        accept_user_weights: false
    axis_target_rmp:
        accel_p_gain: 200.
        accel_d_gain: 40.
        metric_scalar: 10.
        proximity_metric_boost_scalar: 3000.
        proximity_metric_boost_length_scale: .05
        accept_user_weights: false
    collision_rmp:
        damping_gain: 50.
        damping_std_dev: .04
        damping_robustness_eps: 1e-2
        damping_velocity_gate_length_scale: .01
        repulsion_gain: 1200.
        repulsion_std_dev: .01
        metric_modulation_radius: .5
        metric_scalar: 10000.
        metric_exploder_std_dev: .02
        metric_exploder_eps: .001
    damping_rmp:
        accel_d_gain: 30.
        metric_scalar: 50.
        inertia: 100.

canonical_resolve:
    max_acceleration_norm: 50.
    projection_tolerance: .01
    verbose: false

body_cylinders:
    - name: base_link
      pt1: [0, 0, 0.22]
      pt2: [0, 0, 0]
      radius: .09

body_collision_controllers:
  - name: wrist_2_link
    radius: .04
  - name: wrist_3_link
    radius: .04
  - name: tool0
    radius: .04
1 Like

I solved it by setting the default_q parameters to [0,-1.57,0,-1.57,0,0] so that the manipulator stands upright before calculating the positions.
This leads to desired the behavior that all positions get approached from above.
I don’t really know if this is the best solution but it’s sufficient for my purpose.
If anybody reading this thread has an idea how to solve this problem more generally, fell free to answer.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.