Skip to content

Latest commit

 

History

History
332 lines (292 loc) · 19 KB

Readme.md

File metadata and controls

332 lines (292 loc) · 19 KB

UF ROBOT Moveit Config

  • This package is used to control various robotic arms of UFACTORY through moveit
  • Support xArm5/xArm6/xArm7/Lite6/UFACTORY850 series robotic arms
  • This package can replace the use of the following packages, the startup script and some parameters are different
    • xarm5_moveit_config/xarm5_gripper_moveit_config/xarm5_vacuum_moveit_config
    • xarm6_moveit_config/xarm6_gripper_moveit_config/xarm6_vacuum_moveit_config
    • xarm7_moveit_config/xarm7_gripper_moveit_config/xarm7_vacuum_moveit_config
    • lite6_moveit_config
  • This package is not generated by moveit_setup_assistant, currently does not support using moveit_setup_assistant to modify

xArm 5

  • Moveit! Graphical control interface + Rviz visual simulation

    roslaunch uf_robot_moveit_config xarm5_moveit_fake.launch <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_xarm5_moveit_fake.launch <optional parameters>
  • Moveit! Graphical Control Interface + Real Robotic Arm

    # Make sure that the robotic arm is powered on and the emergency stop switch is released, and the network can be connected
    
    roslaunch uf_robot_moveit_config xarm5_moveit_realmove.launch robot_ip:=<IP address of the control box> <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true
    # Velocity Control: velocity_control:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_xarm5_moveit_realmove.launch robot_ip_1:=<IP address of the control box 1> robot_ip_2:=<IP address of the control box 2> <optional parameters>
  • Moveit! Graphical Control Interface + Gazebo Simulation

    roslaunch uf_robot_moveit_config xarm5_moveit_gazebo.launch <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true
    # Velocity Control: velocity_control:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_xarm5_moveit_gazebo.launch <optional parameters>

xArm 6

  • Moveit! Graphical control interface + Rviz visual simulation

    roslaunch uf_robot_moveit_config xarm6_moveit_fake.launch <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_xarm6_moveit_fake.launch <optional parameters>
  • Moveit! Graphical Control Interface + Real Robotic Arm

    # Make sure that the robotic arm is powered on and the emergency stop switch is released, and the network can be connected
    
    roslaunch uf_robot_moveit_config xarm6_moveit_realmove.launch robot_ip:=<IP address of the control box> <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true
    # Velocity Control: velocity_control:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_xarm6_moveit_realmove.launch robot_ip_1:=<IP address of the control box 1> robot_ip_2:=<IP address of the control box 2> <optional parameters>
  • Moveit! Graphical Control Interface + Gazebo Simulation

    roslaunch uf_robot_moveit_config xarm6_moveit_gazebo.launch <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true
    # Velocity Control: velocity_control:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_xarm6_moveit_gazebo.launch <optional parameters>

xArm 7

  • Moveit! Graphical control interface + Rviz visual simulation

    roslaunch uf_robot_moveit_config xarm7_moveit_fake.launch <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_xarm7_moveit_fake.launch <optional parameters>
  • Moveit! Graphical Control Interface + Real Robotic Arm

    # Make sure that the robotic arm is powered on and the emergency stop switch is released, and the network can be connected
    
    roslaunch uf_robot_moveit_config xarm7_moveit_realmove.launch robot_ip:=<IP address of the control box> <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true
    # Velocity Control: velocity_control:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_xarm7_moveit_realmove.launch robot_ip_1:=<IP address of the control box 1> robot_ip_2:=<IP address of the control box 2> <optional parameters>
  • Moveit! Graphical Control Interface + Gazebo Simulation

    roslaunch uf_robot_moveit_config xarm7_moveit_gazebo.launch <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true
    # Velocity Control: velocity_control:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_xarm7_moveit_gazebo.launch <optional parameters>

