chankh / donkeycar-sagemaker

Build an autonomous car using Amazon SageMaker
7 stars 4 forks source link

Error while start driving #1

Closed chapmantam closed 5 years ago

chapmantam commented 5 years ago

I follow your the steps.

  1. clone this github link and install donkeycar.
  2. Create a car by "donkey createcar mycar"
  3. Then I create a certificate and download all the key and certificate to the donkey car.
  4. Change the config.py with the correct path.
  5. pip install AWSIotPythonSDK
  6. Once I want to start the driving by typing the command python manage.py drive, it got an error:
    (env) pi@mypi:~/mycar2 $ python manage.py drive
    using donkey v2.5.1 ...
    /usr/lib/python3/dist-packages/h5py/_init_.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
    from ._conv import register_converters as _register_converters
    loading config file: /home/pi/mycar2/config.py
    config loaded
    PiCamera loaded.. .warming camera
    Starting Donkey Server...
    Traceback (most recent call last):
    File "manage.py", line 197, in <module>
    drive(cfg, model_path = args['--model'], use_joystick=args['--js'], use_chaos=args['--chaos'])
    File "manage.py", line 133, in drive
    iot = aws.new_iot_publisher(intputs=inputs, types=types)
    TypeError: new_iot_publisher() got an unexpected keyword argument 'intputs'

    How to fix it?

chankh commented 5 years ago

This should be an issue in the donkey project, created issue in chankh/donkey#2 for tracking.

chankh commented 5 years ago

@chapmantam this issue should be fixed in chankh/donkey, please checkout the latest code and try again

chapmantam commented 5 years ago

the previous problem is fixed but another comes, it shows another error:

(env) pi@mypi:~/mycar5 $ python manage.py drive
using donkey v2.5.1 ...
/usr/lib/python3/dist-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
loading config file: /home/pi/mycar5/config.py
config loaded
PiCamera loaded.. .warming camera
Starting Donkey Server...
Traceback (most recent call last):
  File "manage.py", line 197, in <module>
    drive(cfg, model_path = args['--model'], use_joystick=args['--js'], use_chaos=args['--chaos'])
  File "manage.py", line 133, in drive
    iot = aws.new_iot_publisher(inputs=inputs, types=types)
  File "/home/pi/donkeycar/donkeycar/parts/iot.py", line 139, in new_iot_publisher
    iot = IoTPublisher(vehicle_id=self.vehicle_id, client=client, inputs=inputs, types=types)
  File "/home/pi/donkeycar/donkeycar/parts/iot.py", line 26, in __init__
    self.connected = self.client.connect()
  File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/MQTTLib.py", line 485, in connect
    return self._mqtt_core.connect(keepAliveIntervalSecond)
  File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/mqtt_core.py", line 192, in connect
    self.connect_async(keep_alive_sec, self._create_blocking_ack_callback(event))
  File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/mqtt_core.py", line 219, in connect_async
    raise e
  File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/mqtt_core.py", line 207, in connect_async
    rc = self._internal_async_client.connect(keep_alive_sec, ack_callback)
  File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/internal/clients.py", line 119, in connect
    rc = self._paho_client.connect(host, port, keep_alive_sec)
  File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/paho/client.py", line 664, in connect
    return self.reconnect()
  File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/paho/client.py", line 824, in reconnect
    ciphers=self._tls_ciphers)
  File "/usr/lib/python3.5/ssl.py", line 1077, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python3.5/ssl.py", line 760, in __init__
    self.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 996, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 641, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:720)

I have already changed the config.py accordingly. (I have renamed the cert and private key and put it on the same folder on the created car folder).

Is there any extra step I need to do ?

chankh commented 5 years ago

@chapmantam try using absolute path instead, like /home/pi/d2/private.pem.key and /home/pi/d2/certificate.pem.key

chapmantam commented 5 years ago

After git pull and re createcar again, Another problem exists:

