Skip to content

Installation and Configuration

Sales

IndySDK is provided exclusively to non-profit organizations such as research institutes and universities. You can use IndySDK after obtaining a user license through an agreement with Neuromeka. For more details, please contact us via email at technical-support@neuromeka.com.

Installation

Please download and install the files in the order provided via the links below. The installation environment differs between STEP2 and STEP3 users, as well as between Windows and Linux users. Therefore, ensure you proceed with the installation according to the controller you're using and the OS of your development PC.

1. Install PlatformSDK

2. Install IndyFramework

3. Install IndySDK

  • The installer will be provided separately to the licensees.

By sequentially installing the downloaded files, you will complete the necessary SDK installation.

Execution

With IndySDK, users can build and execute plugin components directly. This section guides you on how to execute pre-installed plugin components.

Plugin Component Path

You can connect to the control box via SSH and check if the component files are installed in the following path:

- home/user/release/IndyDeployment
   └─ PluginComponents
        ├─ CustomJointControllerCreator.comp
        └─ CustomTaskControlCreator.comp

The Components.json file in the path below must list the names of the components.

- home/user/release/IndyConfigurations
   └─ Cobot
        ├─ ...
        ├─ Plugins
        │    └─ Components.json
        └─ ...    

Components.json

{
    "JointController": "CustomJointControlCreator",
    "TaskController": "CustomTaskControlCreator"
}

Here, the component assigned to JointController replaces the joint controller (MoveJ), and the component assigned to TaskController replaces the task controller (MoveL).

Users can replace the control components in Components.json with their own built components by copying them to the /home/user/release/IndyDeployment/PluginComponents directory.

Robot Execution

The robot starts automatically upon rebooting the control box, but you can also start it manually with the following command:

cd /home/user/release/IndyDeployment
sudo python3 indy_run.py

Note

When the robot is in Idle mode, the default controller operates. During the execution of MoveJ and MoveL motions through Conty or the Indy API, the user's controller takes over. MoveJ and MoveL can also be executed from Conty's "Move" tab during jog motion and added through the "Program" tab. For detailed information about motion operation, please refer to the Conty manual and IndyAPI manual.

Component Activation

The executed robot needs to be activated using the gRPC protocol (IndyDCP3) in order to use the components.

If the component use is not activated, the robot operates with the default controller provided by Neuromeka. Activating it enables the user-built component controller. The gRPC protocol for component activation with IndyDCP3 is as follows:

Download example code

Activate IndySDK

  • Request SDK License to Neuromeka, enter license_key and expire_date to activate IndySDK
  • SetCustomControlMode() does not work if SDK is not activated
    from interfaces.control_socket_client import ControlSocketClient
    from interfaces.config_socket_client import ConfigSocketClient
    
    ip = '192.168.0.1' # <- Your Robot IP address
    control = ControlSocketClient(ip)
    config = ConfigSocketClient(ip)
    
    _license_key = '' # <- You can get the license key from neuromeka
    _expire_date = '' # <- And also you can get the expire date from neuromeka
    control.ActivateIndySDK(license_key=_license_key, expire_date=_expire_date)
    

Gain tunning

  • When using the custom controller, the control gain is initially set to 0.
  • You need to set the gain value using the SetCustomControlGain() function before using the robot.
    gain0 = [75, 75, 75, 75, 75, 75]    # Kp
    gain1 = [20, 20, 20, 20, 20, 20]    # Kv
    
    config.SetCustomControlGain(gain0=gain0, gain1=gain1)
    

Activate custom controller

  • To activate the custom controller, you can use SetCustomControlMode(mode=1)
    mode = 1
    control.SetCustomControlMode(mode=mode)
    

Check custom control mode.

  • To verify that the custom controller is running, you can use GetCustomControlMode().
  • 0 indicates the default robot controller is running, while 1 indicates the custom robot controller is running.
    mode = control.GetCustomControlMode()
    print(mode)
    

Activate default controller

  • To deactivate the custom controller and switch to the default robot controller, use SetCustomControlMode(mode=0)
    mode = 0
    control.SetCustomControlMode(mode=mode)
    

