Question about Xbox360 Controller of Microsoft

Discussions and questions about the Crazyflie Nano Quadcopter
thanhvu94
Beginner
Posts: 14
Joined: Fri Mar 24, 2017 6:49 pm

Question about Xbox360 Controller of Microsoft

Postby thanhvu94 » Tue Mar 28, 2017 12:42 pm

Hello,

I'm using the Xbox 360 Controller of Microsoft (like this one https://www.amazon.com/Microsoft-Wired-Controller-Windows-Console/dp/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: 889
Joined: Tue Feb 06, 2007 12:36 pm

Re: Question about Xbox360 Controller of Microsoft

Postby arnaud » Thu Mar 30, 2017 7:41 am

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
Beginner
Posts: 14
Joined: Fri Mar 24, 2017 6:49 pm

Re: Question about Xbox360 Controller of Microsoft

Postby thanhvu94 » Thu Mar 30, 2017 7:55 am

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: 889
Joined: Tue Feb 06, 2007 12:36 pm

Re: Question about Xbox360 Controller of Microsoft

Postby arnaud » Thu Mar 30, 2017 8:07 am

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
Beginner
Posts: 14
Joined: Fri Mar 24, 2017 6:49 pm

Re: Question about Xbox360 Controller of Microsoft

Postby thanhvu94 » Tue Apr 04, 2017 2:10 pm

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: 889
Joined: Tue Feb 06, 2007 12:36 pm

Re: Question about Xbox360 Controller of Microsoft

Postby arnaud » Thu Apr 06, 2017 8:04 am

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
Beginner
Posts: 14
Joined: Fri Mar 24, 2017 6:49 pm

Re: Question about Xbox360 Controller of Microsoft

Postby thanhvu94 » Fri Apr 07, 2017 11:31 am

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: 889
Joined: Tue Feb 06, 2007 12:36 pm

Re: Question about Xbox360 Controller of Microsoft

Postby arnaud » Mon Apr 10, 2017 11:01 am

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.


Return to “General discussions”

Who is online

Users browsing this forum: No registered users and 1 guest