How to move the TCP using ROS2

Hi all!

My goal is to move the TCP of my UR5e to the desired coordinates, obtained via ComputerVision.
I am using the provided Universal_Robot_ROS2_Driver (binary installed, distro: Humble), connected via ethernet+switch.

I am kindly asking you which is the best method to do it (avoiding to set each joint’s value, but directly sending the target TCP position and orientation):

  1. using MoveIT2 and its MoveGroupInterface (HelloMoveitExample) (MoveitCpp Examples).
  2. using urscript_interface (Custom URscript command) which by the way it stops any other running program and stops the external_control.
  3. obtain the coordinates, load them in a custom program (creating a file), then loaded and played via dashboard_client interface (dashboard_client), stop it , modify it and repeat.
  4. other suggestions?

about [1] i tried to replicate the “HelloMoveIT” example but i am having trouble with the following function:

auto move_group_interface = MoveGroupInterface(node, "ur5e");

since in the move_group_interface.h that constructor (with two inputs) doesen’t exist and maybe “ur5e” is wrong too.

Thanks in advance!
:slight_smile: