- Implementing inverse kinematics code to find the joint values required for moving to a given point in a UR5.
- Validation of the inverse kinematics using direct forward kinematics control of the robot to move to the said position.
- Pick and Place of random objects using the validated model.
Requirements
- UR5 Robot
- Ubuntu 18
- ROS Melodic
- Robotiq Gripper
- Universal Robot
- Universal_Robot_Driver
- Robotiq
- Be sure to clone the melodic or melodic supported versions and build your environment using
catkin build
- Install the External_Control Program in UR5 Teach Pendant. Further details have been provided here
- Set the IP address of the robot as 192.168.0.100 in the teach pendant.
- Connect the UR5 controller to the host machine using an ethernet cable.
- Assign a static address, in our case, 192.168.0.77 . Assign the same along with port number as 50002, in the external control program in the teach pendant.
- Run the external control program.
- Run the following command, wherein tool_device_name refers to the robotiq gripper's name.
roslaunch ur_robot_driver ur5e_bringup.launch robot_ip:=192.168.0.100 tool_device_name:=/tmp/ttyUR
Add the python file from this repo into your workspace. As the python file, ur5_inv_py has inverse kinematics for UR5 coded, in Newton Raphson Method, you would be required to add the home configurations, screw matrices, the end effector pose in the code.
Using the topic that the robot subscribes to, /scaled_pos_joint_traj_controller/command trajectory_msgs/JointTrajectory, you can easily try to move the robot by publishing the joint values from the terminal.
The above images shows successful validation of the inverse kinematics mode, by using the inverse kinematics solutions to make the robot do forward kinematics. In the above images, the robot is moved from the home position to the desired end effector position.
- Activate gripper control using the command-
rosrun robotiq_2f_gripper_control Robotiq2FGripperRtuNode.py /tmp/ttyUR
- Open the gripper Ui using the command -
rosrun robotiq_2f_gripper_control Robotiq2FGripperSimpleController.py
Given below are the images that showed point to point pick and place using Inverse Kinematics Solutions.