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
Download the latest Mercury A1 server script.
Run the downloaded server file to open the socket server.
python server_A1_close_loop.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