Main Content

Control KINOVA Gen3 Robotic Manipulator Using KINOVA KORTEX System Object and Simulink

This example shows how to connect to the KINOVA® Gen3 7-DoF Ultralightweight Robot arm with Simulink. It includes blocks to get feedback from the robot and send control commands.

Introduction

Robotics System Toolbox™ Support Package for Manipulators enables you to control manipulators using MATLAB and Simulink. This support package utilizes APIs provided by robot manufactures to acquire various sensor data, simulate robot models, and control the robot. Prototype algorithms and perform simulations of these robots using rigid body tree models from Robotics System Toolbox or Simscape™ Multibody™ robot models. Connect with the robot hardware to test and validate your algorithms.

In this example, KORTEX™ system object from KINOVA® is used to connect and control the Gen3 robot.

Prerequisites

Model

To open the example model, run the following command at MATLAB command prompt:

open_system('manipdemo_connecttogen3');

The general structure of the model is shown in the figure above. The model consists primarily of two system objects, i.e., Trajectory Feeder and KORTEX Main. The KORTEX Main system is associated with the Kortex™ system object provided by KINOVA® Robotics. The input and output structure of the system object is pre-defined and more information on the interface see kortex System object.

The KORTEX Main system object receives a command to process, and various setpoints form the Trajectory feeder system. The robot specific parameters need to be set before running the Simulink model.

Trajectory Feeder System Object

The KORTEX Main system object receives a command to process, and various setpoints form the Trajectory feeder system. The trajectory feeder system waits for the robot to stop moving and then send the next set of commands. Expected robot motion is similar to the one mentioned in Connect to Kinova Gen3 Robot and Manipulate the Arm using MATLAB.

The trajectory Feeder system object consists of a set of waypoints that the robot will follow. Refer to the setupImpl method of the system object to modify the waypoints.

Run the Model

Note: Ensure that the E-STOP is close to you to stop the movement of robot, as the robot moves according to the specified list of waypoints.

After configuring the robot specific parameters, click SIMULATE on the Simulink toolbar and then click Run. The robot starts moving based on the set of waypoints, and all the waypoints are executed.