Skip to content

F710 Joystick(Wireless Joystick)

Repository

https://github.com/FaBoPlatform/donkeypart_ps3_controller

インストール方法

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

ソースの修正

1
2
cd ~/mycar
nano manage.py

F710に対応する場合

F710JoystickControllerをimportします。

manage.py

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
import os
from docopt import docopt

import donkeycar as dk
from donkeypart_ps3_controller import F710JoystickController
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

...

1
2
3
4
5
    if use_joystick or cfg.USE_JOYSTICK_AS_DEFAULT:
        ctr = F710JoystickController(throttle_scale=cfg.JOYSTICK_MAX_THROTTLE,
            steering_scale=cfg.JOYSTICK_STEERING_SCALE,
            auto_record_on_throttle=cfg.AUTO_RECORD_ON_THROTTLE
    )

ラジコンカーの起動

Joystickを有効にしたラジコンカーの起動は、--jsをつけてます。

1
python manage.py drive --js