Manipulator controlling ROS package with moveit! for V-rep simulation / Local kinova jaco2 machine
Currently tested in Ubuntu 18.04 and ROS melodic
Installation in Ubuntu 18.04 with ROS melodic is recommended (since other version of ROS or ubuntu distro were not tested)
V-rep source can be downloaded from here and should be installed within the /opt
folder. Installed location can be varied, but should be matched with the vrep_path argument within the launch file: vrep_jaco_bringup/launch/bringup.launch: vrep_path
sudo apt-get install ros-<distro>-moveit-core
sudo apt-get install ros-<distro>-moveit-ros
sudo apt-get install ros-<distro>-rviz-visual-tools
sudo apt-get install ros-<distro>-moveit-visual-tools
sudo apt-get install ros-<distro>-ompl
sudo apt-get install ros-<distro>-moveit-planners-ompl
sudo apt-get install ros-<distro>-trac-ik-kinematics-plugin
sudo apt-get install ros-<distro>-moveit-resources
- If your libqt5x11extras5 version is greater than 5.5.1-3build1, you should downgrade your libqt with command
sudo apt-get install libqt5x11extras5=5.5.1-3build1
in order to install ros--rviz-visual-tools
Build your repo with catkin_make
command in the directory where your src
folder is located.
cd catkin_ws/src
git clone https://github.com/TMmichi/dualarm_manipulator.git
cd ..
catkin_make
After building your repo, source setup.bash
file in your project devel folder to the .bashrc
.
echo "source ~YOUR_PROJECT_FOLDER/devl/setup.bash" >> ~/.bashrc
source ~/.bashrc
Manipulation of a real machine and one in the simulation are much alike from each other.
roslaunch vrep_jaco_bringup bringup.launch
bringup.launch
file will launch a V-rep env with the scene file jaco_table2.ttt
, and initialize the vrep_interface node (C++ api of V-rep).
Api script will initialize actionlib server side that can be connected with the moveit! planning instance.
Bringup launch file DOES NOT include manipulator URDF xacro.
-
Prior to connect ROS-api of V-rep with the simulation environment itself, V-rep should be launched with the designated port number. Default port number has been set to
19997
inaction_client/src/VrepInterface.cpp
line number38
with clientID_. -
If the api client node is running on a separate machine other than the machine with V-rep simulation, IP address should also be clarified, other than the default localhost (
127.0.0.1
)
roslaunch jaco_controller jaco_controller.launch
jaco_controller.launch
includes most of the parameters required from the moveit! package with control parameters and launches the visualization node with RVIZ.
It also launches the ROS node with C++ script jaco_controller.cpp
in folder jaco_controller/src
which initializes the actionlib client side which communicates with the v-rep api server side.
By using Moveit! package, user does not have to consider action/state synchronization between the machine in the simulation and the controller node. Providing target gripper pose to the plan()
method and calling move()
within the move_group
instance will publish rostopic with name and type in /USER_DEFINED_NAME/joint_trajectory/goal
and control_msgs/FollowJointTrajectoryActionGoal
respectively. Published topic from move_gropup instance in actionlib client side will then be transfered to the server side and wait till all of the goal joint states in joint_trajectory/goal
to be finished in the simulation.
roslaunch kinova_bringup kinova_robot.launch
roslaunch jaco_controller_kinova jaco_controller_kinova.launch
As it is mentioned before, there is no significant differnece with the simulation ros control script.
kinova-ros_source_code from github@kinova-robotics
V-rep_api from github@JoshSong
controller_script from moveit_tutorial