Lite 6

  • Moveit! Graphical control interface + Rviz visual simulation

    roslaunch uf_robot_moveit_config lite6_moveit_fake.launch <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_lite6_moveit_fake.launch <optional parameters>
  • Moveit! Graphical Control Interface + Real Robotic Arm

    # Make sure that the robotic arm is powered on and the emergency stop switch is released, and the network can be connected
    
    roslaunch uf_robot_moveit_config lite6_moveit_realmove.launch robot_ip:=<IP address of the control box> <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true
    # Velocity Control: velocity_control:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_lite6_moveit_realmove.launch robot_ip_1:=<IP address of the control box 1> robot_ip_2:=<IP address of the control box 2> <optional parameters>
  • Moveit! Graphical Control Interface + Gazebo Simulation

    roslaunch uf_robot_moveit_config lite6_moveit_gazebo.launch <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true
    # Velocity Control: velocity_control:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_lite6_moveit_gazebo.launch <optional parameters>

UFACTORY 850

  • Moveit! Graphical control interface + Rviz visual simulation

    roslaunch uf_robot_moveit_config uf850_moveit_fake.launch <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_uf850_moveit_fake.launch <optional parameters>
  • Moveit! Graphical Control Interface + Real Robotic Arm

    # Make sure that the robotic arm is powered on and the emergency stop switch is released, and the network can be connected
    
    roslaunch uf_robot_moveit_config uf850_moveit_realmove.launch robot_ip:=<IP address of the control box> <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true
    # Velocity Control: velocity_control:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_uf850_moveit_realmove.launch robot_ip_1:=<IP address of the control box 1> robot_ip_2:=<IP address of the control box 2> <optional parameters>
  • Moveit! Graphical Control Interface + Gazebo Simulation

    roslaunch uf_robot_moveit_config uf850_moveit_gazebo.launch <optional parameters>
    # Load Gripper: add_gripper:=true
    # Load Vacuum Gripper: add_vacuum_gripper:=true
    # Velocity Control: velocity_control:=true

    Dual robotic arm control

    roslaunch uf_robot_moveit_config dual_uf850_moveit_gazebo.launch <optional parameters>

Moveit! Planner

  • Start the Planner control node

    • Moveit! Planner + Rviz visual simulation

      roslaunch xarm_planner robot_planner_fake.launch robot_type:=xarm dof:=7 <optional parameters>
      # robot_type: xarm/lite/uf850
      # dof: 
      #   robot_type=xarm: dof=5/6/7
      #   robot_type=lite/uf850: dof=6
    • Moveit! Planner + Real Robotic Arm

      roslaunch xarm_planner robot_planner_realmove.launch robot_ip:=<your controller box LAN IP address> robot_type:=xarm dof:=7 <optional parameters>
      # robot_type: xarm/lite/uf850
      # dof: 
      #   robot_type=xarm: dof=5/6/7
      #   robot_type=lite/uf850: dof=6
  • Call Service for planning (here take xarm7 as an example)

    • For joint-space planning request:

      rosservice call xarm_joint_plan 'target: [1.0, -0.5, 0.0, -0.3, 0.0, 0.0, 0.5]'

      The target elements in this case correspond to each joint target angle in radians, number of elements is same with the DOF.

    • For Cartesian-space point-to-point planning request:

      rosservice call xarm_pose_plan 'target: [[0.28, 0.2, 0.2], [1.0, 0.0, 0.0, 0.0]]'

      The separated fields for Cartesian target correspond to tool frame position (x, y, z) in meters and orientation Quaternions (x, y, z, w).
      Note that this motion is still point-to-point, meaning the trajectory is NOT a straight line.

    • For Cartesian straight line planning request:

      rosservice call xarm_straight_plan 'target: [[0.28, 0.2, 0.2], [1.0, 0.0, 0.0, 0.0]]'

      Command data units are the same with above Cartesian pose command. If planned succesfully, end-effector trajectory will be a straight-line in space. Note that the velocity change may not be as expected during execution. Please refer to MoveGroupInterface documentation to make your modifications to the code if necessary.

      After calling the above planning services, a boolean result named 'success' will be returned.

  • For Execution of planned trajectory:

    Notice: Use Cartesian planning with special care, since trajectory from Moveit (OMPL) planner can be highly random and not necessarily the optimal (closest) solution, Do check it in Rviz befroe confirm to move!

    If solution exists and user want to execute it on the robot, it can be done by service call (recommended) or topic message.

    • Execute by service call (Blocking)

      Call the 'xarm_exec_plan' service with a request data of 'true', the latest planned path will be executed, the service will return after finishing the execution:

      rosservice call xarm_exec_plan 'true'
    • Execute by topic (Non-blocking)

      Just publish a message (type: std_msgs/Bool) to the topic "/xarm_planner_exec", the boolean data should be 'true' to launch the execution, it returns immediately and does not wait for finish:

      rostopic pub -1 /xarm_planner_exec std_msgs/Bool 'true'

