Skip to content

Latest commit

 

History

History
135 lines (79 loc) · 4.91 KB

README.md

File metadata and controls

135 lines (79 loc) · 4.91 KB

EZGripper

A ROS2 package that serves as a driver to the EZGripper module designed by SAKE Robotics. If you are not using ROS, use https://github.com/SAKErobotics/SAKErobotics

Tutorial

Installation


  • Install the python EZGripper library. Use the python3 version from the ubuntu 20.04 branch.

  • Install gazebo_ros2_control to enable Gazebo to mimic the EZGripper joints:

    git clone https://github.com/leander-dsouza/gazebo_ros2_control -b foxy
    
  • Install all the remaining dependencies using rosdep, at the root of your ROS workspace:

    rosdep install --from-paths src --ignore-src -r -y
    
  • Clone the ROS2 Driver at your src folder:

    git clone --branch=foxy-devel https://github.com/blackcoffeerobotics/EZGripper_ros2.git
    
  • Build your workspace and source it:

    colcon build --symlink-install
    source install/setup.bash
    
  • For testing hardware through a joystick, connect your USB joystick to the system and execute:

    ros2 launch ezgripper_driver joy.launch.py
    

Simulation testing


  • Launch the gripper module in RViz :

    ros2 launch ezgripper_description display.launch.py
    
  • Similarly to launch in Gazebo:

    ros2 launch ezgripper_gazebo gazebo.launch.py
    
  • To actuate the gripper into its respective open/close configurations in Gazebo:

    # Open Gripper
    ros2 run ezgripper_control open_gripper
    
    # Close Gripper
    ros2 run ezgripper_control close_gripper
    
  • Result of actuation:

    ezgripper_gif

MoveIt!


  • To launch the ezgripper in Gazebo and RViz for control:

    ros2 launch ezgripper_single_mount_moveit_config demo_gazebo.launch.py
    
  • To control the ezgripper hardware through MoveIt!:

    ros2 launch ezgripper_single_mount_moveit_config ezgripper_single_mount_moveit_planning_execution.launch.py
    

Additional Configurations

  • Setup parameters in joy.yaml file

    • port -
              serial device (like /dev/ttyUSB0) or tcp endpoint (like 192.168.0.200:5000) to use.

    • baudrate -
              baud rate of the serial device, not used for tcp.

    • no_of_grippers -
              number of grippers to control.

    • Depending upon the number of grippers, gripper profiles can be created as shown:

      gripper_1:
      	action_name: gripper_cmd
      	servo_ids: [1]
      	module_type: dual_gen2_single_mount
      	robot_ns: main
      

      action_name -
              name of the action to be used.
      servo_ids -
              list of servo ids to control. (several ids if several grippers are to be used as one group). For example [9] and [10,11] for two grippers.
      By default, SAKE Robotics delivers its grippers with address 1 for Duals and 1 and 2 for Quads and 57kbps.
      robot_ns -
              namespace of the robot.

  • Example launch files to support various EZGripper configurations.

    ros2 launch ezgripper_driver joy.launch.py
    # joy.launch is configured for a single servo gripper (dual) and the USB interface
    
    ros2 launch ezgripper_driver joy2.launch.py
    # joy2.launch is configured for two independent servos (quad independent) and the USB interface
    
    ros2 launch ezgripper_driver joy2sync.launch.py
    # joy2sync.launch controls two servos as if it were a single servo (quad dependent) and the USB interface
    
    ros2 launch ezgripper_driver joy_tcp.launch.py
    # joy_tcp.launch controls a single servo via TCP instead of USB
    

Action API


URDF Models


Access the URDF models for additional information.

TroubleShooting


Serial connection issues:

  • The following message indicates you have a new version of serial library that causes issues.

    Error message: 'Serial' object has no attribute 'setParity'  ---
    

    Do the following command to load an older serial library.

    sudo apt-get install python3-serial==2.0.0
    
  • This indicates the user does not have privileges to use the /dev/ttyUSBx:

    Error message: permission denied (get accurate error message).
    

    The solution is to add the <user> to the dialout group. After executing the following command, reboot.

    sudo adduser <user> dialout
    reboot