Activation can be done as follows using Python IndyDCP3.

This allows control of the actual robot or simulation robot through Conty or the Indy API.

IndySDK Components

By default, IndySDK users can build and execute components that replace the Joint Controller and the Task Controller.

Component Deploy Name in JSON Description
Joint Controller (MoveJ) CustomJointController Calculates command torque for each joint based on target joint angles.
Task Controller (MoveL) CustomTaskController Calculates command torque for each joint based on target task space position.

Note

The torque calculation function is called at every real-time cycle within the Indy Framework. It is crucial that the computation time of this function does not exceed the cycle time.

For more information, see the following ControlAlgorithm abstract component.

template<typename RobotType>
class ControlAlgorithm : public AlgorithmHolder
{
protected:
    typedef NRMKConfig::ControlGains<RobotType::JOINT_DOF> ControlGains;
    typedef NRMKConfig::CustomControlGains<RobotType::JOINT_DOF> CustomControlGains;
    typedef NRMKMotion::MotionDataPack<RobotType::JOINT_DOF> MotionData;
    typedef NRMKControl::ControlDataPack<RobotType::JOINT_DOF> ControlData;

public:
    typedef RobotType ROBOT;
    typedef typename ROBOT::JointVec JointVec;
    typedef typename ROBOT::JointMat JointMat;

    virtual ~ControlAlgorithm() = default;
    virtual void initialize(ROBOT & robot, double delt) = 0;
    virtual void setGains(const ControlGains &gains) {} // non-pure virtual function
    virtual void reset() {}; // non-pure virtual function
    virtual void reset(ROBOT & robot) {}  // non-pure virtual function
    virtual void reset(int index) { reset(); }
    virtual void setMode(uint64_t& mode) { _controlMode = mode;}
    virtual uint64_t& getMode() { return _controlMode;}  /**< integer control modes for custom controller variations | 0: default controller, 1~: reserved for custom controller */

    virtual void compute(ROBOT &robot, const LieGroup::Vector3D &gravDir, const MotionData &motionData,
                         ControlData &controlData) = 0;

    virtual void setCustomGains(const CustomControlGains & gains) {
        for (int i = 0; i < RobotType::JOINT_DOF; ++i) {
            gain0[i] = gains.customGains.gain0[i];
            gain1[i] = gains.customGains.gain1[i];
            gain2[i] = gains.customGains.gain2[i];
            gain3[i] = gains.customGains.gain3[i];
            gain4[i] = gains.customGains.gain4[i];
            gain5[i] = gains.customGains.gain5[i];
            gain6[i] = gains.customGains.gain6[i];
            gain7[i] = gains.customGains.gain7[i];
            gain8[i] = gains.customGains.gain8[i];
            gain9[i] = gains.customGains.gain9[i];
        }
    }

protected:
    JointVec gain0, gain1, gain2, gain3, gain4, gain5, gain6, gain7, gain8, gain9;
private:
    uint64_t _controlMode = 0U;
public:
    EIGEN_MAKE_ALIGNED_OPERATOR_NEW

};

Abstract Component: Control Algorithm

Joint Control

The Joint Control component allows applying torque to each joint based on the target position, speed, acceleration, and kinematic/dynamic information within the joint space. The calculated joint torque is transmitted directly to the motor drive of each joint.

The target position, speed, and acceleration for each joint can be checked through the following structure:

const JointVec &qDes = motionData.motionPoint.qd;
const JointVec &qdotDes = motionData.motionPoint.qdotd;
const JointVec &qddotDes = motionData.motionPoint.qddotd;

Task Control

The Task Control component enables the calculation and application of target joint torque based on the target position and actual robot position information in 6D space. The calculated joint torque is transmitted directly to the motor drive of each joint.

The target position, speed, and acceleration in the task space can be checked through the following structure:

const JointVec &pDes = motionData.motionPoint.pd;
const JointVec &pdotDes = motionData.motionPoint.pdotd;
const JointVec &pddotDes = motionData.motionPoint.pddotd;