Skip to content

Commit

Permalink
Add more docs on using xbox controller.
Browse files Browse the repository at this point in the history
  • Loading branch information
lovettchris committed Apr 24, 2017
1 parent 23ba60d commit 3e3a4e3
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 24 deletions.
7 changes: 5 additions & 2 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ INFO [tone_alarm] home_set
Up until this point in time, however, the PX4 will reject takeoff commands.


## What do the colors mean in the Segmentation View ?
### What do the colors mean in the Segmentation View ?

See [Camera Views](camera_views.md) for information on the camera views and how to change them.

## Unreal 4.15 doesn't look as good as 4.14
### Unreal 4.15 doesn't look as good as 4.14

Unreal 4.15 added the ability for Foliage LOD dithering to be disabled on a case-by-case basis by unchecking the `Dithered LOD Transition` checkbox in the foliage materials. Note that all materials used on all LODs need to have the checkbox checked in order for dithered LOD transitions to work. When checked the transition of generated foliage will be a lot smoother and will look better than 4.14.


### Can I use an xbox controller to fly?
Yes, see [xbox controller](xbox_controller.md) for details.
7 changes: 7 additions & 0 deletions docs/manual_flight.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
- [Unreal AirSim Setup Video](https://youtu.be/1oY8Qu5maQQ) shows you all the setup steps in this document.

## Instructions

Please see [this guide](http://ardupilot.org/copter/docs/common-pixhawk-and-px4-compatible-rc-transmitter-and-receiver-systems.html) for connecting Pixhawk to the RC transmitter.

If you discover any issues during setup, please [let us know](https://github.com/Microsoft/AirSim/issues).
Please include these [log files](logging.md) when you report an issue.


## Using Joystick/Gamepad (Alternative to RC)

You can also use an xbox controller, it just won't be as precise as a real RC controller.
See [xbox controller](xbox_controller.md) for details.
11 changes: 2 additions & 9 deletions docs/sitl.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,5 @@ set the LocalIpAddress to the address of your host machine running the Unreal e

## Using Joystick/Gamepad (Alternative to RC)
Why do you need RC for simulator? Because usual joysticks are not very accurate and in fact very "noisy" for flying!
We have tried it and gladly switched back to regular RC. But just in case you want to try it as well, here are the instructions.

1. Connect Joystick/Gamepad such as XBox 360 controller to PC. Start QGroundControl.
2. Click on the purple "Q" icon on left in tool bar to reveal the Preferences panel.
3. Go to General tab and check the Virtual Joystick checkbox.
4. Go back to settings screen (gears icon), click on Parameters tab, type `COM_RC_IN_MODE` in search box and change its value to either `Joystick/No RC Checks` or `Virtual RC by Joystick`.
5. You should now see a new tab "Joystick" where you can do the calibration.

A Playstation 3 controller is confirmed to work as an AirSim controller. On Windows, an emulator to make it look like an Xbox 360 controller, is required however. Many different solutions are available online, for example [x360ce Xbox 360 Controller Emulator](https://github.com/x360ce/x360ce). `Note:` don't use x360ce if you have a real XBox controller.
We have tried it and gladly switched back to regular RC. But just in case you want to try it as well,
see [xbox controller](xbox_controller.md) for details.
36 changes: 23 additions & 13 deletions docs/xbox_controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,27 @@ To use an XBox controller with AirSim follow these steps:

![Gamecontrollers](images/game_controllers.png)

2. Connect to Pixhawk serial port using MavLinkTest.exe like this:
2. Launch QGroundControl and you should see a new Joystick tab under stettings:

![Gamecontrollers](images/qgc_joystick.png)

Now calibrate the radio, and setup some handy button actions. For example, I set mine so that
the 'A' button arms the drone, 'B' put it in manual flight mode, 'X' puts it in altitude hold mode
and 'Y' puts it in position hold mode. I also prefer the feel of the controller when I check the
box labelled "Use exponential curve on roll,pitch, yaw" because this gives me more sensitivity for
small movements.]

QGroundControl will find your Pixhawk via the UDP proxy port 14550 setup by MavLinkTest above.
AirSim will find your Pixhawk via the other UDP server port 14570 also setup by MavLinkTest above.
You can also use all the QGroundControl controls for autonomous flying at this point too.


3. Connect to Pixhawk serial port using MavLinkTest.exe like this:
````
MavLinkTest.exe -serial:*,115200 -proxy:127.0.0.1:14550 -server:127.0.0.1:14570
````

3. Run AirSim Unreal simulator with these `~/Documents/AirSim/settings.json` settings:
4. Run AirSim Unreal simulator with these `~/Documents/AirSim/settings.json` settings:
````
"SitlIp": "",
"SitlPort": 14560,
Expand All @@ -20,17 +35,12 @@ MavLinkTest.exe -serial:*,115200 -proxy:127.0.0.1:14550 -server:127.0.0.1:14570
"UseSerial": false,
````

4. Launch QGroundControl and you should see a new Joystick tab under stettings:

![Gamecontrollers](images/qgc_joystick.png)
## Advanced

Now calibrate the radio, and setup some handy button actions. For example, I set mine so that
the 'A' button arms the drone, 'B' put it in manual flight mode, 'X' puts it in altitude hold mode
and 'Y' puts it in position hold mode. I also prefer the feel of the controller when I check the
box labelled "Use exponential curve on roll,pitch, yaw" because this gives me more sensitivity for
small movements.]
If the Joystick tab doesn't show up in QGroundControl then Click on the purple "Q" icon on left in tool bar to reveal the Preferences panel.
Go to General tab and check the Virtual Joystick checkbox. Go back to settings screen (gears icon), click on Parameters tab,
type `COM_RC_IN_MODE` in search box and change its value to either `Joystick/No RC Checks` or `Virtual RC by Joystick`.

QGroundControl will find your Pixhawk via the UDP proxy port 14550 setup by MavLinkTest above.
AirSim will find your Pixhawk via the other UDP server port 14570 also setup by MavLinkTest above.
You can also use all the QGroundControl controls for autonomous flying at this point too.
## Playstation 3 controller

A Playstation 3 controller is confirmed to work as an AirSim controller. On Windows, an emulator to make it look like an Xbox 360 controller, is required however. Many different solutions are available online, for example [x360ce Xbox 360 Controller Emulator](https://github.com/x360ce/x360ce). `Note:` don't use x360ce if you have a real XBox controller.

0 comments on commit 3e3a4e3

Please sign in to comment.