This repo is designed for control Kinova Jaco2 remotely at any platform.
The server end is running ROS Indigo on Ubuntu 14.04 since the official kinova package supports only upto ROS Indigo, and ROS Indigo only could be installed on Ubuntu 14.04.
The package that we use to communicate is rosbridge. To have a good communication, you may need to use another repo that I mirrored from official package.
0 General Environment Requirement
On ROS end, the Kinova official package kinova-ros is tested in ROS Indigo. Therefore, you need to have the ROS Indigo installed. Although, I believe, there is a way to run this package on ROS Kinect or even higher, I didn't give it a try due to limited time.
Once you have ROS Indigo fully installed, you can follow the instruction on that github page to run real robot control or simulation in gazebo or moveit.
Once you are totally familiar with it, you need to clone a mirrored repo here. The License issue should be dealed with.
Please don't put the original kinova-ros and the mirrored one in the same catkin_ws/src/
, becasue I did not change the node's names, and it will cause some complie issues.
If you want to use the web page that is based on javascript, there is nothing you need to prepare. Oh yes, maybe a Firefox or Chrome would be better for debug.
For the use of python script, you need to use pip install roslibpy
to obtain that module. See here to see the details of this module.
-
Enter command in terminal as follow:
roslaunch arm-control sar_rosbridge_websocket.launch
to start websocket. -
Enter command in terminal as follow:
roslaunch arm-control virtual_j2n6s300.launch
to start RViz. -
Enter command in terminal as follow:
roslaunch arm-control moveit_remote.launch
to start movement. And if you want to control through end-effector position, please useroslaunch arm-control moveit_remote_xyz.launch
instead.
Note: In JS html page, you couldn't read file directly while you are running some scripts due to web browser security issue.
-
Open "arm-control/websocket/html/communicate_w_kinova.html" to connect with ROS end. And if you want to control through end-effector position, please use "arm-control/websocket/html/communicate_w_kinova_xyz.html"
-
Edit the values, then push it to control. or just slide the range control to control it in real time.
Note: Although the I should inclued a jupyter notebook script doing the same job to help people to have a better understanding of the code, there is something going wrong with my jupyter kernel in the Ubuntu 14.04. It might be done in the future.
-
Install roslibpy module by
pip install roslibpy
-
Run the python script inside "/websocket/py/" to communicate.
http://wiki.ros.org/ROS/Tutorials/UnderstandingServicesParams
https://answers.ros.org/question/273480/publish-and-subscribe-array-of-vector-as-message/
http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29
https://answers.ros.org/question/250959/connecting-different-computers-via-rosbridge/
- Add end-effector coordinate control
- Update initial position to "Starting Pose" in JS page
- License issue with the kinova-ros pacakge
- Complete constantly reading and writting files in py script.