hamuchiwa / AutoRCCar

OpenCV Python Neural Network Autonomous RC Car
BSD 2-Clause "Simplified" License
3.33k stars 1.48k forks source link

problem in streaming #21

Closed varun333 closed 6 years ago

varun333 commented 7 years ago

hamuchiwa I have install the python picam library on my rasp pi and that module is working on my VNC viewer but I dont know whts causing the errror while I am running stream_client_test.py on vnc and same with the server code.

Is there require any kind of configuration in pycharm or something else is causing the error. Following are the errors

While running stream_client_test.py using VNC viewer

Traceback (most recent call last): File "/home/pi/Desktop/raspberryPi/stream_client.py", line 19, in client_socket.connect(('192.168.2.11', 8000)) File "/usr/lib/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args) error: [Errno 111] Connection refused

While running server test .py on laptop

File "C:/Users/USER/PycharmProjects/AutoRCCar-master/test/stream_server_test.py", line 44, in VideoStreamingTest() File "C:/Users/USER/PycharmProjects/AutoRCCar-master/test/stream_server_test.py", line 12, in init self.server_socket.bind(('192.168.2.11', 8000)) File "C:\Python27\lib\socket.py", line 228, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 10049] The requested address is not valid in its context

Process finished with exit Please reply soon

hamuchiwa commented 7 years ago

Different is fine, I manually measured the angle. You probably have a different value in your case.

Nimrahussain commented 7 years ago

hi @varun333 18721080_654106361446904_1463685154_o i have got this error while running the program on server, can you please help me, if you have corrected this error. i would be grateful to you.

thanks alot

varun333 commented 7 years ago

@Nimrahussain I just wanna ease you little bit because there is no problem with the code. i think there is connectivity issue related to Ip address.

Check it out thoroughly and if problem persist kindly let me know.

094459 commented 7 years ago

I have got this project up and running (thanks for sharing) but I am struggling with one issue which I think is causing me problems. There appears to be a significant lag between the camera streaming on the car, and the controller (rc_driver.py).

I have had to tweak the project slightly. I am not using arduino to controll the car, but I have a dc motor hat running which is hooked up to a websocket server, and I am just sending websocket commands to move the car. Works very well indeed and better than my experience for the arduino/remote control. Am wondering whether this is impacting the video stream and causing the lag.

Anyone else experiencing lag with the video feed. am going to try and optimise the video stream and see if i can make it smoother.

AiBuddy commented 7 years ago

hey @varun333 how did you get rid off Still not running,as i am trying to run your codes individually server side : File "C:/Users/USER/PycharmProjects/AutoRCCar/test/stream_server_test.py", line 44, in VideoStreamingTest() File "C:/Users/USER/PycharmProjects/AutoRCCar/test/stream_server_test.py", line 16, in init self.streaming() File "C:/Users/USER/PycharmProjects/AutoRCCar/test/stream_server_test.py", line 34, in streaming image = cv2.imdecode(np.fromstring(jpg, dtype=np.uint8), cv2.CV_LOAD_IMAGE_UNCHANGED) AttributeError: 'module' object has no attribute 'CV_LOAD_IMAGE_UNCHANGED' this error? i am facing this error while testing m picam streaming. fast reply would be appreciated

biswaprus commented 6 years ago

@hamuchiwa I m getting this error as follows can you plz help me out with it

image = cv2.imdecode(np.fromstring(jpg, dtype=np.uint8), cv2.CV_LOAD_IMAGE_UNCHANGED) AttributeError: 'module' object has no attribute 'CV_LOAD_IMAGE_UNCHANGED'

hamuchiwa commented 6 years ago

@biswaprus Please refer to OpenCV doc.

Marouanetah commented 5 years ago

Hello Guys! Im null with Electronics, but good with machine and deep learning coding xD, may someone help me with the setup for the arduino and rasbperry circuits ? thanks a lot guys!