Question about Xbox360 Controller of Microsoft

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
thanhvu94
Member
Posts: 31
Joined: Fri Mar 24, 2017 6:49 pm

Question about Xbox360 Controller of Microsoft

Post by thanhvu94 »

Hello,

I'm using the Xbox 360 Controller of Microsoft (like this one https://www.amazon.com/Microsoft-Wired- ... B004QRKWLA). There are 2 joysticks, and when I move it, there are changes in Target Tab.

However, I don't understand the meaning of "Input device -> Device -> Input Map -> ..." . What is the difference between the modes for example PS3_Mode_2, PS4_Mode_2, Joystick ... Which one should I choose to control easily Yaw/Pitch/Roll/Thrust easily?

I tried PS3_Mode_2, and I can change Thrust/Pitch/Yaw but I cannot change the Roll.

Thank you.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Question about Xbox360 Controller of Microsoft

Post by arnaud »

The different mapping are meant to be for different gamepad brand and type. You should use the xbox_mapping or make you own mapping using the input configuration: https://wiki.bitcraze.io/doc:crazyflie: ... ut_devices

The mode is the control mode, this is a common thing for model flight control: http://uploads.tapatalk-cdn.com/20140112/aquqatuz.jpg
Note that in the default configuration "mode 1" are really "mode 3", this was a mistake we made at the beginning.
thanhvu94
Member
Posts: 31
Joined: Fri Mar 24, 2017 6:49 pm

Re: Question about Xbox360 Controller of Microsoft

Post by thanhvu94 »

But why in those mode, some modes set the Yaw initial angles non-zero, some modes set the throttle non-zero, some modes set the roll non-zeros ...?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Question about Xbox360 Controller of Microsoft

Post by arnaud »

The different configuration file are for different gamepad. Depending on your gamepad different axis will be used for the joystick and shoulder button so if you select a mapping that is not for your xbox gamepad it is normal you see strange mapping.
thanhvu94
Member
Posts: 31
Joined: Fri Mar 24, 2017 6:49 pm

Re: Question about Xbox360 Controller of Microsoft

Post by thanhvu94 »

arnaud wrote:The different configuration file are for different gamepad. Depending on your gamepad different axis will be used for the joystick and shoulder button so if you select a mapping that is not for your xbox gamepad it is normal you see strange mapping.
Is there any tutorials related to how to set a new configuration map? I want the drone to go up and hover at a specific height by default (so I don't have to hold the Thrust joystick up all the time). But I cannot find any tutorials which show how to configure a new device input config map?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Question about Xbox360 Controller of Microsoft

Post by arnaud »

You can find the documentation for input device mapping creation on the wiki: https://wiki.bitcraze.io/doc:crazyflie: ... ut_devices

What you are trying to achieve cannot be done with the input mapping only though, you can try the altitude-hold mode if you want to fly without having to handle the height manually. Though altitude hold with the pressure sensor only is not very precise, we are soon going to release a z-ranger deck that will allow to keep a very precise height up to about 1.5m.
thanhvu94
Member
Posts: 31
Joined: Fri Mar 24, 2017 6:49 pm

Re: Question about Xbox360 Controller of Microsoft

Post by thanhvu94 »

arnaud wrote:You can find the documentation for input device mapping creation on the wiki: https://wiki.bitcraze.io/doc:crazyflie: ... ut_devices

What you are trying to achieve cannot be done with the input mapping only though, you can try the altitude-hold mode if you want to fly without having to handle the height manually. Though altitude hold with the pressure sensor only is not very precise, we are soon going to release a z-ranger deck that will allow to keep a very precise height up to about 1.5m.
Can I do the hovering (attitude-hold) well with ROS using VICON? (or Crazyflie ROS package using PID controller)
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Question about Xbox360 Controller of Microsoft

Post by arnaud »

Yes hovering can work very well with a Vicon system (this has been done with Crazyflie, ROS and a vicon system: https://www.youtube.com/watch?v=D0CrjoYDt9w :-).

The ROS crazyflie driver comes with example on how to get it to work with a Vicon system: https://github.com/whoenig/crazyflie_ro ... rpn.launch. It can be a good place to start.
Post Reply