djiuser_ucSf6ZolszTZ
lvl.1
Hungary
Offline
|
Hi,
I have a Robomaster EP core robot that works in all modes with the educational app (Wi-Fi direct connection or Networking connection), but when I try to program it with the Python SDK, the Wi-Fi direct connection works, but when I try to control through a router the robot is connected via wifi and the computer is connected via wire or wifi in both cases I have the same problem. I've tried on WSL and Ubuntu, but the result was the same.
from robomaster import conn
if __name__ == '__main__':
robot_ip_list = conn.scan_robot_ip_list()
print(robot_ip_list)
I get this:
[Running] python -u "c:\...\Robomaster\Projects\EP\test_000_ip.py"
find robot sn:3JKCK6U0030ALG, ip:192.168.140.6
['192.168.140.6']
The program can find the robot, but when the following or any other code when the robot should do something:
from robomaster import robot
if __name__ == '__main__':
ep_robot = robot.Robot()
ep_robot.initialize(conn_type="sta")
ep_version = ep_robot.get_version()
print("Robot Version: {0}".format(ep_version))
ep_robot.close()
I get this:
[Running] python -u "c:\...\Robomaster\Projects\EP\test_001_version.py"
2023-12-15 11:39:37,008 ERROR conn.py:107 scan_robot_ip: exception timed out
2023-12-15 11:39:37,011 ERROR robot.py:1354 Robot: Connection Failed, Please Check Hareware Connections!!! conn_type sta, host None, target None.
2023-12-15 11:39:37,011 ERROR client.py:70 Client: __init__, create Connection, exception: module 'robomaster.config' has no attribute 'DEFAULT_CONN_PROTO'
2023-12-15 11:39:37,190 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running.
Robot: Can not connect to robot, check connection please.
2023-12-15 11:39:37,190 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running.
2023-12-15 11:39:37,190 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running.
2023-12-15 11:39:37,191 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running.
2023-12-15 11:39:37,191 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running.
Traceback (most recent call last):
File "C:\Users\admin\anaconda3\envs\robomaster\lib\site-packages\robomaster\client.py", line 93, in remote_addr
return self._conn.target_addr
AttributeError: 'NoneType' object has no attribute 'target_addr'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\...\Robomaster\Projects\EP\test_001_version.py", line 6, in <module>
ep_robot.initialize(conn_type="sta")
File "C:\Users\admin\anaconda3\envs\robomaster\lib\site-packages\robomaster\robot.py", line 1327, in initialize
self._ftp.connect(self.ip)
File "C:\Users\admin\anaconda3\envs\robomaster\lib\site-packages\robomaster\robot.py", line 1157, in ip
return self.client.remote_addr[0]
File "C:\Users\admin\anaconda3\envs\robomaster\lib\site-packages\robomaster\client.py", line 95, in remote_addr
raise print('Robot: Can not connect to robot, check connection please.')
TypeError: exceptions must derive from BaseException
|
|