This section describes the steps to be performed if the ROS is installed on an external computer than the one with MATLAB installed. If the ROS and MATLAB are installed on the same computer, see Install ROS Packages and Dependencies for ROS.
This section describes the steps to be performed if the ROS is installed on an external computer than the one with MATLAB installed.
Kinova Robotics provides a set of external ROS packages to communicate and control Gen3 robot. For more information on the individual packages, refer to this GitHub Page. Execute the following steps sequentially to clone required packages and install required dependencies on the computer which is connected to the robot and have ROS installed.
Verify the OS version by executing the following command in the Linux terminal.
The support package has been tested on Ubuntu 18.04 with ROS Melodic and Ubuntu 16.04 with ROS Kinetic.
Verify the ROS version by executing the following command in the Linux terminal.
If the ROS version is detected as
<unknown>, then add
ROS environment variables in your default bash shell launch script. Instructions
to do the same are available under Section 1.5 of this webpage. If you are using ROS
melodic, see this webpage instead.
Install python3 and python3-pip by executing the following command in the Linux terminal.
sudo apt install python3 python3-pip
Install conan using pip and setup a default profile.
sudo python3 -m pip install conan conan config set general.revisions_enabled=1 conan profile new default --detect > /dev/null conan profile update settings.compiler.libcxx=libstdc++11 default
Create a new workspace with
mkdir -p kinova_ws/src cd kinova_ws
Extract the contents of the ZIP file to the
src folder. The
src folder should contain
Navigate to the workspace folder that you have created in step 5 (for example,
kinova_ws). Install dependencies from the custom ROS
packages by executing the following command in the Linux terminal.
rosdep install --from-paths src --ignore-src -y
Build the workspace using
catkin tool. Additionally, if you
are configuring a NVIDIA®
Jetson® compute board, append
-DCONAN_TARGET_PLATFORM=jetson to the below command:
This will take a few minutes to complete.
Ensure the connection with the robot over Wi-Fi or Ethernet. If you are using the Ethernet port to connect with the robot, then configure your network adaptor to communicate with the robot. Refer to Set Up Network Adapter and Basic Network Ping for more details.
If you are using the Vision module, perform the setup instructions mentioned in the following section else go to Configure MATLAB for Custom ROS Message Definitions for Kinova Gen3.
Kinova Robotics provides set of external ROS packages to acquire various image data from the vision module of Gen3 robot. For more information on the ROS packages, refer to this GitHub Page. Execute the following steps sequentially to clone required packages and install required dependencies.
Install GStreamer and associated packages by executing the following command in the Linux terminal.
sudo apt install gstreamer1.0-tools gstreamer1.0-libav libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev gstreamer1.0-plugins-good gstreamer1.0-plugins-base
rgbd launch ROS package.
In the below command, you need to specify the correct ROS version,
according to your ROS installation version.
sudo apt-get install ros-kinetic-rgbd-launch
Navigate to the
src folder that has been created in the
Step 5 of the earlier setup process. Clone the required ROS packages in the
git clone https://github.com/Kinovarobotics/ros_kortex_vision.git
Build the workspace using catkin tool. This will take a few minutes to complete.
catkin_make catkin_make install
This section explains the steps to be performed on the computer which has MATLAB installed.
The ROS package kortex_driver supplied by Kinova Robotics contains custom ROS messages which are not part of the default message catalog of MATLAB. Hence, the message definition of these custom messages must be added to the MATLAB to communicate with the robot using ROS.
Pre-generated custom message definitions are included with this support package. The pre-configured message definitions are generated from the ROS package kortex_driver, as supplied by Kinova Robotics. If you want to modify the message definitions or create your own ROS package, which is dependent on kortex_driver, then refer to Add Custom ROS Message Definitions to MATLAB for more details on the workflow.
Execute the following function to add custom ROS message definitions to message catalog.
Status = codertarget.robotmanipulator.internal.addCustomROSmsg;
If custom ROS message definitions are added to the ROS message catalog, the function returns true.
The setup is complete. Continue with the hardware setup screens and refer to the Read Current Joint Angles from KINOVA Gen3 Robot Arm example to acquire joint angles from the robot.