12Next
Return to list
View: 2686|Reply: 13

AWR 4WD

[Copy link]

1

Threads

6

Posts

53

Credits

Registered member

Rank: 2

Credits
53
Post time 2020-3-9 03:47:11 | Show all posts |Read mode
Edited by 1583696017 at 2020-3-9 03:52 AM

Hi all,
i have following issue, i can control wheels and servo for the pi camera, lights, but status info like cpu and ram usage are not showing in the client application:
adeept.PNG
when i execute the server script on raspberry, and connect with the client app, i see this error messages:
adeept1.PNG
please any ideas how to fix this? also the video window is not showing from the application.

thx for any hints.


Reply

Use magic Report

0

Threads

2

Posts

12

Credits

Newbie

Rank: 1

Credits
12
Post time 2020-3-9 16:51:46 From the mobile phone | Show all posts
It's not connecting. Either the server isn't running correctly, isn't running at the IP address you have tried, or there is a firewall blocking the connection.
Reply

Use magic Report

1

Threads

6

Posts

53

Credits

Registered member

Rank: 2

Credits
53
 Author| Post time 2020-3-9 20:20:15 | Show all posts
@1580791099 - as you can see in the 2nd screenshot, im connected to the correct IP.
Reply

Use magic Report

1

Threads

6

Posts

53

Credits

Registered member

Rank: 2

Credits
53
 Author| Post time 2020-3-9 23:47:03 | Show all posts
so the server.py doesnt open the ports for stats and ultrasonic:
adeept2.PNG
as is in the code written:
def Info_receive():
    global CPU_TEP,CPU_USE,RAM_USE
    HOST = ''
    INFO_PORT = 2256  

def ultra_receive():
    global ultra_data, canvas_text, canvas_rec
    ultra_HOST = ''
    ultra_PORT = 2257  

Reply

Use magic Report

0

Threads

69

Posts

412

Credits

Website Editor

Rank: 8Rank: 8

Credits
412
Post time 2020-3-10 16:51:01 | Show all posts
Add time.sleep (0.5) above line 102 of serve.py to let the child thread run completely before connecting to the GUI. If you are not convenient to change the code, we will update the code to github later, then you can clone it again.
Reply

Use magic Report

1

Threads

6

Posts

53

Credits

Registered member

Rank: 2

Credits
53
 Author| Post time 2020-3-10 21:56:41 | Show all posts
Edited by 1583696017 at 2020-3-10 10:59 PM

@ Adeept - thx for reply... i added the time.sleep value. but there are more bugs in the code:
adeept3.PNG

still the status windows are not displaying anything...

EDIT: im going trough the code and apparently the client.py is acting as a server script and listening on port, when it should connect to remote port:
adeept4.PNG

and the server.py is trying connect to itself and not listening on the opened ports:
adeept5.PNG
Reply

Use magic Report

0

Threads

69

Posts

412

Credits

Website Editor

Rank: 8Rank: 8

Credits
412
Post time 2020-3-11 11:41:19 | Show all posts
1583696017 replied at 2020-3-10 09:56 PM
@ Adeept - thx for reply... i added the time.sleep value. but there are more bugs in the code:

Add time.sleep before ultra_Socket.connect (ultra_ADDR) (refer to the picture location). We've tried to connect more than ten times after adding these two time.sleep, and no problem occurred each time. If your problem still exist, you can also delay time.sleep for a longer time so that the ultra and info threads have more time to start.

TIM图片20200311114105.png
Reply

Use magic Report

1

Threads

6

Posts

53

Credits

Registered member

Rank: 2

Credits
53
 Author| Post time 2020-3-11 14:39:08 | Show all posts
@ Adeept - issue still persist...
adeept6.PNG

Reply

Use magic Report

1

Threads

6

Posts

53

Credits

Registered member

Rank: 2

Credits
53
 Author| Post time 2020-3-17 00:23:44 | Show all posts
Hi all,
if you have same troubles with this robot, let me know, i fixed the code by myself after a week of googling and trying.
Reply

Use magic Report

1

Threads

3

Posts

15

Credits

Newbie

Rank: 1

Credits
15
Post time 2020-5-14 05:03:53 | Show all posts
Hi,

I am facing the same issue. Can you give me the fixed code? I tried to git pull latest code from adeept_awr repo with no luck!
Reply

Use magic Report

12Next
Return to list
You have to log in before you can reply Login | Sign Up

Points Rules