(env) pi@mypi:~/mycar $ python manage.py drive using donkey v2.5.1 ... /usr/lib/python3/dist-packages/h5py/init.py:34: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters loading config file: /home/pi/mycar/config.py config loaded PiCamera loaded.. .warming camera Starting Donkey Server... Traceback (most recent call last): File "manage.py", line 197, in drive(cfg, model_path = args['--model'], use_joystick=args['--js'], use_chaos=args['--chaos']) File "manage.py", line 133, in drive iot = aws.new_iot_publisher(inputs=inputs, types=types) File "/home/pi/donkeycar/donkeycar/parts/iot.py", line 139, in new_iot_publisher iot = IoTPublisher(vehicle_id=self.vehicle_id, client=client, inputs=inputs, types=types) File "/home/pi/donkeycar/donkeycar/parts/iot.py", line 26, in init self.connected = self.client.connect() File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/MQTTLib.py", line 485, in connect return self._mqtt_core.connect(keepAliveIntervalSecond) File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/mqtt_core.py", line 192, in connect self.connect_async(keep_alive_sec, self._create_blocking_ack_callback(event)) File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/mqtt_core.py", line 219, in connect_async raise e File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/mqtt_core.py", line 207, in connect_async rc = self._internal_async_client.connect(keep_alive_sec, ack_callback) File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/internal/clients.py", line 119, in connect rc = self._paho_client.connect(host, port, keep_alive_sec) File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/paho/client.py", line 664, in connect return self.reconnect() File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/paho/client.py", line 786, in reconnect sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0)) File "/usr/lib/python3.5/socket.py", line 694, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): File "/usr/lib/python3.5/socket.py", line 733, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

Do you know how to fix it? Thank you

chankh commented 5 years ago

Looks like a connection issue, is your pi connected to internet? Check if you can access the iot endpoint.

On Tue, Oct 16, 2018, 5:19 PM chapmantam notifications@github.com wrote:

After git pull and re createcar again, Another problem exists:

(env) pi@mypi:~/mycar $ python manage.py drive using donkey v2.5.1 ... /usr/lib/python3/dist-packages/h5py/init.py:34: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters loading config file: /home/pi/mycar/config.py config loaded PiCamera loaded.. .warming camera Starting Donkey Server... Traceback (most recent call last): File "manage.py", line 197, in drive(cfg, model_path = args['--model'], use_joystick=args['--js'], use_chaos=args['--chaos']) File "manage.py", line 133, in drive iot = aws.new_iot_publisher(inputs=inputs, types=types) File "/home/pi/donkeycar/donkeycar/parts/iot.py", line 139, in new_iot_publisher iot = IoTPublisher(vehicle_id=self.vehicle_id, client=client, inputs=inputs, types=types) File "/home/pi/donkeycar/donkeycar/parts/iot.py", line 26, in init self.connected = self.client.connect() File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/MQTTLib.py", line 485, in connect return self._mqtt_core.connect(keepAliveIntervalSecond) File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/mqtt_core.py", line 192, in connect self.connect_async(keep_alive_sec, self._create_blocking_ack_callback(event)) File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/mqtt_core.py", line 219, in connect_async raise e File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/mqtt_core.py", line 207, in connect_async rc = self._internal_async_client.connect(keep_alive_sec, ack_callback) File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/internal/clients.py", line 119, in connect rc = self._paho_client.connect(host, port, keep_alive_sec) File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/paho/client.py", line 664, in connect return self.reconnect() File "/home/pi/env/lib/python3.5/site-packages/AWSIoTPythonSDK/core/protocol/paho/client.py", line 786, in reconnect sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0)) File "/usr/lib/python3.5/socket.py", line 694, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): File "/usr/lib/python3.5/socket.py", line 733, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

Do you know how to fix it? Thank you

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/chankh/donkeycar-sagemaker/issues/1#issuecomment-430164710, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2qPnPDmpq_WlVfHkcAGwvWOsp0nBclks5ulaSXgaJpZM4Xb6_m .

chapmantam commented 5 years ago

I have checked that there is no problem on the internet. It can also pin to google.com I also checked the monitor in aws iot, it shows nothing about the connection. I don't think it has connected to iot . Do you have any suggestion?

chapmantam commented 5 years ago

the problem is fixed . I forgot to add the endpoint into the config.py after re-createcar. After I rechange the CA root certificate, then the error disappear.