# Project_IFAC_2020 **Repository Path**: stStone/Project_IFAC_2020 ## Basic Information - **Project Name**: Project_IFAC_2020 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-25 - **Last Updated**: 2021-06-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Project IFAC World Congress - 2020 Repository dedicated to the implementation of Adaptive Artificial Potential Fields by Zhang (2017) for the UR5 robotic manipulator using ROS. A new method for controlling UR5 orientation using Artificial Potential Field is proposed. The full project description will be available shortly after acceptance of the publication in IFAC World Congress (2020) ## Author Information Authors: Caio Cristiano Barros Viturino, Ubiratan de Melo Pinto Junior, André Gustavo Scolari Conceição and Leizer Schnitman C. C. B. Viturino, U. M. P. Junior and A. G. S. Conceiçãoo are with the LaR - Robotics Laboratory, Department of Electrical and Computer Engineering, Federal University of Bahia, Salvador, Brazil. E-mails: engcaiobarros@gmail.com, eng.ele.ubiratan@gmail.com, andre.gustavo@ufba.br. L. Schnitman is with Department of Chemical Engineering, Federal University of Bahia, Salvador, Brazil. E-mail: leizer@ufba.br. ## Usage ### To use UR5 with RVIZ + gazebo To bring up the simulated robot in Gazebo, run: `roslaunch ur_gazebo ur5.launch` For setting up the MoveIt! nodes to allow motion planning run: `roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true` In order to start RViz with a configuration including the MoveIt! Motion Planning plugin run: `roslaunch ur5_moveit_config moveit_rviz.launch config:=true` Run the node corresponding to the file UR5_CPA_Gazebo.py `rosrun custom_codes UR5_CPA_Gazebo.py` If you want to see all the parameters related to UR5_CPA_Gazebo, please run the following command: `rosrun custom_codes UR5_CPA_Gazebo.py --h` If you are working with real UR5 use the following command: `roslaunch ur_modern_driver ur5_bringup.launch robot_ip:=ROBOT_IP` ## Required packages See custom_codes/requirements.txt for more info ## Changes in universal_robot pkg Substitute custom_codes/moveit.rviz in universal_robot/ur5_moveit_config/moveit.rviz If TF lookupTransform is used, it is necessary to create a new frame corresponding to the end effector. To do this, add the following lines to the ur5.urdf.xacro file: ```html ``` Add these lines to ur_gazebo/ur5gripper_controllers.yaml ```yaml gripper: type: position_controllers/JointTrajectoryController joints: - robotiq_85_left_knuckle_joint constraints: goal_time: 0.6 stopped_velocity_tolerance: 0.05 simple_gripper_robotiq_85_left_knuckle_joint: {trajectory: 0.1, goal: 0.1} stop_trajectory_duration: 0.5 state_publish_rate: 25 action_monitor_rate: 10 ``` Add these lines to ur_gazebo/ur5.launch ```html ``` Change ur5_moveit_config/config/controllers.yaml according to the following: ```yaml controller_list: #-------------for gazebo UR5------------------------------- - name: "arm_controller" action_ns: follow_joint_trajectory type: FollowJointTrajectory joints: - shoulder_pan_joint - shoulder_lift_joint - elbow_joint - wrist_1_joint - wrist_2_joint - wrist_3_joint #-------------for gazebo gripper--------------------------- - name: "gripper" action_ns: follow_joint_trajectory type: FollowJointTrajectory default: true joints: - robotiq_85_left_knuckle_joint ``` Change ur5_moveit_config/config/fake_controllers.yaml according to the following: ```yaml controller_list: - name: fake_manipulator_controller joints: - shoulder_pan_joint - shoulder_lift_joint - elbow_joint - wrist_1_joint - wrist_2_joint - wrist_3_joint - name: fake_gripper_controller joints: - robotiq_85_left_knuckle_joint # modified -> original [] initial: - group: manipulator pose: up ``` Change ur5_moveit_config/ur5.srdf according to the following: create a group called manipulator according to the code: ```html ``` create a group called only_manipulator according to the code: ```html ``` create a group called gripper according to the code: ```html ``` Link the gripper and the manipulator: ```html ``` Configure the passive joint as follows: ```html ``` Disable collision detection: ```html ``` ## How to connect to the real UR5 robot Firstly check the machine IP. The IP configured on the robot must have the last digit different. `ifconfig` Disable firewall `sudo ufw disable` Set up a static IP on UR5 according to the following figure ![IP Config UR5](https://github.com/caiobarrosv/Projeto_ICAR_2019/blob/master/imgs/config.jpg) Set up a connection on Ubuntu according to the following figure ![IP Config Ubuntu](https://github.com/caiobarrosv/Projeto_ICAR_2019/blob/master/imgs/config_ethernet2.jpg) Start ROS with RViz + Gazebo Bring up - The configured ip must be the same as the robot `roslaunch ur_modern_driver ur5_bringup.launch robot_ip:=169.254.113.30`