Skip to content

Python IndyDCP2 Client

The Python IndyDCP client is a Python class that allows control of Indy based on the IndyDCP Protocol.

Installation

python IndyDCP client You can download the file using the following terminal command.

pip3 install --upgrade pip
pip3 install neuromeka

Connecting to and Disconnecting from Indy

All communication with Indy can be performed through the IndyDCP2 class declared in neuromeka. To initialize an IndyDCP2 object, you need to provide the type and IP address of Indy.

Warning

  • Since IndyDCP2 does not allow multiple client connections, you must call disconnect() to terminate the connection after use in order to connect again.
from neuromeka import IndyDCP2

step_ip = "192.168.0.100" # IP address of the robot to connect
robot_name = "NRMK-Indy7" # Name of the robot to connect

indy = IndyDCP2(step_ip,robot_name)

indy.connect()

////////////////////////////
// Section for Indy operations //
///////////////////////////

indy.connect()

Python IndyDCP2 Command List

Below are usage examples for some of the IndyDCP commands.

Function Description
stop_emergency(self) Emergency stop
reset_robot(self) Reset robot
set_servo(self, arr) Servo on/off depending on arr
set_brake(self, arr) Brake on/off depending on arr
stop_motion(self) Stop Robot Motion
go_home(self) Move Indy to the home position
go_zero(self) Move Indy to the Zero position
joint_move_to(self, q) Move all joint angles to values ​​of q
joint_move_by(self, q) Move all joint angles relative to the value of q
task_move_to(self, p) Move the robot end effector to position p with 6 degrees of freedom.
task_move_by(self, p) Move the robot end effector relative to position p by the values of its 6 degrees of freedom.
start_current_program(self) Start the currently loaded robot program
pause_current_program(self) Pause the currently running program.
resume_current_program(self) Resume the currently paused program.
stop_current_program(self) Stop the current program.
direct_teaching(self, mode) Enable/Disable the teach pendant based on mode.
moveC(self, via_p, end_p) Move in a circular path using via_point and end_point.
set_movec_angle(self, angle) Set the desired angle for moveC motion.
set_moveC_vel(self, velocity) Set the desired velocity for moveC motion.
set_moveC_acc(self, acceleration) Set the desired acceleration for moveC motion.
start_teleop(self, mode) Execute TeleOperation based on the mode.
stop_teleop(self) Stop TeleOperation
tele_movej(self, q) Move all joint angles to the value of q, depending on whether it's in absolute or relative movement mode in TeleOP.
tele_movel(self, p) Move the robot end effector to position p with 6 degrees of freedom, based on whether it's in absolute or relative movement mode in TeleOP.
set_default_tcp(self, tcp) Set the default TCP (Tool Center Point) value to tcp
active_sdk(self, key, date) Activate the SDK with key and data
set_custom_control_mode(self, mode) Activate custom control with mode
get_custom_control_mode(self) Retrieve the currently applied custom control mode.
get_control_torque_jts(self) Retrieve the currently joint torque sensor values.
get_control_torque_jts_raw1(self) Retrieve the currently joint torque sensor raw_1 values.
get_control_torque_jts_raw2(self) Retrieve the currently joint torque sensor raw_2 values.

Simple motion example

In this chapter, we introduce a simple example of robot motion. For clarity, we assume the robot is Indy7 with an IP address of 192.168.0.100.

Warning

When you run the code, the robot will move. Please ensure the area around the robot is clear!
from neuromeka import IndyDCP2

step_ip = "192.168.0.100" # IP address of the robot to connect
robot_name = "NRMK-Indy7" # Name of the robot to connect

indy = IndyDCP2(step_ip,robot_name)

indy.connect()

indy.go_home() # move home
indy.wait_for_move_finish() # Wait until Indy motion is complete
while True:
    if indy.get_int_val(0) : #Check The Int0 Value
        indy.joint_move_by([10,10,10,10,10,10]) # move all joint +10° relative position
        indy.wait_for_move_finish() #Wait until Indy motion is complete
        break
indy.go_home() # move home
indy.wait_for_move_finish() # Wait until Indy motion is complete

indy.connect()