Skip to content

Python IndyDCP3 Client

To use the IndyDCP3 client with Python, you must first install the neuromeka package.

You can find Jupyter notebook examples in the Github repository.

Installation Requirements

  • Requires Python version 3.6 or higher. In the current neuromeka-package implementation, Python 3.9+ uses neuromeka.proto, while older Python 3.x environments use neuromeka.proto_step internally.
  • Installation is via pip3 (or pip).

Installation Instructions

You can install the package with the following command in a terminal or command prompt.

pip3 install neuromeka

The package version can be updated with the following terminal command.

pip3 install --upgrade neuromeka

The current version of the installed package can be checked with the following terminal command (release version history).

pip3 show neuromeka

Using IndyDCP3

To create a client object, you need to import the IndyDCP3 class from the neuromeka package.

from neuromeka import IndyDCP3
After creating an IndyDCP3 class object, you must specify the robot's IP address for communication as follows:

indy = IndyDCP3(robot_ip='192.168.0.10', index=0)
  • robot_ip: IP address of the robot controller
  • index: Robot index, used in cases where multiple robots are connected to a controller, like dual-arm robots

Methods and Functions

Below is a list of protocol functions that can be called using the IndyDCP3 object. Please refer to the usage methods and input/output examples for each function.

Note

Most functions return their result as a dict. Local state and wait helpers can return int, list, bool, or None; unimplemented socket runtime methods raise NotImplementedError.


Real-Time Data Acquisition Functions

You can retrieve the robot's current motion status, control data and state, servo motor state, error information, and program status.

Function Description
get_robot_data() Robot status data
get_control_state() Control state
get_motion_data() Motion data
get_servo_data() Servo data
get_violation_data() Error data
get_program_data() Robot program data

Example for get_robot_data()

