Creating the MoveIt! IKFast plugin

Creating a MoveIt! IKFast plugin is easy. There is no need to write code; everything can be generated using some tools. The only thing we need to do is to create an empty ROS package. The following are the procedures to create a plugin:

  1. Switch to the ros_industrial workspace in the src folder:
    $ cd ~/ros_industrial_ws/src
  
  1. Create an empty package in which the name should contain the robot name and model number. This package is going to convert into the final plugin package using the plugin generation tool:
    $ catkin_create_pkg abb_irb6640_moveit_plugins
  
  1. Build the workspace using the catkin_make command.
  2. After building the workspace, copy ikfast.h to abb_irb6640_moveit_plugins/include
  1. Switch to the folder where we created the output_ikfast61.cpp file and the robot DAE file. Rename the output_ikfast61.cpp file to abb_irb6640_manipulator_ikfast_solver.cpp. This filename consists of robot name, model number, type of robot, and so on. This kind of naming is necessary for the generating tool.

After performing these steps, open two terminals in the current path where the IK solver CPP file exists. In one terminal, start the roscore command.

In the next terminal, we can enter the plugin creation command as follows:

    $ rosrun moveit_ikfast create_ikfast_moveit_plugin.py abb_irb6640 
manipulator abb_irb6640_moveit_plugins
abb_irb6640_manipulator_ikfast_solver.cpp

The moveit_ikfast ROS package consists of the create_ikfast_moveit_plugin.py script for the plugin generation. The first parameter is the robot name with the model number, the second argument is the type of robot, the third argument is the package name we have created earlier, and the fourth argument is the name of the IK solver CPP file. This tool needs the abb_irb6640_moveit_config package for its working. It will search this package using the given name of the robot. So, if the name of the robot is wrong, the tool for raising an error will say that it couldn't find the robot moveit package.

If the creation is successful, the messages in the following screenshot will be displayed:

Figure 17: Terminal messages of successful creation of IKFast plugin for MoveIt!
Note the possible errors that are discussed at https://github.com/ros-planning/moveit_ikfast/pull/48.

Build ros_industrial_ws again, and we can see that a new plugin is building properly. If it is built, we can replace the default KDL IK solver in the abb_irb6640_moveit_config/config/ kinematics.yaml file to the new solver as follows:

manipulator: 
  kinematics_solver: 
abb_irb6640_manipulator_kinematics/IKFastKinematicsPlugin kinematics_solver_search_resolution: 0.005 kinematics_solver_timeout: 0.005 kinematics_solver_attempts: 3 #manipulator: # kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin # kinematics_solver_search_resolution: 0.005 # kinematics_solver_timeout: 0.005 # kinematics_solver_attempts: 3

After changing this kinematics solver, we can start working on the robot using the following command:

    $ roslaunch abb_irb6640_moveit_config demo.launch
  

We will get the planning window with a ne IK solver as follows:

Figure 18: Motion planning of ABB 6640 using custom IKFast Plugin
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.143.239