Basic trajectory planning using moveIt! to simulate door opening motion using a Kinova Arm (Jaco 2 - 7 DOF) in Gazebo.
To avoid running into build error issues, I recommend creating a dedicated workspace for all kinova packages. Run the following commands in your terminal to create a new catkin workspace:
- Source your environment
$ source /opt/ros/melodic/setup.bash
replace melodic with your ros distro
- Create and build workspace
$ mkdir -p ~/kinova_ws/src
$ cd ~/kinova_ws/
$ catkin_make
- Source the setup file in the workspace
$ cd ~/kinova_ws/
$ source devel/setup.bash
- Install MoveIt package from the terminal using the following:
sudo apt-get install moveit*
- Git clone the kinova-ros package in the src folder of your workspace and catkin_make using the following commands:
$ cd ~/kinova_ws/src $ git clone https://github.com/Kinovarobotics/kinova-ros.git kinova-ros
$ cd ~/kinova_ws $ catkin_make
Now your system is ready to run kinova-ros package. You can spawn the Kinova arm in Gazebo and visualize the arm in rviz using ROS.
**3. Our next goal is to Fix the Grasping issue using graspit-pkg. You can find the installation guide for graspit-pkg at https://github.com/JenniferBuehler/graspit-pkgs/wiki/Installation Follow only Step 1 and Step 2. No need to clone jaco-arm-pkgs
In addition, install joint-control-pkgs, general-message-pkgs and gazebo-pkgs
cd ~/kinova_ws/src
git clone https://github.com/JenniferBuehler/joint-control-pkgs.git
git clone https://github.com/JenniferBuehler/general-message-pkgs.git
git clone https://github.com/JenniferBuehler/gazebo-pkgs.git
cd ~/kinova_ws
catkin_make
Install the graspit-pkg and its dependencies in the kinova-ros workspace that you have build.
The xacro file for Grasp Fix Plugin is included in our commit.
- Create a new package called kinova_scripts inside the kinova-ros folder using the following commands:
$ cd ~/kinova_ws/src/kinova-ros/
$ catkin_create_pkg kinova_scripts std_msgs rospy roscpp
$ cd ~/kinova_ws
$ catkin_make
-
Next step is to clone our repository
-
Merge the files in the correct folder structure of the kinova-ros package.
For convenience, we have made sure to commit the files in required folder structure.
- Launching the Kinova Arm in a terminal window.
roslaunch kinova_gazebo robot_launch.launch kinova_robotType:=j2s7s300
- Launch moveIt configurations in a seperate terminal window.
roslaunch j2s7s300_moveit_config j2s7s300_gazebo_demo.launch
- Spawn the door in a seperate terminal window.
roslaunch kinova_description door_spawn.launch
- Navigate to the kinova_scripts directory and run the kinova_path_planning.py using:
$ cd kinova_ws/src/kinova-ros/kinova_scripts/src/
$ ./kinova_path_planning.py
The simple door model is considered. Door Handle waypoints are calculated on the circular path that a door is bound to follow. Following with the motion planning is done using the RRT* algorithm.
A sample demo is available at: https://drive.google.com/file/d/1tPfN5mgjaV8Rc22MiduuAmux-9FoBlG4/view?usp=sharing The motion is not very smooth yet.