indy.get_robot_data()
{
  'running_mins': 6,
  'running_secs': 11,
  'op_state': 5,
  'sim_mode': True,  
  'ref_frame': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
  'tool_frame': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
  'running_hours': 0
}

  • running_hours: Robot operating time (hours)
  • running_mins: Robot operating time (minutes)
  • running_secs: Robot operating time (seconds)
  • op_state: Robot state as defined in the OpState class
    • OpState: SYSTEM_OFF(0), SYSTEM_ON(1), VIOLATE(2), RECOVER_HARD(3), RECOVER_SOFT(4), IDLE(5), MOVING(6), TEACHING(7), COLLISION(8), STOP_AND_OFF(9), COMPLIANCE(10), BRAKE_CONTROL(11), SYSTEM_RESET(12), SYSTEM_SWITCH(13), VIOLATE_HARD(15), MANUAL_RECOVER(16), TELE_OP(17)
      from neuromeka import OpState
      OpState.IDLE
      
      5
      
      On v3.4.2 controllers, the POWER_OFF state is currently exposed in the Python neuromeka package through the compatibility value OpState.VIOLATE_HARD == 15.
  • sim_mode: Simulation mode enabled (True)
  • ref_frame: Reference frame ([0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
  • tool_frame: Tool frame ([0.0, 0.0, 0.0, 0.0, 0.0, 0.0])

Example for get_control_state()

indy.get_control_state()
{
  'q': [...],
  'qdot': [...],
  'qddot': [...],
  'qdes': [...],
  'qdotdes': [...],
  'qddotdes': [...],
  'p': [...],
  'pdot': [...],
  'pddot': [...],
  'pdes': [...],
  'pdotdes': [...],
  'pddotdes': [...],
  'tau': [...],
  'tau_act': [...],
  'tau_ext': [...],
  'tau_jts': [...],
  'tau_jts_raw1': [...],
  'tau_jts_raw2': [...],
}

  • q, qdot, qddot: Current positions (deg), velocities (deg/s), and accelerations (deg/s²) of each joint
  • qdes, qdotdes, qddotdes: Target positions (deg), velocities (deg/s), and accelerations (deg/s²) of each joint
  • p, pdot, pddot: Current workspace pose positions (mm), velocities (mm/s), and accelerations (mm/s²)
  • pdes, pdotdes, pddotdes: Target workspace pose positions (mm), velocities (mm/s), and accelerations (mm/s²)
  • tau, tau_act, tau_ext: Current input torques, actual torques, and external torques (Nm) for each joint
  • tau_jts, tau_jts_raw1, tau_jts_raw2: joint torque sensor values.

For example, you can use the following to return the current angles of each joint as a list type.

indy.get_control_state()['q']
[6.069774e-07, -22.08, 103.85, -7.2715176e-07, 98.23, -1.6545988e-10]

Example for get_motion_data()

indy.get_motion_data()
{
 'traj_progress': 100,
 'cur_traj_progress': 100,      
 'is_target_reached': True,
 'is_in_motion': False,
 'is_pausing': False,
 'is_stopping': False,
 'traj_state': 0,  
 'speed_ratio': 100,
 'has_motion': False,
 'motion_id': 0,
 'remain_distance': 0.0,
 'motion_queue_size': 0
}

  • traj_progress: Overall motion progress (%)
  • cur_traj_progress: Current executing motion's progress (%)
  • is_target_reached: Whether the target position has been reached (True/False)
  • is_in_motion: Whether motion is in progress (True/False)
  • is_pausing: Whether motion is paused (True/False)
  • is_stopping: Whether motion is stopped (True/False)
  • traj_state: Motion progress state, with states defined in the TrajState class
    • TrajState: NONE(0), INIT(1), CALC(2), STAND_BY(3), ACC(4), CRUISE(5), DEC(6), CANCELLING(7), FINISHED(8), ERROR(9)
      from neuromeka import TrajState
      TrajState.CALC
      
      2
      
  • speed_ratio: Motion speed ratio, set by set_speed_ratio()
  • has_motion: Whether motion exists (True/False)
  • remain_distance: Remaining distance (mm)
  • motion_id: Current motion ID
  • motion_queue_size: Motion queue size

Example for get_servo_data()

indy.get_servo_data()
{
  'status_codes': ['0x1237', '0x1237', '0x1237', '0x1237', '0x1237', '0x1237'],
  'temperatures': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
  'voltages': [48.0, 48.0, 48.0, 48.0, 48.0, 48.0],
  'currents': [3.4812942e-18,
              26.195215,
              26.963966,
              0.12320003,
              0.55777645,
              4.536144e-05],
  'servo_actives': [True, True, True, True, True, True],
  'brake_act

ives': [False, False, False, False, False, False]
 }

  • status_codes: Status codes (CiA402) for each joint servo
  • temperatures: Temperatures for each joint servo
  • voltages: Voltages for each joint servo
  • currents: Currents for each joint servo
  • servo_actives: Activation state of each joint servo (True/False)
  • brake_actives: Activation state of the brakes for each joint servo (True/False)

Example for get_violation_data()

indy.get_violation_data()
{
  'violation_code': '262144',
  'j_index': 4,
  'i_args': [2],
  'f_args': [0.0012204262],
  'violation_str': 'EMG Button Activated'
}

  • j_index: Index of the joint where the violation occurred
  • i_args: Integer information about the violation
  • f_args: Float information about the violation
  • violation_str: Error message
  • violation_code: Error code
violation_code (Binary) violation_str
0b00 None
0b01 << 0 Joint [axisIdx/DOF] Position Error Over Limit (Current: X deg, Desired: Y, Limit: Z)
0b01 << 1 Joint [axisIdx/DOF] Position Close To Limit (Current: X deg, Allowed: A ~ B)
0b01 << 2 Joint [axisIdx/DOF] Velocity Close To Limit (Current: X deg/s, Allowed: A ~ B)
0b01 << 6 TCP Singular Closed
0b01 << 7 Joint [axisIdx/DOF] Position Exceeded Limit (Current: X, Allowed: A ~ B)
0b01 << 8 Joint [axisIdx/DOF] Velocity Exceeded Limit (Current: X, Allowed: A ~ B)
0b01 << 9 Joint [axisIdx/DOF] Torque Exceeded Limit (Current: X, Allowed: A ~ B)
0b01 << 10 TCP Speed Limit: X m/s
0b01 << 11 TCP Force Limit: X N
0b01 << 12 Power Over Limit (Current: X, Allowed: Y)
0b01 << 13 Standstill Failed
0b01 << 14 Loss of Conty Communication
0b01 << 15 Loss of IndyKey Communication
0b01 << 16 Safety Guard Input 1
0b01 << 17 Safety Guard Input 2
0b01 << 18 EMG Button Activated
0b01 << 19 Robot Specs Reading Failed
0b01 << 20 Connection Lost - Master: masterState, Detected Joints Num: numSlavesDetected / DOF+2
0b01 << 21 Motor Status Error: joint [axisIdx/DOF], Code = errorCode
0b01 << 22 Motor Over Current: joint [axisIdx/DOF], Code errorCode
0b01 << 23 Motor Over Heated: joint [axisIdx/DOF], Temperature X celsius
0b01 << 24 Motor Error Bit: joint [axisIdx/DOF], Code = errorCode
0b01 << 25 Motor Low Battery: joint [axisIdx/DOF], Code = errorCode
0b01 << 26 Motor Firmware Error
0b01 << 27 Task Time Over Limit (Current: X us, Allowed: Y us)
0b01 << 28 Soft Reset Failed
0b01 << 29 Auto Servo-Off Activated
0b01 << 30 TeleOp Starting Point Too Far

Example for get_program_data()

indy.get_program_data()
{
  'program_name': 'ProgramScripts/',
  'program_state': 0,
  'cmd_id': 0,
  'sub_cmd_id': 0,
  'running_hours': 0,
  'running_mins': 0,
  'running_secs': 0,
  'program_alarm': '',
  'program_annotation': ''
}   

  • program_name: Name of the currently running program file
  • program_state: Program execution state
    • ProgramState: IDLE(0), RUNNING(1), PAUSING(2), STOPPING(3)
      from neuromeka import ProgramState
      ProgramState.STOPPING
      
      3
      
  • running_hours: Program operating time (hours)
  • running_mins: Program operating time (minutes)
  • running_secs: Program operating time (seconds)
  • program_alarm: Alarm of Conty Flow control
  • program_annotation: Annotation of Conty Flow control

Device-related functions provide methods to set and query various hardware states of the robot. These methods manage and query the activation state of digital I/O, analog I/O, end-tool I/O, specific device states, and basic information about devices.

Note

Some endtool functions may not be supported depending on the specifications of the robot you purchased.

Function Description
get_di() IO board DI data
get_do() IO board DO data
set_do(do_signal_list) Set IO board DO data
get_ai() IO board AI data
get_ao() IO board AO data
set_ao(ao_signal_list) Set IO board AO data
get_endtool_di() End-tool DI data
get_endtool_do() End-tool DO data
set_endtool_do(end_do_signal_list) Set end-tool DO data
get_endtool_ai() End-tool AI data
get_endtool_ao() End-tool AO data
set_endtool_ao(end_ao_signal_list) Set end-tool AO data
get_device_info() Device information
get_ft_sensor_data() End-tool F/T sensor data
get_ft_sensor_data_for(index: int) Get F/T sensor data for the selected tool
get_gripper_data() Gripper status & telemetry
get_gripper_data_for(index: int) Get gripper state and position for the selected tool
set_gripper_command(command, gripper_type, pvt_data, tool_index=0, gripper_modbus_use: bool=False, gripper_modbus_server_name: str='') Send gripper actuation profile
set_inspire_hand_command(tool_index: int=0, slave_id: int=1, speeds: list=None, forces: list=None, angles: list=None, request_feedback: bool=False, apply_speed: bool=False, apply_force: bool=False, apply_angle: bool=False) Set speed, force, and angle commands for the selected Inspire Hand
get_inspire_hand_state(tool_index: int=0) Get the state of the selected Inspire Hand
set_endtool_rs485_rx(word1, word2) Write endtool RS485 RX buffer words
get_endtool_rs485_rx() Read endtool RS485 RX buffer
get_endtool_rs485_rx_for(index: int) Get the end-tool RS485 receive buffer for the selected tool
get_endtool_rs485_tx() Read endtool RS485 TX buffer
get_endtool_rs485_tx_for(index: int) Get the end-tool RS485 transmit buffer for the selected tool
set_sander_command(sander_type, ip: str, speed: float, state: bool, tool_index=0) Configure/start/stop sander
get_sander_command() Last sander command state
get_sander_command_for(index: int) Get the sander command state for the selected tool
add_photoneo_calib_point(vision_name, px, py, pz, arm_index=0) Photoneo calibration point
get_photoneo_detection(vision_server, object, frame_type) Photoneo detection pose(s)
get_photoneo_retrieval(vision_server, object, frame_type) Photoneo retrieval pose(s)
socket_cmd_set_config(remote_ip: str=None, remote_port: int=None, auto_reconnect: bool=False, rx_buffer_size: int=1024, config: dict=None, name: str='default', timeout_ms: int=0) Configure a Socket Command connection
socket_cmd_get_config() Get the Socket Command connection configuration
socket_cmd_start() Start the Socket Command connection; Error: currently unsupported and raises NotImplementedError
socket_cmd_stop() Stop the Socket Command connection; Error: currently unsupported and raises NotImplementedError
socket_cmd_send_data(data: bytes) Send data through the Socket Command connection; Error: currently unsupported and raises NotImplementedError
socket_cmd_get_latest_data() Get the latest data received through the Socket Command connection; Error: currently unsupported and raises NotImplementedError

Example for get_di()

Digital I/O states are represented as DigitalState values: OFF(0), ON(1), UNUSED(2).

from neuromeka import DigitalState
DigitalState.ON
1

I/O data is returned as a dict type with address representing the IO channel address and state representing the DigitalState.

indy.get_di()
{
  'signals': [
    ...
    {'address': 7, 'state': 2},
    {'address': 8, 'state': 2},
    {'address': 9, 'state': 2},
    {'address': 10, 'state': 2},
    {'address': 11, 'state': 2},
    ...
  ]
}

Example for get_do(), set_do()

To apply an output value with set_do, you must pass a dict type as an argument, as shown in the example below.

1
2
3
4
5
6
7
8
from neuromeka import DigitalState

# Change state of address 1 to ON
signal = [{'address': 1, 'state': DigitalState.ON}]
indy.set_do(signal)

# Check DO state after change
indy.get_do()
{
 'signals': [
  ...,
  {'address': 1, 'state': 1},
  ...
 ]
}

# Simultaneously change address 1 to OFF state,
# address 5 to ON state,
# address 9 to ON state
signal = [{'address': 1, 'state': DigitalState.OFF},
         {'address': 5, 'state': DigitalState.ON},
         {'address': 9, 'state': DigitalState.ON}]
indy.set_do(signal)

# Check DO state after change
indy.get_do()
{
 'signals': [
  ...,
  {'address': 1, 'state': 0},
  ...
  {'address': 5, 'state': 1},
  ...
  {'address': 9, 'state': 1},
  ...
 ]
}

Example for get_ai()

indy.get_ai()
{
  'signals': [    
    {'address': 0, 'voltage': 0},
    {'address': 1, 'voltage': 0},
    {'address': 2, 'voltage': 0},
    {'address': 3, 'voltage': 0},
    {'address': 4, 'voltage': 0},
    {'address': 5, 'voltage': 0},
    {'address': 6, 'voltage': 0},
    {'address': 7, 'voltage': 0}
  ]
}

  • The control box's IO board has 2 AI channels assigned to address 0 and 1. The remaining channels are spare.

Example for get_ao(), set_ao()

1
2
3
4
5
6
7
# Change analog output at address 0 to 7 and address 1 to 2
signal = [{'address': 0, 'voltage': 7},
         {'address': 1, 'voltage': 2}]
indy.set_ao(signal)

# Check AO state after change
indy.get_ao()
{
 'signals': [{'voltage': 7, 'address': 0},
  {'address': 1, 'voltage': 2},
  {'address': 2, 'voltage': 0},
  {'address': 3, 'voltage': 0},
  {'address': 4, 'voltage': 0},
  {'address': 5, 'voltage': 0},
  {'address': 6, 'voltage': 0},
  {'address': 7, 'voltage': 0}]
}

Example for get_endtool_di()

Digital outputs of the end-tool port are defined as EndtoolState class states: UNUSED(0), HIGH_PNP(2), HIGH_NPN(1), LOW_NPN(-1), LOW_PNP(-2)

from neuromeka import EndtoolState
EndtoolState.HIGH_PNP
2

indy.get_endtool_di()
{'signals': [{'port': 'A', 'states': [0, 0]},
  {'port': 'B', 'states': [0, 0]}]}

Example for set_endtool_do(), get_endtool_do()

For RevC end-tool boards, only one C port exists and can be used as follows:

1
2
3
4
5
6
from neuromeka import EndtoolState

signal = [{'port': 'C', 'states': [EndtoolState.HIGH_PNP]}]
indy.set_endtool_do(signal)

indy.get_endtool_do()
{ 'signals': [{'port': 'C', 'states': [2]}] }

For RevE end-tool boards, two end-tool ports, A and B, exist and can be used as follows:

1
2
3
4
5
6
7
from neuromeka import EndtoolState

signal = [{'port': 'A', 'states': [EndtoolState.HIGH_PNP, EndtoolState.HIGH_PNP]},
         {'port': 'B', 'states': [EndtoolState.HIGH_NPN, EndtoolState.HIGH_NPN]}]
indy.set_endtool_do(signal)

indy.get_endtool_do()
{'signals': [{'port': 'A', 'states': [2, 2]},
  {'port': 'B', 'states': [1, 1]}]}

Example for get_endtool_ai()

This can only be used with the RevE endtool board. The RevE endtool board has two AI channels, which are assigned to address 0 and 1, respectively. The remaining channels are reserved.

indy.get_endtool_ai()
{'signals': [{'address': 0, 'voltage': 0},
  {'address': 1, 'voltage': 0},
  {'address': 2, 'voltage': 0},
  {'address': 3, 'voltage': 0},
  {'address': 4, 'voltage': 0},
  {'address': 5, 'voltage': 0},
  {'address': 6, 'voltage': 0},
  {'address': 7, 'voltage': 0}]}

Example for set_endtool_ao(), get_endtool_ao()

This can only be used with the RevE endtool board. The RevE endtool board has two AO channels, which are assigned to address 0 and 1, respectively. The remaining channels are reserved.

1
2
3
4
signal = [{'address': 0, 'voltage': 10},{'address': 1, 'voltage': 5}]
indy.set_endtool_ao(signal)

indy.get_endtool_ao()
{'signals': [{'address': 0, 'voltage': 10},{'address': 1, 'voltage': 5}]}

Example for get_device_info()

indy.get_device_info()
{
 'num_joints': 6,
 'robot_serial': 'Robot-151',
 ...
 'controller_detail': ''
}

Example for get_ft_sensor_data()

indy.get_ft_sensor_data()
{'ft_Fx': 0.0,
 'ft_Fy': 0.0,
 'ft_Fz': 0.0,
 'ft_Tx': 0.0,
 'ft_Ty': 0.0,
 'ft_Tz': 0.0}

Example for set_gripper_command(), get_gripper_data()

command selects 1=ACTIVATE, 2=DEACTIVATE, or 3=SET_PVT (position, speed, and force/torque). The unified NURI gripper protocol does not support 0=AUTO_DETECT. Replace the legacy DH calls 1=force, 2=position, and 3=speed with 3=SET_PVT.

Gripper type Value
NONE (no device type specified) 0
ROBOTIQ_GRIPPER 1
DH_GRIPPER 2
APICOO_SUSGRIP 3
APICOO_SUSGRIP_V2 4

tool_index is the zero-based endtool device index. With gripper_modbus_use=False, the PVT list contains direct [position, speed, force/torque] values; units and ranges depend on the gripper model. With True, each element is a holding register address to read from the Modbus TCP server selected by gripper_modbus_server_name. Register the server first and supply its valid name. This option selects the source of the PVT values; it does not change the gripper's transport protocol.

The example sends direct PVT values to an already activated Robotiq on endtool 0. To activate it, use command=1 with the same device type and endtool index, and confirm activation before sending command=3. Successful request transmission does not mean the gripper has completed its movement.

1
2
3
4
5
6
tool_index = 0
indy.set_gripper_command(
    command=3, gripper_type=1, pvt_data=[50, 100, 40],
    tool_index=tool_index, gripper_modbus_use=False,
)
print(indy.get_gripper_data_for(index=tool_index))

Example for set_endtool_rs485_rx(), get_endtool_rs485_rx(), get_endtool_rs485_tx

1
2
3
indy.set_endtool_rs485_rx(word1=1, word2=2)
indy.get_endtool_rs485_rx() 
indy.get_endtool_rs485_tx()
{'code': '0', 'msg': ''}
{'word1': 1, 'word2': 2}
{'word1': 0, 'word2': 0}

Example for set_sander_command(), get_sander_command()

indy.set_sander_command(sander_type=0, ip="192.168.0.50", speed=1500.0, state=True)
indy.get_sander_command()
{'code': '0', 'msg': ''}
{'ip': '192.168.0.50', 'speed': 1500.0, 'state': True, 'type': 0}

Motion Command Functions

Arm selection and joint arrays

movej and movej_time use arm_index to select which arm to move.

arm_index Motion target jtarget
Omitted or None (default) All active joints of the robot Target values in the robot's full joint order
Non-negative arm index (0: first arm) The selected arm Target values in that arm's joint order

When an arm is selected, the other arms hold their current positions. A full-joint array is also accepted for jtarget; only the target values for the selected arm are used.

movel/movel_time default to arm_index=0, and their six task-space target values apply to that arm.

Motion command Functions perform various tasks related to robot motion control. For example, the stop_motion function stops the robot's motion according to the specified stop category. The movej, movel, and movec functions are used for joint movement, linear movement, and circular movement, respectively, and each function allows you to set the target position, speed ratio, acceleration ratio, movement time, and various movement conditions.

Function Description
stop_motion(stop_category) Stop the motion according to the specified stop category
move_home() Move the robot to the specified home position using joint movement
movej(jtarget, blending_type=BlendingType.NONE, base_type=JointBaseType.ABSOLUTE, blending_radius=0.0, vel_ratio=Limits.JogVelRatioDefault, acc_ratio=Limits.JogAccRatioDefault, post_condition=PostCondition(), teaching_mode=False, arm_index: Optional[int]=None) Move the robot to the specified joint target position
movej_time(jtarget, blending_type=BlendingType.NONE, base_type=JointBaseType.ABSOLUTE, blending_radius=0.0, move_time=5.0, post_condition=PostCondition(), arm_index: Optional[int]=None) Move the robot to the specified joint target position over a specified time
get_motion_j(req: dict) Get joint-motion information matching the request
movel(ttarget, blending_type=BlendingType.NONE, base_type=TaskBaseType.ABSOLUTE, blending_radius=0.0, vel_ratio=Limits.JogVelRatioDefault, acc_ratio=Limits.JogAccRatioDefault, post_condition=PostCondition(), teaching_mode=False, bypass_singular=False, arm_index: int=0) Move the robot to the specified workspace target position using linear movement
movel_time(ttarget, blending_type=BlendingType.NONE, base_type=TaskBaseType.ABSOLUTE, blending_radius=0.0, move_time=5.0, post_condition=PostCondition(), arm_index: int=0) Move the robot to the specified workspace target position using linear movement over a specified time
get_motion_l(req: dict) Get linear-motion information matching the request
movec(tpos0, tpos1, blending_type=BlendingType.NONE, base_type=TaskBaseType.ABSOLUTE, angle=0.0, setting_type=CircularSettingType.POINT_SET, move_type=control_msgs.CONSTANT, blending_radius=0.0, vel_ratio=Limits.JogVelRatioDefault, acc_ratio=Limits.JogAccRatioDefault, post_condition=PostCondition(), teaching_mode=False, bypass_singular=False, arm_index: int=0) Move the robot along a circular path passing through two specified workspace positions tpos0 and tpos2
movec_time(tpos0, tpos1, blending_type=BlendingType.NONE, base_type=TaskBaseType.ABSOLUTE, angle=90.0, setting_type=CircularSettingType.POINT_SET, move_type=control_msgs.CONSTANT, blending_radius=0.0, move_time=5.0, post_condition=PostCondition(), arm_index: int=0) Circular path over specified time
get_motion_c(req: dict) Get circular-motion information matching the request
movelf(ttarget, enabledaxis, desforce, blending_type, base_type, blending_radius, vel_ratio, acc_ratio, post_condition, teaching_mode) Linear motion with force guidance (enabled axes & desired forces)
move_conveyor(post_condition, teaching_mode, bypass_singular=False, acc_ratio=..., vel_ratio=..., blending_type=..., blending_radius=...) Follow configured conveyor trajectory
move_axis(start_mm, target_mm, is_absolute, vel_ratio, acc_ratio, teaching_mode) Control external linear axis (if equipped)
move_gcode(gcode_file, is_smooth_mode=False, smooth_radius=0.0, vel_ratio=Limits.JogVelRatioDefault, acc_ratio=Limits.JogAccRatioDefault, arm_index: int=0) Move the robot following G-code file input
add_joint_waypoint(jpos) get_joint_waypoint() clear_joint_waypoint() move_joint_waypoint(move_time) Move the robot through a set of joint waypoints
add_task_waypoint(tpos) get_task_waypoint() clear_task_waypoint() move_task_waypoint(move_time) Move the robot through a set of task waypoints
move_joint_traj(q_list, qdot_list, qddot_list) Move along a joint pos/vel/acc trajectory at control frequency
move_task_traj(p_list, pdot_list, pddot_list) Move along a workspace pos/vel/acc trajectory at control frequency

Warning

Be cautious when using motion commands, as the robot will move immediately if the command is successfully applied. While using the robot through the Conty allows movement only while the user is holding the touch button, using the API allows movement through program commands, so always ensure the area is clear of objects that could cause collisions. Especially, be mindful of safety if setting high speeds or accelerations, as the robot may move faster than expected.

Example for stop_motion(stop_category)

You can choose from stop category 0, stop category 1, and stop category 2 depending on the value of stop_category. The StopCategory class defines the stop categories CAT0(0), CAT1(1), and CAT2(2).

from neuromeka import StopCategory
indy.stop_motion(StopCategory.CAT2)
  • StopCategory
    • CAT0: Stop the robot immediately by cutting off power (emergency stop)
    • CAT1: Stop the robot by stopping motion then cutting off power
    • CAT2: Stop the robot by stopping motion

Example for move_home()

The move_home command performs a joint movement to the specified home position.

indy.move_home()

Example for movej(...)

The movej command is a joint movement command. In the example below, target_pos is a list value in degrees, and the robot moves to the entered target joint position.

target_pos = [0, 0, -90, 0, -90, 0]
indy.movej(jtarget=target_pos)

Velocity/Acceleration Settings

You can adjust the robot's velocity and acceleration with vel_ratio and acc_ratio.

target_pos = [50, 0, -90, 0, -90, 0]
indy.movej(jtarget=target_pos, vel_ratio=100, acc_ratio=300)
  • vel_ratio: Represents the velocity of the robot during constant velocity mode. You can enter a value from 0-100 (%), with 100% representing the robot's maximum joint velocity (e.g., 180deg/s for the Indy7).
  • acc_ratio: Represents the acceleration of the robot as a multiple of vel_ratio. You can enter a value from 0-900 (%), with 300% resulting in the robot moving at three times the acceleration of the set vel_ratio.

Absolute/Relative Joint Movement

base_type is the value for setting the target joint position jtarget either in absolute coordinates or relative coordinates.

1
2
3
4
from neuromeka import JointBaseType

target_pos = [50, 0, -90, 0, -90, 0]
indy.movej(jtarget=target_pos, base_type=JointBaseType.ABSOLUTE)
target_pos = [50, 0, 0, 0, 0, 0]
indy.movej(jtarget=target_pos, base_type=JointBaseType.RELATIVE)
  • JointBaseType
    • ABSOLUTE(0): Move to the absolute position jtarget
    • RELATIVE(1): Move to the relative position jtarget based on the current robot position

Jog Mode Joint Movement

Setting teaching_mode to True allows moving the robot in jog mode.

1
2
3
4
5
target_pos = [100, 0, -90, 0, -90, 0]

for i in range(0,20):
    time.sleep(0.1)
    indy.movej(jtarget=target_pos, vel_ratio=50, acc_ratio=100, teaching_mode=True)

When executing jog motion movement, you must periodically apply the movej command for the robot to move.

Time-based Movement

movej_time is a command to perform joint movement over a specified move_time (unit: sec).

target_pos = [0, 0, -90, 0, -90, 0]
indy.movej_time(jtarget=target_pos, move_time=5)

Example for movel(...)

movel is a linear position movement command in the workspace. Below, target_pos is a list value in [mm, mm, mm, deg, deg, deg].

1
2
3
4
5
# Retrieve the current workspace position and calculate a position increased by 100m in the x direction
pos = indy.get_control_state()['p']
pos[0] += 100

indy.movel(pos)

base_type, vel_ratio, acc_ratio, teaching_mode are applied the same as in the movej arguments.

Absolute/Relative (Reference Frame, Tool Frame) Joint Movement

base_type is the value for setting the target workspace position ttarget either in absolute coordinates, relative coordinates, reference frame basis, or tool frame basis.

indy.movej(ttarget=target_pos, base_type=TaskBaseType.ABSOLUTE)
from neuromeka import TaskBaseType

target_pos = [100, 0, 0, 0, 0, 0]

# Move relatively 100mm in the

 x direction based on the reference frame
indy.movel(ttarget=target_pos, base_type=TaskBaseType.RELATIVE)

# Move relatively 100mm in the x direction based on the tool frame
indy.movel(ttarget=target_pos, base_type=TaskBaseType.TCP)
  • TaskBaseType
    • ABSOLUTE(0): Move to the absolute position ttarget
    • RELATIVE(1): Move linearly to the relative position ttarget based on the current robot position in the reference frame
    • TCP(2): Move linearly to the relative position ttarget based on the current robot position in the tool frame

Time-based Movement

movel_time is a command to perform linear position movement in the workspace over a specified move_time.

1
2
3
4
pos = indy.get_control_state()['p']
pos[0] += 100

indy.movel_time(ttarget=pos, move_time=3)

Example for movec(...)

movec is a circular motion position movement command in the workspace. Here, tpos0 and tpos1 are list values representing the via point and end point, respectively.

1
2
3
4
5
6
start_pos = [400.83, -61.27, 647.45, 0.07, 179.96, 8.78]
indy.movel(ttarget=start_pos)

via_point = [241.66, -51.11, 644.20, 0.0, 180.0, 23.36]
end_point = [401.53, -47.74, 647.50, 0.0, 180.0, 23.37]
indy.movec(tpos0=via_point, tpos1=end_point, angle=360)
  • angle: Angle setting for the arc (unit degree), setting to 360 will draw a circle, 180 will draw a semicircle, and 720 will draw two circles.

Time-based Movement

movec_time is a command to perform circular movement in the workspace over a specified move_time.

indy.movec_time(tpos0=via_point, tpos1=end_point, angle=360, move_time=15.0)

Example for move_axis(...)

Controls attached linear axis

indy.move_axis(start_mm=[0,0,0], target_mm=[200,0,0], is_absolute=False, vel_ratio=50, acc_ratio=100)

Example for move_gcode(...)

The move_gcode function interprets and executes movements based on a G-code file. G-code is widely used in CNC and robotic applications to define paths.

gcode_path = "/path/to/gcode/<gcode file>"

indy.move_gcode(
    gcode_file=gcode_path,
    is_smooth_mode=False,
    smooth_radius=0.0,
    vel_ratio=15,
    acc_ratio=100
)
  • gcode_file: The file path of the G-code file.
  • is_smooth_mode: If True, enables smooth mode for transitions (default: False).
  • smooth_radius: Blending radius for smoothing corners, in millimeters.
  • vel_ratio: Velocity ratio, a percentage of the robot’s maximum velocity (default: JogVelRatioDefault).
  • acc_ratio: Acceleration ratio, a percentage of the velocity ratio (default: JogAccRatioDefault).

Move joint waypoints and move task waypoints

Joint Waypoints

Joint waypoints are specific positions for each of the robot's joints that the robot will move through sequentially.

add_joint_waypoint(jpos) adds a joint waypoint to the list of waypoints. The waypoint is a vector representing the target positions for each joint of the robot. jpos: a vector of floats, each representing a joint position in degrees.

jtarget_0 = [0,0,0,0,0,0]
jtarget_1 = [-44,25,-63,48,-7,-105]
jtarget_2 = [0,0,90,0,90,0]
jtarget_3 = [-145,31,-33,117,-7,-133]
jtarget_4 = [-90,-15,-90,0,-75,0]

indy.add_joint_waypoint(jtarget_0)
indy.add_joint_waypoint(jtarget_1)
indy.add_joint_waypoint(jtarget_2)
indy.add_joint_waypoint(jtarget_3)
indy.add_joint_waypoint(jtarget_4)

get_joint_waypoint() retrieves the current list of joint waypoints that have been added. This allows you to review or verify the waypoints before executing the movement.

indy.get_joint_waypoint()

clear_joint_waypoint() clears the current list of joint waypoints. This function is useful if you need to reset the waypoints and start adding new ones.

indy.clear_joint_waypoint()

move_joint_waypoint(move_time) moves the robot through the sequence of joint waypoints that have been added. The robot will attempt to reach each waypoint sequentially. move_time: (optional) The time in seconds for the robot to move through the waypoints. If not provided, the robot will move normally.

indy.move_joint_waypoint()
indy.move_joint_waypoint(move_time=3)

Task Waypoints

Task waypoints refer to specific positions and orientations in space that the robot's endtool should move through.

add_task_waypoint(tpos) adds a task waypoint to the list of waypoints. The waypoint is an array representing the target position and orientation in Cartesian space. tpos: an array of six floats representing the x, y, z position and the roll, pitch, yaw orientation of the endtool.

ttarget_0 = [400, -50, 650, 0, 180, 23]
ttarget_1 = [300, -50, 650, 0, 180, 23]
ttarget_2 = [300, -50, 550, 0, 180, 23]
ttarget_3 = [400, -50, 550, 0, 180, 23]
ttarget_4 = [400, -50, 650, 0, 180, 23]

indy.add_task_waypoint(ttarget_0)
indy.add_task_waypoint(ttarget_1)
indy.add_task_waypoint(ttarget_2)
indy.add_task_waypoint(ttarget_3)
indy.add_task_waypoint(ttarget_4)

get_task_waypoint() retrieves the current list of task waypoints that have been added. This allows you to review or verify the waypoints before executing the movement.

indy.get_task_waypoint()

clear_task_waypoint() clears the current list of task waypoints. This function is useful if you need to reset the waypoints and start adding new ones.

indy.clear_task_waypoint()

move_task_waypoint(move_time) moves the robot's endtool through the sequence of task waypoints that have been added. The robot will attempt to reach each waypoint sequentially. move_time: (optional) The time in seconds for the robot to move through the waypoints. If not provided, the robot will move normally.

indy.move_task_waypoint()
indy.move_task_waypoint(move_time=1.5)

Asynchronous Motion

You can perform asynchronous motion by setting the blending_type during robot motion commands. You can switch to the next motion (Override) or stack them (Duplicate).

# Typical synchronous motion
import time

target_pos1 = [400, -50, 650, 0, 180, 23]
target_pos2 = [300, -50, 650, 0, 180, 23]
target_pos3 = [300, -50, 550, 0, 180, 23]

indy.movel(target_pos1)
time.sleep(1)

indy.movel(target_pos2)
indy.movel(target_pos3)
1
2
3
4
5
6
7
8
9
from neuromeka import BlendingType

# Duplicate example
indy.movel(target_pos1)
time.sleep(1)

indy.movel(target_pos2, blending_type=BlendingType.DUPLICATE)
time.sleep(0.5)
indy.movel(target_pos3)
1
2
3
4
5
6
7
# Override example
indy.movel(target_pos1)
time.sleep(1)

indy.movel(target_pos2, blending_type=BlendingType.OVERRIDE)
time.sleep(0.5)
indy.movel(target_pos3)
  • BlendingType
    • NONE(0): No asynchronous motion specified (performs synchronous motion)
    • OVERRIDE(1): Perform override asynchronous motion
    • DUPLICATE(2): Perform duplicate asynchronous motion

Waiting Functions

Wait IO: Waits for specific digital or analog I/O signals to meet the given conditions.
Wait Time: Waits for a specified time, after starting the first motion command.
Wait Progress: Waits for progress status.
Wait Radius: Waits until movement within a specified radius is complete.
Wait Traj: Waits until trajectory movement is complete.
- WaitTraj conditions
- TRAJ_STARTED(0): trajectory has just started
- TRAJ_ACC_DONE(1): acceleration phase of the trajectory has been completed
- TRAJ_CRZ_DONE(2): cruising phase (constant speed phase) of the trajectory has been completed.
- TRAJ_DEC_DONE(3): deceleration phase of the trajectory has been completed.

jtarget_0 = [0,0,0,0,0,0]
indy.movej(jtarget = jtarget_0, blending_type=1)

# indy.wait_time(1)
# indy.wait_radius(10)
# indy.wait_traj(1)
indy.wait_progress(15)

jtarget_1 = [0,0,-90,0,-90,0]
indy.movej(jtarget = jtarget_1, blending_type=1)

Wait IO Usage Example

1
2
3
4
5
6
7
8
9
di_signals = [{'address': 1, 'state': True}]  

indy.wait_io(
    di_signal_list=di_signals,
    do_signal_list=[],
    end_di_signal_list=[],
    end_do_signal_list=[],
    conjunction=0
)

Trajectory Motion

move_joint_traj is a joint-space trajectory movement movement command. Below, q_list, qdot_list, qddot_list are list values of joint position, velocity and acceleration in radians. The time step between trajectory is the control period, which is 250us by default.

# Get current Q
q_cur_deg = indydcp3.get_control_data()['q']

# Convert to rad
q_cur_rad = np.deg2rad(q_cur_deg)  

# sin path
magitude = np.pi/18
traj_time=5

traj_num =traj_time*freq
q_list = magitude * (0.5-0.5*np.cos(np.arange(traj_num) / (traj_num) * 2 * np.pi)).reshape((traj_num, -1)) + [q_cur_rad]*traj_num
qdot_list = np.pad((q_list[1:]-q_list[:-1])/dt, ((0,1),(0,0)))
qddot_list = np.pad((qdot_list[1:]-qdot_list[:-1])/dt, ((0,1),(0,0)))

# Move
indydcp3.move_joint_traj(q_list, qdot_list, qddot_list)

move_task_traj is a task-space trajectory movement movement command. Below, p_list, pdot_list, pddot_list are list values of endtool position, velocity and acceleration in meters and radians. The time step between trajectory is the control period, which is 250us by default.

# Get current P
p_cur_mm_deg = indydcp3.get_control_data()['p']

# Convert to m, rad
p_cur_m_rad = p_cur_mm_deg
p_cur_m_rad[:3] = np.multiply(p_cur_mm_deg[:3], 1e-3)
p_cur_m_rad[3:] = np.deg2rad(p_cur_mm_deg[3:])

# sin path
magitude_disp = 0.1
magitude_rot = np.pi/18
traj_time=5

traj_num =traj_time*freq
p_list = np.array([p_cur_m_rad]*traj_num)
pdot_list = np.zeros_like(p_list)
pddot_list = np.zeros_like(p_list)
p_list[:,0] = magitude_disp * (0.5-0.5*np.cos(np.arange(traj_num) / (traj_num) * 2 * np.pi)) + p_list[:,0]
pdot_list[:,0] = np.pad((p_list[1:,0]-p_list[:-1,0])/dt, (0,1))
pddot_list[:,0] = np.pad((pdot_list[1:,0]-pdot_list[:-1,0])/dt, (0,1))

# Move
indydcp3.move_task_traj(p_list, pdot_list, pddot_list)

Teleoperation-related functions provide the capability to remotely control the robot. These functions allow real-time adjustment of the robot's motion and control in various operation modes. You can start the teleoperation mode using the start_teleop function and end the mode using the stop_teleop function. Additionally, you can update robot movements in joint space and workspace using the movetelej_abs/movetelej_rel and movetelel_abs/movetelel_rel functions, respectively.

Note

When using teleoperation motion through IndyDCP3, continuously updating the target position in real-time allows the robot to stream and generate smooth and immediate motion. Traditional Motion commands (movej, movel) perform path generation smoothly but cannot respond immediately like remote control. This is a characteristic of teleoperation motion.

Function Description
start_teleop(method) Start teleoperation mode
stop_teleop() End the currently running teleoperation mode
movetelej_abs(jpos, vel_ratio=0.8, acc_ratio=7.0) Remotely control the robot to a specified joint position (absolute coordinates)
movetelej_rel(jpos, vel_ratio=0.8, acc_ratio=7.0) Remotely control the robot to a specified joint position (relative coordinates)
movetelel_abs(tpos, vel_ratio=0.8, acc_ratio=7.0, arm_index=0) Remotely control the robot to a specified workspace position (absolute coordinates)
movetelel_rel(tpos, vel_ratio=0.8, acc_ratio=7.0, arm_index=0) Remotely control the robot to a specified workspace position (relative coordinates)
get_teleop_device() Retrieve information about the currently connected teleoperation device
get_teleop_state() Retrieve the current teleoperation state
connect_teleop_device(name, type, ip, port) Connect to a teleoperation device with specified parameters
disconnect_teleop_device() Disconnect the currently connected teleoperation device
read_teleop_input() Read the current input values from the teleoperation device
read_teleop_input_for(index: int) Read teleoperation input for the selected robot
get_tele_file_list() Retrieve a list of saved teleoperation motion files
save_tele_motion(name) Save the current teleoperation motion with a specified name
load_tele_motion(name) Load a saved teleoperation motion by name
delete_tele_motion(name) Delete a saved teleoperation motion by name
enable_tele_key(enable) Enable or disable teleoperation key input
set_play_rate(rate) Set the play rate for teleoperation motion playback
get_play_rate() Retrieve the current play rate for teleoperation motion playback
set_obstacle_info(obstacle_info: dict) Set teleoperation obstacle information
get_obstacle_info(idx: int) Get the specified teleoperation obstacle information
get_collision_spheres() Get sphere information used for collision checking
get_joint_constraint_config() Get the joint constraint configuration
set_joint_constraint_config(joint_constraint_config: dict) Set the joint constraint configuration
get_self_collision_pairs() Get link pairs used for self-collision checking
set_self_collision_pairs(self_collision_pairs: dict) Deprecated: updates are unsupported; use rule-based set_self_collision_config
get_self_collision_config() Get the self-collision constraint configuration
set_self_collision_config(self_collision_config: dict) Set the self-collision constraint configuration
get_plane_constraint_config() Get the plane constraint configuration
set_plane_constraint_config(plane_constraint_config: dict) Set the plane constraint configuration
get_static_obstacle_constraint_config() Get the static-obstacle constraint configuration
set_static_obstacle_constraint_config(static_obstacle_constraint_config: dict) Set the static-obstacle constraint configuration
get_dynamic_obstacle_constraint_config() Get the dynamic-obstacle constraint configuration
set_dynamic_obstacle_constraint_config(dynamic_obstacle_constraint_config: dict) Set the dynamic-obstacle constraint configuration
get_orientation_deviation_config() Get the orientation-deviation constraint configuration
set_orientation_deviation_config(orientation_deviation_config: dict) Set the orientation-deviation constraint configuration
apply_teleop_constraint_batch(constraint_batch: dict) Apply multiple teleoperation constraint settings at once
get_teleop_constraint_runtime_status() Get the runtime status of teleoperation constraints
get_teleop_tuning_params() Get teleoperation tuning parameters
set_teleop_tuning_params(teleop_tuning_params: dict=None, spring_energy_limit=None, spring_energy_damping_onset_ratio=None, spring_energy_damping_onset=None) Set teleoperation tuning parameters
get_desired_position() Get the desired teleoperation position
get_current_position() Get the current teleoperation position
get_tool_collision_sphere_config() Get the tool collision-sphere configuration
set_tool_collision_sphere_config(tool_collision_sphere_config) Set the tool collision-sphere configuration

Units and indices in Teleop query and constraint messages

  • get_current_position/get_desired_position return tasks with position=[x, y, z, u, v, w] for each task: position is in m and orientation is in rad.
  • Joint constraints use rad for qmin/qmax, rad/s for qdotmin/qdotmax, and rad/s² for qddotmin/qddotmax. Plane value, collision-sphere radius and position use m; obstacle velocity uses m/s; orientation-deviation max_norm uses rad.
  • Self-collision pairs contain distinct actuated_link1/2 and full_link1/2 index spaces. Plane and obstacle link_indices use actuated link indices. These are not arm indices or endtool device indices.

The target pose of an ordinary motion function such as movel uses mm/deg. Convert Teleop query results to the target function's units before using them as motion targets.

Constraint state, persistence, and responses

Use structural constraint setters and apply_teleop_constraint_batch while Teleop is inactive. First check structural_updates_allowed and the relevant build_enable_* and *_loaded fields from get_teleop_constraint_runtime_status(). Check the request result as well, because the state can change after the query.

Constraint updates are also saved to the controller's JSON configuration. Inspect Response.code and msg for invalid input, unavailable features, active Teleop, or save failures. For these configuration APIs, code=0 means success and code=-1 means failure. Python's protobuf JSON conversion may represent code as a string, so compare int(result["code"]). Successful gRPC transport alone does not indicate a successful update. Each element of a batch updates array selects one of joint, self_collision, plane, static_obstacle, dynamic_obstacle, or orientation. A save failure triggers an attempt to restore the previous configuration; inspect the error and query the configuration again.

set_self_collision_config uses rule-based fields: ignore_tree_distance_leq, collision_groups, ignore_between_groups, extra_disable_pairs, and extra_enable_pairs. Do not use the deprecated use_explicit_pairs/explicit_pairs mode. get_self_collision_pairs() returns the computed pairs.

The example reads the current plane configuration, reapplies the same values through a batch, and reads it back. Use the units and link indices above when changing planes.

status = indy.get_teleop_constraint_runtime_status()
if not status["structural_updates_allowed"]:
    raise RuntimeError("Teleop constraint updates are not allowed")
if not (status["build_enable_plane"] and status["plane_loaded"]):
    raise RuntimeError("Plane constraint is unavailable")

current = indy.get_plane_constraint_config()
result = indy.apply_teleop_constraint_batch({
    "updates": [{"plane": {"planes": current["planes"]}}]
})
if int(result["code"]) != 0:
    raise RuntimeError(result["msg"])

print(indy.get_plane_constraint_config())

Example for start_teleop(method), stop_teleop()

1
2
3
4
5
6
7
from neuromeka import JointTeleopType, TaskTeleopType

indy.start_teleop(method=JointTeleopType.RELATIVE)

(...)

indy.stop_teleop()
  • JointTeleopType

    • ABSOLUTE: Set to move the robot to an absolute joint position target. In this setting, only the movetelej_abs function can be called.
    • RELATIVE: Set to move the robot to a relative joint position target (based on the robot's position at the time start_teleop was executed). In this setting, only the movetelej_rel function can be called.
  • TaskTeleopType

    • ABSOLUTE: Set to move the robot to an absolute workspace position target. In this setting, only the movetelel_abs function can be called.
    • RELATIVE: Set to move the robot to a relative workspace position target (based on the robot's position at the time start_teleop was executed). In this setting, only the movetelel_rel function can be called.

Example for movetelej_rel(jpos, vel_ratio, acc_ratio)

1
2
3
4
5
indy.start_teleop(method=JointTeleopType.RELATIVE)
indy.movetelej_rel(jpos=[10, 0, 0, 0, 0, 0], vel_ratio=0.8, acc_ratio=7.0)

(...)
indy.stop_teleop()
  • jpos: Target joint position
  • vel_ratio: Velocity ratio (0 - 1)
  • acc_ratio: Acceleration ratio (0 - 10)

Example for movetelel_rel(tpos, vel_ratio, acc_ratio)

1
2
3
4
5
6
7
indy.start_teleop(method=TaskTeleopType.RELATIVE)

# Move 10mm in the x direction
indy.movetelel_rel(tpos=[10, 0, 0, 0, 0, 0], vel_ratio=0.8, acc_ratio=7.0)

(...)
indy.stop_teleop()

Example for get_teleop_device()

Retrieve information about the currently connected teleoperation device.

teleop_device_info = indy.get_teleop_device()  
print(teleop_device_info)

Example for get_teleop_state()

Retrieve the current teleoperation state.

teleop_state = indy.get_teleop_state()  
print(teleop_state)

Example for connect_teleop_device(name, type, ip, port)

Connect to a teleoperation device with specified parameters.

1
2
3
4
5
6
indy.connect_teleop_device(
    name="TeleOpDevice1",
    type=control_msgs.TeleOpDevice.JOYSTICK,
    ip="192.168.0.2",
    port=5555
)
  • name: The name of the teleoperation device.
  • type: The type of the teleoperation device (e.g., JOYSTICK, VR_CONTROLLER).
  • ip: The IP address of the teleoperation device.
  • port: The communication port for the device.

Example for disconnect_teleop_device()

Disconnect the currently connected teleoperation device.

indy.disconnect_teleop_device()

Example for read_teleop_input()

Read the current input values from the teleoperation device.

teleop_input = indy.read_teleop_input()  
print(teleop_input)

Example for get_tele_file_list()

Retrieve a list of saved teleoperation motion files.

tele_file_list = indy.get_tele_file_list()  
print(tele_file_list)

Example for save_tele_motion(name)

Save the current teleoperation motion with a specified name.

indy.save_tele_motion(name="Motion1")
  • name: The name to save the teleoperation motion under.

Example for load_tele_motion(name)

Load a saved teleoperation motion by name.

indy.load_tele_motion(name="Motion1")
  • name: The name of the saved teleoperation motion to load.

Example for delete_tele_motion(name)

Delete a saved teleoperation motion by name.

indy.delete_tele_motion(name="Motion1")
  • name: The name of the saved teleoperation motion to delete.

Example for enable_tele_key(enable)

Enable or disable teleoperation key input.

1
2
3
4
5
# Enable teleoperation key input
indy.enable_tele_key(enable=True)

# Disable teleoperation key input
indy.enable_tele_key(enable=False)
  • enable: A boolean value:
    • True: Enables teleoperation key input.
    • False: Disables teleoperation key input.

Example for set_play_rate(rate)

Set the play rate for teleoperation motion playback.

indy.set_play_rate(rate=1.5)

  • rate: A float value specifying the playback rate.
    • 1.0: Normal speed.
    • Greater than 1.0: Faster playback.
    • Less than 1.0: Slower playback.

Example for get_play_rate()

Retrieve the current play rate for teleoperation motion playback.

play_rate = indy.get_play_rate()  
print(play_rate)

Variables (Variable)

The Indy Framework provides five types of variables for integration with Conty and the API. These variables are accessible from both Conty and the IndyAPI, and they support both reading and writing operations. This functionality allows for integration through variable exchange between robots programmed in Conty and external devices using the Indy API. Utilizing these variables enables complex logic configurations with external devices.

The five types of provided variables are as follows:

  • Bool type, Integer type, Float type, JPos type (joint space angle variables for each joint), TPos type (workspace coordinate variables in the workspace)

Function Description
get_bool_variable() Address and value list for Bool type variables
get_int_variable() Address and value list for Integer type variables
get_float_variable() Address and value list for Float type variables
get_jpos_variable() Address and value list for JPos type variables
get_tpos_variable() Address and value list for TPos type variables
set_bool_variable(bool_variables) Set address and value list for Bool type variables
set_int_variable(int_variables) Set address and value list for Integer type variables
set_float_variable(float_variables) Set address and value list for Float type variables
set_jpos_variable(jpos_variables) Set address and value list for JPos type variables
set_tpos_variable(tpos_variables) Set address and value list for TPos type variables
set_plugin_bool_variable(name, value) / get_plugin_bool_variable(name) Set / get plugin Bool variable
set_plugin_int_variable(name, value) / get_plugin_int_variable(name) Set / get plugin Int variable
set_plugin_float_variable(name, value) / get_plugin_float_variable(name) Set / get plugin Float variable
set_plugin_jpos_variable(name, jpos) / get_plugin_jpos_variable(name) Set / get plugin JPos variable
set_plugin_tpos_variable(name, tpos) / get_plugin_tpos_variable(name) Set / get plugin TPos variable
set_io_variable(io_vars_to_set: list) Set multiple I/O variables at once; Returns: None

Example for get_bool_variable()

indy.get_bool_variable()
{'variables': [{'addr': 100, 'value': True}, {'addr': 150, 'value': False}]}

Example for set_bool_variable(bool_variables)

1
2
3
4
# Assign value True to bool variable at address 100
indy.set_bool_variable([{'addr': 100, 'value': True}])
# Assign value False to bool variable at address 150
indy.set_bool_variable([{'addr': 150, 'value': False}])

Example for get_int_variable()

indy.get_int_variable()
{'variables': [{'addr': 300, 'value': '0'}, {'addr': 10, 'value': '20'}, {'addr': 15, 'value': '5'}]}

Example for set_int_variable(int_variables)

1
2
3
4
5
6
# Assign value 20 to int variable at address 10
int_variables = [{'addr': 10, 'value': 20}]
indy.set_int_variable(int_variables=int_variables)
# Assign value 5 to int variable at address 15
int_variables = [{'addr': 15, 'value': 5}]
indy.set_int_variable(int_variables=int_variables)

Example for get_float_variable()

indy.get_float_variable()
{
  'variables': [
    {'addr': 10, 'value': -23.3},
    {'addr': 15, 'value': 55.12}
  ]
}

Example for set_float_variable()

1
2
3
4
# Assign value -23.3 to float variable at address 10
indy.set_float_variable([{'addr': 10, 'value': -23.3}])
# Assign value 55.12 to float variable at address 15
indy.set_float_variable([{'addr': 15, 'value': 55.12}])

Example for set_jpos_variable(), get_jpos_variable()

Assign value [0,0,0,0,0,0] to jpos variable at address 0 Assign value [10,10,10,10,10,10] to jpos variable at address 200

indy.set_jpos_variable([{'addr': 0, 'jpos': [0,0,0,0,0,0]}])
indy.set_jpos_variable([{'addr': 200, 'jpos': [10,10,10,10,10,10]}])
indy.get_jpos_variable()
[{'jpos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'addr': 0},
 {'addr': 200, 'jpos': [10.0, 10.0, 10.0, 10.0, 10.0, 10.0]}]

Example for set_tpos_variable(), get_tpos_variable()

Assign value [100,100,200,0,180,0] to tpos variable at address 10 Assign value [100,100,350,0,180,0] to tpos variable at address 20

indy.set_tpos_variable([{'addr': 10, 'tpos': [100,100,200,0,180,0]}])
indy.set_tpos_variable([{'addr': 20, 'tpos': [100,100,350,0,180,0]}])

indy.get_tpos_variable()
{
  'variables': [
    {'addr': 10, 'tpos': [100.0, 100.0, 200.0, 0.0, 180.0, 0.0]},
    {'addr': 20, 'tpos': [100.0, 100.0, 350.0, 0.0, 180.0, 0.0]}
  ]
}

Example for set_plugin_bool_variable(), get_plugin_bool_variable()

indy.set_plugin_bool_variable("bool_1", True)
indy.get_plugin_bool_variable("bool_1")
{'name': 'bool_1', 'value': True}

Example for set_plugin_int_variable(), get_plugin_int_variable()

indy.set_plugin_int_variable("int_1", 3)
indy.get_plugin_int_variable("int_1")
{'name': 'int_1', 'value': '3'}

Example for set_plugin_float_variable(), get_plugin_float_variable()

indy.set_plugin_float_variable("float_1", 0.8)
indy.get_plugin_float_variable("float_1")
{'name': 'float_1', 'value': 0.8}

Example for set_plugin_jpos_variable(), get_plugin_jpos_variable()

indy.set_plugin_jpos_variable("ex_home_pose", [0.0, 0.0, -90, 0.0, -90, 0])
indy.get_plugin_jpos_variable("ex_home_pose")
{'name': 'ex_home_pose', 'jpos': [0.0, 0.0, -90.0, 0.0, -90.0, 0.0]}

Example for set_plugin_tpos_variable(), get_plugin_tpos_variable()

indy.set_plugin_tpos_variable('ex_t_pose', [100, 0, 300, 0, 90, 0])
indy.get_plugin_tpos_variable('ex_t_pose')
{'name': 'ex_t_pose', 'tpos': [100.0, 0.0, 300.0, 0.0, 90.0, 0.0]}

Function Description
inverse_kin(tpos, init_jpos, arm_index=0) Calculate the joint position that can reach a given workspace position tpos, based on the initial joint position init_jpos
forward_kin(jpos, arm_index=0) Calculate forward kinematics for the selected arm
joint_to_tcp_transform(jpos, joint_idx, joint_idx_is_body_index=False, arm_index=0) Transform joint coordinates to TCP coordinates for the selected arm
set_direct_teaching(enable) Enable/disable direct teaching mode via True/False
set_simulation_mode(enable) Enable/disable simulation mode via True/False
recover() Recover the robot from an error or collision state

Example for inverse_kin(tpos, init_jpos)

A function that calculates the joint position that can reach a given workspace position from the workspace coordinates. It finds the nearest solution based on the initial joint position. The example below shows whether the current joint angles result from the inverse kinematics operation when using the current robot's joint angles as init_jpos and the current robot's workspace position as tpos.

1
2
3
4
5
6
7
tpos = indy.get_control_data()['p']
init_jpos = indy.get_control_data()['q']

print("Current tpos", tpos)
print("Current jpos", init_jpos)

indy.inverse_kin(tpos, init_jpos)
Current tpos [299.6449, -107.58244, 1002.9704, 2.3324265, 84.555115, 16.708658]
Current jpos [21.618074, 13.531353, -64.26601, -12.834319, -34.454514, 10.170495]
{'jpos': [21.618074, 13.531353, -64.26601, -12.834319, -34.454514, 10.170495],
 'response': {'msg': 'InverseKinematics Success', 'code': '0'}}
- tpos: Target workspace position ([x, y, z, u, v, w] format) - init_jpos: Initial joint position - jpos: List of calculated joint positions

Example for set_direct_teaching(enable)

1
2
3
4
5
indy.set_direct_teaching(enable=True)

(...)

indy.set_direct_teaching(enable=False)
  • enable: True (enabled) | False (disabled)

Example for set_simulation_mode(enable)

A function to set simulation mode. When this mode is enabled, a simulated robot operates instead of the actual robot.

1
2
3
4
5
indy.set_simulation_mode(enable=True)

(...)

indy.set_simulation_mode(enable=False)
  • enable: True (enabled) | False (disabled)

Example for recover()

A function to recover the robot from an error or collision state. When the robot falls into an abnormal state, you can call this function to return it to a normal state.

indy.recover()

Program Control Functions

Using IndyDCP3, you can control the playback, pause, resume, and stop of robot programs. These features allow users to flexibly manage the execution flow of programs.

Function Description
play_program(prog_name, prog_idx) Start a program, prog_name: Program file name, prog_idx: Program index
play_program_line(prog_name: str='', prog_idx: int=-1, start_cmd_id: int=0, start_sub_cmd_id: int=0, end_cmd_id: int=0, end_sub_cmd_id: int=0, teaching_mode: bool=False, debug_mode: bool=False) Run the specified command range of a program
pause_program() Pause the currently running program
resume_program() Resume a paused program
resume_program_debug() Resume paused program debugging
stop_program() Stop the currently running program

Example for play_program(prog_name, prog_idx)

Play a program by either specified name or index. You can select a specific program using either the program name or index.

Note

Programs must be pre-written and saved using Conty.

1
2
3
4
5
# Play program using the program file name
indy.play_program(prog_name='example_program.indy7v2.json')

# Play program using the program index
indy.play_program(prog_idx=1)
  • When playing using the program file name, the program file path (STEP): /home/user/release/IndyDeployment/ProgramScripts
  • When playing using the program index, the program file path (STEP): /home/user/release/IndyDeployment/ProgramScripts/index

These are the default installation paths. For other installations, use ProgramScripts/ and ProgramScripts/index/ relative to the deployment root.

Example for pause_program()

Pause the currently running program.

indy.pause_program()

Example for resume_program()

Resume a paused program. Use this function when you need to pause and then restart a program.

indy.resume_program()

Example for stop_program()

Stop the currently running program.

indy.stop_program()

Using IndySDK

This protocol is for activating the Indy SDK and setting the custom control mode.

Function Description
activate_sdk() Activates IndySDK
set_custom_control_mode() Enables/Disables user controller mode
get_custom_control_mode() Checks user controller mode
set_custom_control_gain() Sets control gain for the user controller
get_custom_control_gain() Checks control gain for the user controller
set_joint_control_gain(kp, kv, kl2) Set the control gains for joint-level control
get_joint_control_gain() Retrieve the current joint-level control gains
set_task_control_gain(kp, kv, kl2) Set the control gains for task-level control
get_task_control_gain() Retrieve the current task-level control gains
set_impedance_control_gain(mass, damping, stiffness, kl2) Set the impedance control gains
get_impedance_control_gain() Retrieve the current impedance control gains
set_force_control_gain(kp, kv, kl2, mass, damping, stiffness, kpf, kif) Set the force control gains
get_force_control_gain() Retrieve the current force control gains

Example for activate_sdk()

This function activates the IndySDK. The parameters are as follows:

1
2
3
4
indy.activate_sdk(
license_key="345HW8PEQB35114AABS34U591366E134BW35AS83663AASB23ABS83481AA9DB33",
expire_date="2025-02-01"
)
  • license_key: The issued license key.
  • expire_date: The expiration date of the license in YYYY-MM-DD format.

It returns an SDKLicenseResp object, which includes the following information:

  • activated: A boolean value indicating the activation status.
  • response: A tuple (code, msg) that may include the following values:
    • 0, 'Activated': The SDK is activated.
    • 1, 'Invalid': Invalid key or expiration date.
    • 2, 'No Internet Connection': Internet connection is required for license verification.
    • 3, 'Expired': The license has expired.
    • 4, 'HW_FAILURE': Hardware ID verification failed.

Example for set_custom_control_mode()

This function sets the custom control mode. The parameters are as follows:

  • mode:
    • False (0): The default controller of IndyFramework is used.
    • True (1): The components built by the user through IndySDK are used.

Example for get_custom_control_mode()

This function checks the currently set custom control mode. It returns an object indicating the currently set mode.

Example for set_custom_control_gain()

This function is used to set the gain for the user controller.

# Default gain
gain0 = [100, 100, 100, 100, 100, 100]
gain1 = [20, 20, 20, 20, 20, 20]
gain2 = [800, 800, 600, 400, 400, 400]
gain3 = [100, 100, 100, 100, 100, 100]
gain4 = [20, 20, 20, 20, 20, 20]
gain5 = [800, 800, 600, 400, 400, 400]

indy.set_custom_control_gain(gain0=gain0, gain1=gain1, gain2=gain2,
                              gain3=gain3, gain4=gain4, gain5=gain5)
  • gain0: gain0 for each joint
  • gain1: gain1 for each joint
  • gain2: gain2 for each joint
  • gain3: gain3 for each joint
  • gain4: gain4 for each joint
  • gain5: gain5 for each joint

Control gain variables are defined from gain0 to gain9.

Note

Here, the variables from gain0 to gain9 are gRPC variables that can be called in IndySDK. For practical examples, please refer to the examples in the IndySDK repository.

Example for get_custom_control_gain()

This function checks the current custom control gain settings.

indy.get_custom_control_gain()
{'gain0': [100.0, 100.0, 100.0, 100.0, 100.0, 100.0],
 'gain1': [20.0, 20.0, 20.0, 20.0, 20.0, 20.0],
 'gain2': [800.0, 800.0, 600.0, 400.0, 400.0, 400.0],
 'gain3': [100.0, 100.0, 100.0, 100.0, 100.0, 100.0],
 'gain4': [20.0, 20.0, 20.0, 20.0, 20.0, 20.0],
 'gain5': [800.0, 800.0, 600.0, 400.0, 400.0, 400.0],
 'gain6': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
 'gain7': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
 'gain8': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
 'gain9': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}

Example for set_joint_control_gain(kp, kv, kl2)

Set the control gains for joint-level control.

indy.set_joint_control_gain(kp=[...], kv=[...], kl2=[...])

  • kp: Proportional gains for each joint.
  • kv: Velocity gains for each joint.
  • kl2: Second-order gains for each joint.

Example for get_joint_control_gain()

Retrieve the current joint-level control gains.

joint_gains = indy.get_joint_control_gain()  
print(joint_gains)

Example for set_task_control_gain(kp, kv, kl2)

Set the control gains for task-level control.

indy.set_task_control_gain(kp=[...], kv=[...], kl2=[...])

  • kp: Proportional gains for each task coordinate.
  • kv: Velocity gains for each task coordinate.
  • kl2: Second-order gains for each task coordinate.

Example for get_task_control_gain()

Retrieve the current task-level control gains.

task_gains = indy.get_task_control_gain()  
print(task_gains)

Example for set_impedance_control_gain(mass, damping, stiffness, kl2)

Set the impedance control gains.

1
2
3
4
5
6
indy.set_impedance_control_gain(
    mass=[...],
    damping=[...],
    stiffness=[...],
    kl2=[...]
)

  • mass: Inertial gains for each task coordinate.
  • damping: Damping gains for each task coordinate.
  • stiffness: Stiffness gains for each task coordinate.
  • kl2: Second-order gains for each task coordinate.

Example for get_impedance_control_gain()

Retrieve the current impedance control gains.

impedance_gains = indy.get_impedance_control_gain()  
print(impedance_gains)

Example for set_force_control_gain(kp, kv, kl2, mass, damping, stiffness, kpf, kif)

Set the force control gains.

indy.set_force_control_gain(
    kp=[...],
    kv=[...],
    kl2=[...],
    mass=[...],
    damping=[...],
    stiffness=[...],
    kpf=[...],
    kif=[...]
)

  • kp: Proportional gains for each joint or task coordinate.
  • kv: Velocity gains for each joint or task coordinate.
  • kl2: Second-order gains for each joint or task coordinate.
  • mass: Inertial gains for each task coordinate.
  • damping: Damping gains for each task coordinate.
  • stiffness: Stiffness gains for each task coordinate.
  • kpf: Proportional gains for force control.
  • kif: Integral gains for force control.

Example for get_force_control_gain()

Retrieve the current force control gains.

force_gains = indy.get_force_control_gain()  
print(force_gains)

Utility Functions

This section outlines essential utility functions to enhance workflow efficiency.

Function Description
start_log() Starts realtime data logging
end_log() Ends and saves realtime data logging
wait_for_operation_state(op_state) Allows you to wait until the robot reaches a specific operation state.
wait_for_motion_state(motion_state) Allows you to wait until the robot reaches a specific motion state.
wait_motion_done(timeout=120) Wait for motion to finish for the specified timeout; Returns: None
set_friction_comp_state(enable) Enable or disable friction compensation
get_friction_comp_state() Retrieve the current state of friction compensation
set_mount_pos(rot_y, rot_z) Set the mounting angles for the robot base
get_mount_pos() Retrieve the current mounting angles for the robot base
set_brakes(brake_state_list) Set the brake states for each motor
set_servo_all(enable) Enable or disable all servos
set_servo(index, enable) Enable or disable a specific servo by index
set_endtool_led_dim(led_dim, tool_index=0) Set the LED brightness for the end-effector tool
execute_tool(name) Execute a tool function by its name
get_el5001() Unsupported RPC; returns an error dictionary
get_el5101() Unsupported RPC; returns an error dictionary
get_brake_control_style() Retrieve the current brake control style
set_conveyor_name(name) Set the name of the conveyor
set_conveyor_encoder(encoder_type, channel1, channel2, sample_num, mm_per_tick, vel_const_mmps, reversed) Configure the conveyor encoder settings
set_conveyor_trigger(trigger_type, channel, detect_rise) Set the conveyor trigger settings
set_conveyor_offset(offset_mm) Set the offset value for the conveyor (in millimeters)
set_conveyor_starting_pose(jpos, tpos) Set the starting joint and task poses for the conveyor
set_conveyor_terminal_pose(jpos, tpos) Set the terminal joint and task poses for the conveyor
set_conveyor_arm_index(index: int) Select the arm used by the conveyor function
set_compliance_mode(enable, stiffness=None) Enable/disable compliance mode
get_compliance_mode() Query compliance mode state
set_force_mode(force_mode_dict) Apply force mode configuration dict
get_force_mode() Retrieve current force mode configuration
get_transformed_ft_sensor_data() Wrench transformed to reference/tool frame
get_transformed_ft_sensor_data_for(index: int) Get transformed F/T sensor data for the selected arm
set_ft_sensor_config(dev_type, com_type, ip_address, ft_frame_translation_offset_x=0.0, ft_frame_translation_offset_y=0.0, ft_frame_translation_offset_z=0.0, ft_frame_rotation_offset_r=0.0, ft_frame_rotation_offset_p=0.0, ft_frame_rotation_offset_y=0.0, arm_index=0) Set the F/T sensor configuration for the selected arm
get_ft_sensor_config_for(index: int) Get the F/T sensor configuration for the selected arm
get_ft_zero() Zero (bias) force/torque sensor
get_load_factors() Load factor estimation data
push_bus_event(event_id, ...) / catch_bus_event(event_id, timeout) Publish / wait for internal bus events
get_friction_comp() / set_friction_comp(...) Friction compensation data
get_coll_sens_level() / set_coll_sens_level(level) Collision sensitivity level
get_coll_sens_param() / set_coll_sens_param(...) Collision thresholds parameters
get_coll_policy() / set_coll_policy(policy, sleep_time, gravity_time) Set/Get collision policy
get_default_coll_sens_param() Default collision thresholds
get_collison_model_margin() / set_collison_model_margin(collision_margin, recover_margin) Collision model margins
get_home_pos() / set_home_pos(jpos) Set/Get joint home position
get_ref_frame() / set_ref_frame(fpos: list, arm_index: int=0, link_index: int=0) / set_ref_frame_planar(fpos0: list, fpos1: list, fpos2: list, arm_index: int=0, link_index: int=0) Reference frame configuration
get_ref_frame_for(index: int) Get the reference frame for the selected arm
save_reference_frame(frames, default_name) / load_reference_frame() Bulk save/load frames
get_tool_frame_list() / set_tool_frame_list(dict) Tool frame definitions list
set_tool_frame(fpos: list, arm_index: int=0, link_index: int=0) Set the selected arm's TCP offset; link_index is deprecated
get_tool_property_list() / set_tool_property_list(entries: dict) Saved tool-property list
get_tool_list() / set_tool_list(dict) Tool properties list
get_tool_property() / set_tool_property(mass: float, center_of_mass: list, inertia: list, arm_index: int=0) Active tool physical properties
get_tool_property_at(index: int) Get the selected arm's current tool properties (index: arm index)
get_pack_pos() Joint pack position
get_path_config() Config path information
set_locked_joint(index) / set_tool_link(index) Kinematic locking / tool link
get_locked_joint() Get the index of the locked joint; Returns: int
get_custom_pos_list() / set_custom_pos_list(dict) Custom pose list
get_tool_shape_list() / set_tool_shape_list(dict) Tool shape models
get_environment_list() / set_environment_list(dict) Environment models
get_sensorless_params() / set_sensorless_params(params_dict) Sensorless collision params
get_compliance_control_joint_gain() / set_compliance_control_joint_gain(gains_dict) Compliance control joint gains
get_on_start_program_config() / set_on_start_program_config(config_dict) Set/Get startup program
get_operation_mode_config() / set_operation_mode_config(use_ext_auto_mode: bool=False, mode_locked: bool=False, auto_mode: bool=False) Operation-mode / external-auto configuration
get_modbus_server_list() / set_modbus_server_list(modbus_server_list) Modbus server list (TCP / RTU)
get_auto_servo_off() / set_auto_servo_off(enable,time) Auto servo-off configuration
get_teleop_params() / set_teleop_params(cutoff_freq=None) TeleOp filtering params
get_kinematics_params() Kinematics parameters snapshot
get_io_data() Snapshot of all IO states
set_safety_limits(power_limit: float, power_limit_ratio: float, tcp_force_limit: float, tcp_force_limit_ratio: float, tcp_speed_limit: float, tcp_speed_limit_ratio: float, joint_upper_limits: Optional[List[float]]=None, joint_lower_limits: Optional[List[float]]=None, joint_l1_limits: Optional[List[float]]=None) / get_safety_limits() Safety power/force/speed limits
set_safety_stop_config(...) / get_safety_stop_config() Safety stop configuration
get_joint_limit_config() / set_joint_limit_config(config_dict) / get_original_joint_limit_config() Joint-limit configuration
list_safety_snapshots() / save_safety_snapshot(label: str) / restore_safety_snapshot(snapshot_id: str) / delete_safety_snapshot(snapshot_id: str) Safety snapshot management
restor_factory_control_gains() / restor_factory_safety_config() Restore factory configuration helpers
set_reduced_speed(speed) / get_reduced_speed() / get_reduced_ratio() Reduced mode configuration
request_safety_function(id,state) / get_safety_function_state() Safety function state mgmt
get_safety_control_data() Low-level safety diagnostics
set_auto_mode(on) / check_auto_mode() Auto mode state
check_reduced_mode() Reduced mode active check
get_control_info() Controller meta info
check_aproach_retract_valid(tpos, init_jpos, pre_tpos, post_tpos, arm_index=0) Validate approach/retract sequence
get_pallet_point_list(tpos, jpos, pre_tpos, post_tpos, pallet_pattern, width, height, arm_index=0) Generate palletizing points grid
move_recover_joint(jtarget, base_type) Recovery joint move

Example for start_log(), end_log()

These two functions are used for realtime data logging. Upon calling start_log(), the robot's data is stored in memory. After a certain period, calling end_log() stops the memory logging and writes it to a file within STEP. The realtime data logging file can be found at the following path:

/home/user/release/IndyDeployment/RTLog/RTRecord.csv

For other installation locations, use RTLog/RTRecord.csv relative to the deployment root.

Example for wait_for_operation_state(op_state)

For example, if you want to wait until the robot is in the IDLE state (where IDLE is defined as 5), you can call:

IDLE = 5
indy.wait_for_operation_state(IDLE)

Example for wait_for_motion_state(motion_state)

  • motion_state:
    • is_target_reached
    • is_in_motion
    • is_pausing
    • is_stopping
    • has_motion

For instance, if you want to wait until the robot's motion is complete, indicated by the state 'is_target_reached', you can call:

indy.wait_for_motion_state('is_target_reached')

Example for set_friction_comp_state(enable)

Enable or disable friction compensation.

indy.set_friction_comp_state(enable=True)

  • enable: A boolean value:
    • True: Enables friction compensation.
    • False: Disables friction compensation.

Example for get_friction_comp_state()

Retrieve the current state of friction compensation.

friction_state = indy.get_friction_comp_state()  
print(friction_state)

Example for set_mount_pos(rot_y, rot_z)

Set the mounting angles for the robot base.

indy.set_mount_pos(rot_y=5.0, rot_z=10.0)

  • rot_y: Rotation angle around the Y-axis (in degrees).
  • rot_z: Rotation angle around the Z-axis (in degrees).

Example for get_mount_pos()

Retrieve the current mounting angles for the robot base.

mount_pos = indy.get_mount_pos()  
print(mount_pos)

Example for set_brakes(brake_state_list)

Set the brake states for each motor.

indy.set_brakes(brake_state_list=[True, False, True, True, False, True])

  • brake_state_list: A list of boolean values representing the brake state for each motor:
    • True: Engage the brake.
    • False: Release the brake.

Example for set_servo_all(enable)

Enable or disable all servos.

indy.set_servo_all(enable=True)

  • enable: A boolean value:
    • True: Enable all servos.
    • False: Disable all servos.

Example for set_servo(index, enable)

Enable or disable a specific servo by index.

indy.set_servo(index=3, enable=False)

  • index: The index of the servo to enable or disable (integer).
  • enable: A boolean value:
    • True: Enable the specified servo.
    • False: Disable the specified servo.

Example for set_endtool_led_dim(led_dim)

Set the LED brightness for the end-effector tool.

indy.set_endtool_led_dim(led_dim=128)

  • led_dim: An integer value representing the LED brightness (0-255).
    • 0: LED off.
    • 255: Maximum brightness.

Example for execute_tool(name)

Execute a tool function by its name.

indy.execute_tool(name="GripperOpen")

  • name: A string representing the name of the tool function to execute.

Example for get_el5001()

Retrieve data from the EL5001 device.

el5001_data = indy.get_el5001()  
print(el5001_data)

Example for get_el5101()

Retrieve data from the EL5101 device.

el5101_data = indy.get_el5101()  
print(el5101_data)

Example for get_brake_control_style()

Retrieve the current brake control style.

brake_control_style = indy.get_brake_control_style()  
print(brake_control_style)

Example for set_conveyor_name(name)

Set the name of the conveyor.

indy.set_conveyor_name(name="Conveyor1")

  • name: A string representing the name of the conveyor.

Example for set_conveyor_encoder(encoder_type, channel1, channel2, sample_num, mm_per_tick, vel_const_mmps, reversed)

Configure the conveyor encoder settings.

1
2
3
4
5
6
7
8
9
indy.set_conveyor_encoder(
    encoder_type=1,
    channel1=0,
    channel2=1,
    sample_num=10,
    mm_per_tick=0.1,
    vel_const_mmps=500.0,
    reversed=False
)

  • encoder_type: The type of the encoder.
  • channel1: The first channel of the encoder.
  • channel2: The second channel of the encoder.
  • sample_num: The number of samples to average for position measurement.
  • mm_per_tick: The number of millimeters per encoder tick.
  • vel_const_mmps: The constant velocity in millimeters per second.
  • reversed: A boolean to reverse the encoder direction.

Example for set_conveyor_trigger(trigger_type, channel, detect_rise)

Set the conveyor trigger settings.

1
2
3
4
5
indy.set_conveyor_trigger(
    trigger_type=2,
    channel=0,
    detect_rise=True
)

  • trigger_type: The type of the trigger.
  • channel: The channel used for the trigger.
  • detect_rise: A boolean to detect a rising edge (True) or falling edge (False).

Example for set_conveyor_offset(offset_mm)

Set the offset value for the conveyor in millimeters.

indy.set_conveyor_offset(offset_mm=50.0)

  • offset_mm: The offset value in millimeters.

Example for set_conveyor_starting_pose(jpos, tpos)

Set the starting joint and task poses for the conveyor.

1
2
3
4
indy.set_conveyor_starting_pose(
    jpos=[0, 0, 0, 0, 0, 0],
    tpos=[]
)

  • jpos: A list of joint positions for the starting pose.
  • tpos: A list of task positions for the starting pose.

Example for set_conveyor_terminal_pose(jpos, tpos)

Set the terminal joint and task poses for the conveyor.

1
2
3
4
indy.set_conveyor_terminal_pose(
    jpos=[0, 0, -90, 0, -90, 0],
    tpos=[]
)

  • jpos: A list of joint positions for the terminal pose.
  • tpos: A list of task positions for the terminal pose.

Example for set_compliance_mode(enable, stiffness=None), get_compliance_mode()

1
2
3
# Enable compliance with optional Cartesian stiffness vector [Fx,Fy,Fz,Mx,My,Mz]
indy.set_compliance_mode(enable=True, stiffness=[1000,1000,800,50,50,50])
indy.get_compliance_mode()

Example for get_transformed_ft_sensor_data()

indy.get_transformed_ft_sensor_data()
{'ft_Fx': 0.0, 'ft_Fy': 0.0, 'ft_Fz': 0.0, 'ft_Tx': 0.0, 'ft_Ty': 0.0, 'ft_Tz': 0.0}

Example for get_ft_zero()

indy.get_ft_zero()
{'code': '0', 'msg': ''}

Example for get_load_factors()

indy.get_load_factors()
{'percents': [0, 0, 0, 0, 0, 0], 'torques': [6.677687e-12, 0.004674716, 0.0042034686, 1.8616622e-11, 0.0014535208, 9.194879e-13]}

Example for push_bus_event(event_id, ...), catch_bus_event(event_id, timeout)

EVENT_ID_PART_ARRIVED = 10
indy.push_bus_event(event_id=EVENT_ID_PART_ARRIVED, text_data="Part Arrived")
{'enable': True}

indy.catch_bus_event(event_id=EVENT_ID_PART_ARRIVED, timeout=5)
{'event_id': '0', 'b_data': [], 'i_data': [], 'f_data': [], 'text_data': ''}

Example for get_friction_comp(), set_friction_comp(...)

indy.get_friction_comp()
{'control_comp_levels': [5, 5, 5, 5, 5, 5],
 'teaching_comp_levels': [5, 2, 5, 5, 5, 5],
 'control_comp_enable': False,
 'teaching_comp_enable': False}
1
2
3
4
indy.set_friction_comp(control_comp=False, 
                        control_comp_levels=[5, 5, 5, 5, 5, 5],
                        dt_comp=False, 
                        dt_comp_levels=[5, 2, 5, 5, 5, 5])
{'code': '0', 'msg': ''}

Example for get_coll_sens_level(), set_coll_sens_level(level)

indy.get_coll_sens_level()
{'level': 3}
indy.set_coll_sens_level(level=3)
{'code': '0', 'msg': ''}

Example for get_coll_sens_param(), set_coll_sens_param(...)

indy.get_coll_sens_param()
{'j_torque_bases': [28.661913, 39.307114, 12.529799, 500.0, 3.272204, 3.9443905],
 'j_torque_tangents': [0.0, 0.0, 0.0, 0.0, 0.0, 0.18989582],
 't_torque_bases': [],
 't_torque_tangents': [],
 'error_bases': [],
 'error_tangents': [],
 't_constvel_torque_bases': [],
 't_constvel_torque_tangents': [],
 't_conveyor_torque_bases': [],
 't_conveyor_torque_tangents': []}
indy.set_coll_sens_param(
    j_torque_bases=[28.661913, 39.307114, 12.529799, 500.0, 3.272204, 3.9443905],
    j_torque_tangents=[0.0, 0.0, 0.0, 0.0, 0.0, 0.18989582],
    t_torque_bases=[],
    t_torque_tangents=[],
    t_constvel_torque_bases=[],
    t_constvel_torque_tangents=[],
    t_conveyor_torque_bases=[],
    t_conveyor_torque_tangents=[],
    error_bases=[],
    error_tangents=[]
)
 {'code': '0', 'msg': ''}

Example for get_coll_policy(), set_coll_policy(policy, sleep_time, gravity_time)

indy.get_coll_policy()
{'sleep_time': 0.1, 'gravity_time': 0.1, 'policy': 0}
indy.set_coll_policy(policy=1, sleep_time=2.0, gravity_time=1.0)
{'code': '0', 'msg': ''}

Example for get_default_coll_sens_param()

indy.get_default_coll_sens_param()
{'j_torque_bases': [36.518505, 35.84927, 13.247915, 5.481758, 3.2522166, 2.2444422],
 'j_torque_tangents': [7.811518, 4.0451393, 1.635358, 0.97019386, 0.32473636, 0.3347427],
 't_torque_bases': [],
 't_torque_tangents': [],
 'error_bases': [],
 'error_tangents': [],
 't_constvel_torque_bases': [],
 't_constvel_torque_tangents': [],
 't_conveyor_torque_bases': [],
 't_conveyor_torque_tangents': []}

Example for get_collison_model_margin(), set_collison_model_margin(collision_margin, recover_margin)

indy.get_collison_model_margin()
{'collision_margin': 0.01, 'recover_margin': 0.0}
indy.set_collison_model_margin(collision_margin=0.01, recover_margin=0.0)
{'code': '0', 'msg': ''}

Example for get_home_pos(), set_home_pos(jpos)

indy.get_home_pos()
{'jpos': [-1.4522937e-13,
  -4.742025e-13,
  -90.0,
  8.28669e-13,
  -90.0,
  -2.9221787e-16]}
indy.set_home_pos(jpos=[0,0,-90,0,-90,0])
{'code': '0', 'msg': ''}

Example for get_ref_frame(), set_ref_frame(fpos), set_ref_frame_planar(fpos0, fpos1, fpos2)

For set_ref_frame/set_ref_frame_planar, arm_index selects the arm to configure and link_index selects the reference frame's parent link. Defaults 0, 0 select the first arm and the base link. The reference link must exist in the robot configuration and must not create a cycle between arms. Configure it while IDLE and check code/msg in the response. fpos contains six [x, y, z, u, v, w] values in mm/deg.

set_tool_frame sets the TCP offset of the arm selected by arm_index. link_index is deprecated.

The index in get_ref_frame_for(index) and get_tool_property_at(index) selects an arm; the latter returns that arm's current tool properties.

indy.get_ref_frame()
{'fpos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}

indy.set_ref_frame(fpos=[0,0,0,0,0,0])
{'code': '0', 'msg': ''}

1
2
3
4
5
6
# Planar definition using three points
indy.set_ref_frame_planar(
  fpos0=[400,0,400,0,180,0],
  fpos1=[500,0,400,0,180,0],
  fpos2=[400,100,400,0,180,0]
)

Example for save_reference_frame(frames, default_name), load_reference_frame()

frames = [
        {
            'name': 'ref_0',
            'tpos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
            'tpos0': [],
            'tpos1': [],
            'tpos2': [],
            'jpos0': [],
            'jpos1': [],
            'jpos2': []
        },
        {
            'name': 'ref_2',
            'tpos': [0.02, 0.0, 0.0, 0.0, 0.0, 0.0],
            'tpos0': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
            'tpos1': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
            'tpos2': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
            'jpos0': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
            'jpos1': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
            'jpos2': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
        }
    ]
default_name = 'ref_0'

indy.save_reference_frame(frames, default_name)
{'code': '0', 'msg': ''}

indy.load_reference_frame()
{'ref_frames': [{'name': 'ref_0',
   'tpos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
   'tpos0': [],
   'tpos1': [],
   'tpos2': [],
   'jpos0': [],
   'jpos1': [],
   'jpos2': []},
  {'name': 'ref_2',
   'tpos': [0.02, 0.0, 0.0, 0.0, 0.0, 0.0],
   'tpos0': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
   'tpos1': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
   'tpos2': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
   'jpos0': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
   'jpos1': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
   'jpos2': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}],
 'default_name': 'ref_0'}

Example for get_tool_frame_list(), set_tool_frame_list(dict)

indy.get_tool_frame_list()
{'tool_frames': [{'name': 'tool_0', 'tpos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}],
 'default_name': 'tool_0'}

indy.set_tool_frame_list({'tool_frames': [{'name': 'tool_0', 'tpos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}],
 'default_name': 'tool_0'})
{'code': '0', 'msg': ''}

Example for get_tool_list(), set_tool_list(dict)

tool_list = indy.get_tool_list()
{'tools': [{'name': 'gripper_Init',
   'execute_time': 0.0,
   'do_signals': [],
   'enddo_signals': [],
   'ao_signals': [],
   'endao_signals': [],
   'expression': [],
   'gripper_signals': [],
   'modbus_signals': []},
  {'name': 'gripper_Reset',
   'execute_time': 0.0,
   'do_signals': [],
   'enddo_signals': [],
   'ao_signals': [],
   'endao_signals': [],
   'expression': [],
   'gripper_signals': [],
   'modbus_signals': []},
  {'name': 'gripper_on',
   'execute_time': 0.5,
   'enddo_signals': [{'port': 'C', 'states': [1]}],
   'do_signals': [],
   'ao_signals': [],
   'endao_signals': [],
   'expression': [],
...
   'ao_signals': [],
   'endao_signals': [],
   'expression': [],
   'gripper_signals': [],
   'modbus_signals': []}]}

indy.set_tool_list(tool_list)
{'code': '0', 'msg': ''}

Example for get_tool_property(), set_tool_property(...)

tool_property = indy.get_tool_property()
{'center_of_mass': [0.0, 0.0, 0.0],
 'inertia': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
 'mass': 0.0}

indy.set_tool_property(mass=tool_property['mass'], center_of_mass=tool_property['center_of_mass'], inertia=tool_property['inertia'])
{'code': '0', 'msg': ''}

Example for get_tool_property_list(), set_tool_property_list(tool_properties)

tool_props = indy.get_tool_property_list()
{'tools': [{'name': 'tool_0',
   'property': {'mass': 0.0,
                'center_of_mass': [0.0, 0.0, 0.0],
                'inertia': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}}]}

indy.set_tool_property_list(tool_props)
{'code': '0', 'msg': ''}

Example for get_pack_pos()

indy.get_pack_pos()
{'jpos': [0.0, 0.0, 161.0, 0.0, -161.0, 0.0]}

Example for get_path_config()

indy.get_path_config()
{'config_path': '/home/user/dev/runtest/Release/IndyDeployment/../IndyConfigurations/Cobot/Configs',
 'safety_path_list': ['/home/user/dev/runtest/Release/IndyDeployment/../IndyConfigurations/Cobot/Params/CollisionGain.json',
  '/home/user/dev/runtest/Release/IndyDeployment/../IndyConfigurations/Cobot/Params/ControlGain.json',
  '/home/user/dev/runtest/Release/IndyDeployment/../IndyConfigurations/Cobot/Configs/SafetyConfig.json']}

Example for set_locked_joint(index), set_tool_link(index)

indy.set_locked_joint(index=5)
{'code': '0', 'msg': ''}

indy.set_tool_link(index=6)
{'code': '0', 'msg': ''}

Example for get_custom_pos_list(), set_custom_pos_list(dict)

custom_pos_list = indy.get_custom_pos_list()
{'custom_pos': [{'name': 's',
   'jpos': [5.621142,
    -13.550142,
    -62.83071,
    -8.226061,
    -103.11327,
    -0.046695936]},
  {'name': 'yu',
   'jpos': [32.550945,
    -0.19380428,
    -91.98957,
    -6.7704606,
    -91.93207,
    -3.7073963]}]}

indy.set_custom_pos_list(custom_pos_list)
{'code': '0', 'msg': ''}

Example for get_tool_shape_list(), set_tool_shape_list(dict)

tool_shape_list = indy.get_tool_shape_list()
{'geometries': [{'name': 'tool_0', 'shapes': []}], 'default_name': 'tool_0'}

indy.set_tool_shape_list(tool_shape_list)
{'code': '0', 'msg': ''}

Example for get_environment_list(), set_environment_list(dict)

env_list = indy.get_environment_list()
{'environments': [{'name': 'env_0', 'zones': []}], 'default_name': 'env_0'}

indy.set_environment_list(env_list)
{'code': '0', 'msg': ''}

Example for get_sensorless_params(), set_sensorless_params(params_dict)

params = indy.get_sensorless_params()
{'tau_bound': [1.0, 1.0, 1.0, 1.0, 1.0, 1.0]}

indy.set_sensorless_params(params)
{'code': '0', 'msg': ''}

Example for get_compliance_control_joint_gain(), set_compliance_control_joint_gain(gains_dict)

gains = indy.get_compliance_control_joint_gain()
{'kp': [100.0, 100.0, 100.0, 100.0, 100.0, 100.0],
 'kv': [20.0, 20.0, 20.0, 20.0, 20.0, 20.0],
 'kl2': [800.0, 800.0, 600.0, 400.0, 400.0, 400.0],
 'kd': [4.0, 4.0, 4.0, 4.0, 4.0, 4.0],
 'bd': [5.0, 5.0, 5.0, 5.0, 5.0, 5.0],
 'rate': [1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
 'ki': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
 'ks': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
 'km': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}

indy.set_compliance_control_joint_gain(gains)
{'code': '0', 'msg': ''}

Example for get_on_start_program_config(), set_on_start_program_config(config_dict)

cfg = indy.get_on_start_program_config()
{'index': 1, 'auto_run': False, 'auto_boot_on_power': False}

indy.set_on_start_program_config(cfg)
{'code': '0', 'msg': ''}

Example for get_operation_mode_config(), set_operation_mode_config(config_dict)

op_cfg = indy.get_operation_mode_config()
{'auto_mode': True, 'use_ext_auto_mode': False, 'mode_locked': False}

indy.set_operation_mode_config(op_cfg)
{'code': '0', 'msg': ''}

Example for get_modbus_server_list(), set_modbus_server_list(modbus_server_list)

mb_cfg = indy.get_modbus_server_list()
{'modbus_servers': [{'name': 'mbtcp_0',
   'ip': '192.168.0.10',
   'port': 502,
   'conn_type': 0}]}

indy.set_modbus_server_list(mb_cfg)
{'code': '0', 'msg': ''}

Example for get_auto_servo_off(), set_auto_servo_off(enable, time)

servo_off = indy.get_auto_servo_off()
{'enable': False, 'time': 0.0}

indy.set_auto_servo_off(enable=True, time=600)
{'code': '0', 'msg': ''}

Example for get_teleop_params(), set_teleop_params(smooth_factor, cutoff_freq, error_gain)

indy.get_teleop_params()
{'smooth_factor': 1.0, 'cutoff_freq': 1000.0, 'error_gain': 10.0}

indy.set_teleop_params(smooth_factor=0.6, cutoff_freq=1000.0, error_gain=1.2)
{'code': '0', 'msg': ''}

Example for get_kinematics_params()

indy.get_kinematics_params()
{'mdh': [{'d0': 300.0,
   'parent': -1,
   'a': 0.0,
   'alpha': 0.0,
   'theta0': 0.0,
   'type': 0,
   'index': 0},
  {'alpha': 90.0,
   'theta0': 90.0,
   'index': 1,
   'a': 0.0,
   'd0': 0.0,
   'type': 0,
   'parent': 0},
  {'a': 450.0,
   'theta0': 90.0,
   'index': 2,
   'parent': 1,
   'alpha': 0.0,
   'd0': 0.0,
   'type': 0},
  {'alpha': 90.0,
   'd0': 350.0,
   'theta0': 180.0,
   'index': 3,
...
   'index': 5,
   'parent': 4,
   'a': 0.0,
   'theta0': 0.0,
   'type': 0}]}

Example for get_io_data()

indy.get_io_data()
{'di': [{'state': 2, 'address': 0},
  {'address': 1, 'state': 2},
  {'address': 2, 'state': 2},
  {'address': 3, 'state': 2},
  {'address': 4, 'state': 2},
  {'address': 5, 'state': 2},
  {'address': 6, 'state': 2},
  {'address': 7, 'state': 2},
  {'address': 8, 'state': 2},
  {'address': 9, 'state': 2},
  {'address': 10, 'state': 2},
  {'address': 11, 'state': 2},
  {'address': 12, 'state': 2},
  {'address': 13, 'state': 2},
  {'address': 14, 'state': 2},
  {'address': 15, 'state': 2},
  {'address': 16, 'state': 2},
  {'address': 17, 'state': 2},
  {'address': 18, 'state': 2},
  {'address': 19, 'state': 2},
  {'address': 20, 'state': 2},
  {'address': 21, 'state': 2},
  {'address': 22, 'state': 2},
  {'address': 23, 'state': 2},
  {'address': 24, 'state': 2},
...
  {'address': 7, 'voltage': 0}],
 'end_di': [{'port': 'C', 'states': [-2]}],
 'end_do': [{'port': 'C', 'states': [0]}],
 'end_ai': [{'address': 0, 'voltage': 0}],
 'end_ao': [{'address': 0, 'voltage': 0}]}

Example for set_safety_limits(...), get_safety_limits()

safety_limits = indy.get_safety_limits()
{'power_limit': 1500.0,
 'power_limit_ratio': 100.0,
 'tcp_force_limit': 800.0,
 'tcp_force_limit_ratio': 100.0,
 'tcp_speed_limit': 4.0,
 'tcp_speed_limit_ratio': 100.0,
 'joint_upper_limits': [175.0, 175.0, 175.0, 175.0, 175.0, 215.0],
 'joint_lower_limits': [-175.0, -175.0, -175.0, -175.0, -175.0, -215.0]}

1
2
3
4
5
6
indy.set_safety_limits(power_limit=safety_limits['power_limit'],
                       power_limit_ratio=safety_limits['power_limit_ratio'],
                       tcp_force_limit=safety_limits['tcp_force_limit'],
                       tcp_force_limit_ratio=safety_limits['tcp_force_limit_ratio'],
                       tcp_speed_limit=safety_limits['tcp_speed_limit'],
                       tcp_speed_limit_ratio=safety_limits['tcp_speed_limit_ratio'])    
{'code': '0', 'msg': ''}

Example for set_safety_stop_config(...), get_safety_stop_config()

stop_config = indy.get_safety_stop_config()
{'joint_speed_limit_stop_cat': 2,
 'joint_torque_limit_stop_cat': 2,
 'tcp_speed_limit_stop_cat': 2,
 'tcp_force_limit_stop_cat': 2,
 'power_limit_stop_cat': 2,
 'safegd_stop_cat': [2, 2],
 'safegd_type': [1, 1],
 'joint_position_limit_stop_cat': 0}

indy.set_safety_stop_config(
    jpos_limit_stop_cat=stop_config['joint_position_limit_stop_cat'],
    jvel_limit_stop_cat=stop_config['joint_speed_limit_stop_cat'],
    jtau_limit_stop_cat=stop_config['joint_torque_limit_stop_cat'],
    tvel_limit_stop_cat=stop_config['tcp_speed_limit_stop_cat'],
    tforce_limit_stop_cat=stop_config['tcp_force_limit_stop_cat'],
    power_limit_stop_cat=stop_config['power_limit_stop_cat'],
    safegd_stop_cat=stop_config['safegd_stop_cat'],
    safegd_type=stop_config['safegd_type']
)
{'code': '0', 'msg': ''}

Example for get_joint_limit_config(), get_original_joint_limit_config(), set_joint_limit_config(config_dict)

joint_cfg = indy.get_joint_limit_config()
orig_joint_cfg = indy.get_original_joint_limit_config()
{'robot_name': 'Indy7',
 'joint_pos_limit': {'min': [...], 'max': [...]},
 'source_file': '/home/user/...'}

indy.set_joint_limit_config(joint_cfg)
{'code': '0', 'msg': ''}

Example for list_safety_snapshots(), save_safety_snapshot(req), restore_safety_snapshot(id), delete_safety_snapshot(id)

snapshots = indy.list_safety_snapshots()
{'snapshots': [{'snapshot_id': 'default',
   'label': 'Factory Default',
   'created_at': '2026-04-17T00:00:00',
   'immutable': True}]}

1
2
3
indy.save_safety_snapshot({'label': 'backup_before_update'})
indy.restore_safety_snapshot({'snapshot_id': snapshots['snapshots'][0]['snapshot_id']})
indy.delete_safety_snapshot({'snapshot_id': 'backup_before_update'})
{'code': '0', 'msg': ''}

Example for restor_factory_control_gains(), restor_factory_safety_config()

indy.restor_factory_control_gains()
indy.restor_factory_safety_config()
{'code': '0', 'msg': ''}

Example for set_reduced_speed(speed), get_reduced_speed(), get_reduced_ratio()

indy.get_reduced_speed()
{'speed': 250.0, 'msg': ''}

indy.set_reduced_speed(speed=250)
{'code': '0', 'msg': ''}

indy.get_reduced_ratio()
{'ratio': 25.0, 'msg': ''}

Example for request_safety_function(id, state), get_safety_function_state()

indy.get_safety_function_state()
{'id': 0, 'state': 0}

indy.request_safety_function(id=2, state=True)
{'code': '0', 'msg': ''}

Example for get_safety_control_data()

indy.get_safety_control_data()
{'safety_state': {'id': 0, 'state': 0},
 'auto_mode': False,
 'reduced_mode': False,
 'enabler_pressed': False}

Example for set_auto_mode(on), check_auto_mode()

indy.check_auto_mode()
{'on': False, 'msg': ''}

indy.set_auto_mode(on=True)

Example for check_reduced_mode()

indy.check_reduced_mode()
{'on': False, 'msg': ''}

Example for get_control_info()

indy.get_control_info()
{'control_version': '3.4.0-rc11 [2025.08.13]',
 'robot_model': 'Indy7',
 'response': {'msg': 'GetControlInfo Success', 'code': '0'}}

Example for check_aproach_retract_valid(...)

1
2
3
4
indy.check_aproach_retract_valid(tpos=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                                  init_jpos=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                                  pre_tpos=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                                  post_tpos=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
{'is_valid': True,
 'tar_pos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
 'approach_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
 'retract_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
 'response': {'msg': 'CheckAproachRetractValid Success', 'code': '0'}}

Example for get_pallet_point_list(...)

1
2
3
4
5
6
7
indy.get_pallet_point_list(tpos=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                           jpos=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                           pre_tpos=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                           post_tpos=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                           pallet_pattern=1,
                           width=100,
                           height=100)
{'pallet_points': [{'tar_pos': [7.5499475e-14,
    -186.5,
    1328.0,
    180.0,
    180.0,
    180.0],
   'approach_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'retract_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'tar_jpos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]},
  {'tar_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'approach_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'retract_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'tar_jpos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]},
  {'tar_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'approach_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'retract_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'tar_jpos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]},
  {'tar_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'approach_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'retract_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'tar_jpos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]},
  {'tar_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'approach_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'retract_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'tar_jpos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]},
...
   'approach_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'retract_pos': [7.5499475e-14, -186.5, 1328.0, 180.0, 180.0, 180.0],
   'tar_jpos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]},
  ...],
 'response': {'msg': 'GetPalletPointList Success', 'code': '0'}}

Example for move_recover_joint(jtarget, base_type)

from neuromeka import JointBaseType
indy.move_recover_joint(jtarget=[0,0,-90,0,-90,0], base_type=JointBaseType.ABSOLUTE)
{'code': '0', 'msg': ''}