fzi-forschungszentrum-informatik / cartesian_controllers

A set of Cartesian controllers for the ROS1 and ROS2-control framework.
BSD 3-Clause "New" or "Revised" License
351 stars 100 forks source link

Add optionnal end effector transform offset for the cartesian force controller #158

Closed captain-yoshi closed 6 months ago

captain-yoshi commented 6 months ago

This is usefull when the end effector link is not part of the robot kinematic chain, e.g. when a gripper takes a screw driver. This parameter is optionnal and defaults to identity. Tested on a real robot (UR3).

Configuration exemple:

my_cartesian_force_controller:
  type: "position_controllers/CartesianForceController"
  robot_base_link: "ur3_base_link"
  end_effector_link: "robotiq_2f140_tcp"
  ft_sensor_ref_link: "robotiq_ft300_frame_id"
  hand_frame_control: true # Indicate in which frame the target_wrench is given:
                           #     True = given in end_effector_link coordinates,
                           #     False = given in robot_base_link coordinates
  # Current PR
  end_effector_transform_offset:
    x: 0
    y: 0
    z: 0
    # Rotate -pi/2 wrt. the end_effector_link Y axis
    qx: 0
    qy: -0.7071068
    qz: 0
    qw: 0.7071068

  # Alternate 1
  end_effector_transform_offset:
    position: {x: 0, y: 0, z: 0}
    orientation: {qx: 0, qy: -0.7071068, qz: 0, qw: 0.7071068}

  # Alternate 2
  end_effector_transform_offset:
    [0, 0, 0, 0, -0.7071068, 0, 0.7071068]  # [x, y, z, qx, qy, qz, qw]
captain-yoshi commented 6 months ago

There is no point in this PR if we can't change the offset dynamically. Should I use the Dynamic reconfigure to do that ?

captain-yoshi commented 6 months ago

Closed in favor #159.