Elecom Joystick(Wireless Joystick)

ELECOM Wireress GamePad JC-U3912T

参考:

https://github.com/coolerking/donkeypart_game_controller

 

Repository

https://github.com/FaBoPlatform/donkeypart_ps3_controller

インストール方法

pip install git+https://github.com/FaBoPlatform/donkeypart_ps3_controller

ソースの修正

cd ~/mycar
vi manage.py

Elecomに対応する場合

ElecomJoystickControllerをimportします。

manage.py

import os
from docopt import docopt

import donkeycar as dk
from donkeypart_ps3_controller import ElecomJoystickController
from donkeycar.parts.camera import PiCamera
from donkeycar.parts.transform import Lambda
from donkeycar.parts.keras import KerasLinear
from donkeycar.parts.actuator import PCA9685, PWMSteering, PWMThrottle
from donkeycar.parts.datastore import TubGroup, TubWriter
from donkeycar.parts.web_controller import LocalWebController
from donkeycar.parts.clock import Timestamp

manage.py

    if use_joystick or cfg.USE_JOYSTICK_AS_DEFAULT:
        ctr = ElecomJoystickController(throttle_scale=cfg.JOYSTICK_MAX_THROTTLE,
            steering_scale=cfg.JOYSTICK_STEERING_SCALE,
            auto_record_on_throttle=cfg.AUTO_RECORD_ON_THROTTLE
    )

A DIY self driving platform for RC cars