Optional Parameters

  • General parameters

    • robot_sn: The SN of the manipulator is used to load the inertial parameters, and generally does not need to be specified unless very precise inertial parameters are required

    • model1300: Whether it is a 1300 model, it is only valid for the xarm series, mainly because the end model has changed, if robot_sn is specified, it will automatically override this parameter according to the SN

    • limited: Whether to limit the joint range to (-180, 180), the default is true

    • attach_to: The link name of the robotic arm attach, the default is world (this name will create a link by default)

    • attach_xyz: The xyz offset of the arm relative to the link of attach_to, the default is '0 0 0'

    • attach_rpy: The rpy offset of the arm relative to the link of attach_to, the default is '0 0 0'

    • add_realsense_d435i: Whether to load the RealSense D435i camera model

      • add_d435i_links: Whether to load the detailed linkage of D435i, only useful when add_realsense_d435i is true
    • add_gripper: Whether to load the gripper, the default is false, the priority is higher than add_vacuum_gripper and add_other_geometry

    • add_vacuum_gripper: Whether to load the vacuum gripper, the default is false, the priority is lower than add_gripper, but higher than add_other_geometry

    • add_other_geometry: Whether to add other geometry models to the end, the default is false, the priority is lower than add_gripper and add_vacuum_gripper

      • geometry_type: The type of geometric model to be loaded supports box/cylinder/sphere/mesh, and the parameters supported by different types are different
      • geometry_mass: Geometric model quality, unit (kg), default 0.1
      • geometry_height: Geometry model height, unit (meter), default 0.1, only valid when geometry_type is box/cylinder/sphere
      • geometry_radius: Geometry model radius, unit (meter), default 0.1, only valid when geometry_type is cylinder/sphere
      • geometry_length: Geometry model length, unit (meter), default 0.1, only valid when geometry_type is box
      • geometry_width: Geometry model width, unit (meter), default 0.1, only valid when geometry_type is box
      • geometry_mesh_filename: The file name of the geometric model, geometry_type is valid for mesh, the file needs to be stored under the xarm_description/meshes/other/ directory, so that there is no need to specify the file directory in the file name
      • geometry_mesh_origin_xyz: The datum reference system of the geometric model is relative to the reference system of the end flange. The geometry_type is mesh and valid. Pay attention to the quotation marks when using: geometry_mesh_origin_xyz:='"0.0 0.0 0.0"'
      • geometry_mesh_origin_rpy: The datum reference system of the geometric model is relative to the reference system of the end flange, and the geometry_type is mesh. Pay attention to the quotation marks when using: geometry_mesh_origin_rpy:='"0.0 0.0 0.0"'
      • geometry_mesh_tcp_xyz: The offset of the end of the geometric model (TCP) relative to the reference frame of the geometric model, valid when geometry_type is mesh. Pay attention to the quotation marks when using: geometry_mesh_tcp_xyz:='"0.0 0.0 0.0"'
      • geometry_mesh_tcp_rpy: The offset of the end of the geometric model (TCP) relative to the reference frame of the geometric model, valid when geometry_type is mesh. Pay attention to the quotation marks when using: geometry_mesh_tcp_rpy:='"0.0 0.0 0.0"'
      # Load the box model (take the virtual xArm7 as an example here)
      roslaunch uf_robot_moveit_config xarm7_moveit_fake.launch add_other_geometry:=true geometry_type:=box
      
      # Load the cylinder model (take the virtual xArm7 as an example here)
      roslaunch uf_robot_moveit_config xarm7_moveit_fake.launch add_other_geometry:=true geometry_type:=cylinder
      
      # Load the sphere model (take the virtual xArm7 as an example here)
      roslaunch uf_robot_moveit_config xarm7_moveit_fake.launch add_other_geometry:=true geometry_type:=sphere
      
      # Load other mesh models (load vacuum_gripper here as an example, if the loaded model is placed in xarm_description/meshes/other, the geometry_mesh_filename parameter only needs to pass the file name) (take virtual xArm7 as an example here)
      roslaunch uf_robot_moveit_config xarm7_moveit_fake.launch add_other_geometry:=true geometry_type:=mesh geometry_mesh_filename:=package://xarm_description/meshes/vacuum_gripper/xarm/visual/vacuum_gripper.stl geometry_mesh_tcp_xyz:='"0 0 0.126"'
    • jnt_stat_pub_rate: Publish frequency of joint_state_publisher, default is 10

    • kinematics_suffix: Specify joint Kinematics parameter file suffix (available for xArm/UF850 produced after August 2023)

      • Generation of Kinematics parameter file:
        cd src/xarm_ros/xarm_description/config/kinematics
        python gen_kinematics_params.py {robot_ip} {kinematics_suffix}
        
        # Note
        # 1. robot_ip represents the IP of the robot arm. You need to connect to the robot arm to obtain the actual parameters.
        # 2. kinematics_suffix represents the suffix of the generated parameter file. If successful, the configuration file will be generated in the xarm_description/config/kinematics/user directory. If kinematics_suffix is AAA, then the corresponding file name is as follows
        #   xarm5: xarm_description/config/kinematics/user/xarm5_kinematics_AAA.yaml
        #   xarm6: xarm_description/config/kinematics/user/xarm6_kinematics_AAA.yaml
        #   xarm7: xarm_description/config/kinematics/user/xarm7_kinematics_AAA.yaml
        #   lite6: xarm_description/config/kinematics/user/lite6_kinematics_AAA.yaml
        #   uf850: xarm_description/config/kinematics/user/uf850_kinematics_AAA.yaml
      • Use of Kinematics parameter file: Specify this parameter when starting the launch file
        • Note that before specifying this parameter, make sure that the corresponding configuration file exists. If it does not exist, you need to connect the robot arm and use above-mentioned script to generate it.
  • Special parameters

    • hw_ns: Namespace, xarm series defaults to xarm, others default to ufactory, only valid in gazebo/realmove startup scripts, the corresponding service name is <hw_ns>/<service_name>
    • velocity_control: Whether to use speed control, only valid in gazebo/realmove startup script, default is false
    • report_type: The report type supports normal/dev/rich, and the default is normal, which is only valid in the realmove startup script. It decides the state feedback rate and content. Refer to the developer manual at chapter 2.1.6 Automatic Reporting Format for the report contents of the three available report type (normal/rich/dev), default type using is "normal".
      • For users who demand high-frequency feedback, report_type:=dev can be specified, then the topics /<hw_ns>/xarm_states and /<hw_ns>/joint_states will be published at 100Hz.

      • For users who want the gpio states being updated at /<hw_ns>/controller_gpio_states topic, please use report_type:=rich, since this reports the fullest information from the controller. As can be seen in developer manual.

      • The report rate of the three types:

        type port No. Frequency GPIO topic F/T sensor topic
        normal 30001 5Hz Not Available Not Available
        rich 30002 5Hz Available Available
        dev 30003 100Hz Not Available Available

        Note: GPIO topic => <hw_ns>/controller_gpio_states. F/T sensor topic => <hw_ns>/uf_ftsensor_ext_states and <hw_ns>/uf_ftsensor_raw_states