Help us understand the problem. What is going on with this article?

DonkeyCar 3.1.0 コントローラーの左右のスティックを入れ替える

使用しているコントローラーを確認

~/mycar/myconfig.py
の125行目
CONTROLLER_TYPE
を書き換えていなければps3の設定を使用している.

ソースコードの変更

~/project/donkeycar/donkeycar/parts/controller.py
をテキストエディタで開く.
使用しているコントローラーのクラスを探す.
ps3なら964行目の
class PS3JoystickController(JoystickController):
のクラスを使用しているので,
クラス中のスティックの定義をしている1009,1010行

    self.axis_trigger_map = {
        'left_stick_horz' : self.set_steering,
        'right_stick_vert' : self.set_throttle,
    }

のleftとrightを入れ換える.

    self.axis_trigger_map = {
        'right_stick_horz' : self.set_steering,
        'left_stick_vert' : self.set_throttle,
    }

もしmyconfig.pyで
CONTROLLER_TYPE
をF710に変更してあれば,1164,1165行を書き換える.

以上

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away