remote control

Mercury A1 supports socket remote control. We provide a developed python socket server script, which can realize remote control of the robot using python.

Server

The server script is the Server_A1.py file saved on the system desktop. Run this file to open the socket server.

python Server_A1.py

Client

The client is required to be in the same network segment as the server. [Self Hotspot] (../../5-BasicApplication/5.1-SystemUsageInstructions/5.1-SystemUsageInstructions.md#513-vnc) will be turned on by default when the system is powered on, client computer You can connect to the machine's own hotspot or connect to the same WIFI as the machine.

Client usage

pymycobot contains the API of the socket client. The client is created:

from pymycobot import MercurySocket

mc = MercurySocket("10.42.0.1", 9000)

mc.power_on()
print(mc.get_angles())

The usage of socket API is basically the same as that of serial communication API, and the interface is universal. Learn more about API


← Python API | System →

results matching ""

    No results matching ""