Simulation mode

Hi,

How can I setup simulation mode in python.
Do I need the hardware arm to do simulation with my program?
I must have a handle to use the API commands.
I cannot use the connect API because I first needed a Handle to use this API
and when I try to get the Handle with the command
arm = XArmAPI(‘localhost’) or XArmAPI(‘127.0.0.1’) it gives a socket error.
So my question, how I can put it into simulation mode through python code.

Thanks,
Danny

Hi Danny,
You need connect to the real robot controller and real robotic arm to use the simulation mode.
Thanks

Blockquote
arm = XArmAPI(‘192.168.3.209’)
arm.connect(self,‘localhost’,payload,collision)
arm.clean_warn()
arm.clean_error()
arm.motion_enable(True)
arm.set_mode(4)
set_state(0)

Blockquote
When I send move or joint command the cobot still moves?
What aim I doing wrong?

Thanks,
Danny

Hi Danny,
For the newly formware(1.6.0 or later), the simulation mode API is " arm.set_simulation_robot(on_off=True)“
Thanks