-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Azure development environment and documentation (#2816)
* add azure doc to index * initial move from external repo to airsim * updated doc to new repo * fixed paths for new repo and .vscode info * added missing .vscode dir * fixed link * wording * message after starting * feedback
- Loading branch information
1 parent
827f1f5
commit 23cb81a
Showing
14 changed files
with
568 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-python.python", | ||
"ms-azuretools.vscode-docker", | ||
"ms-vscode.powershell" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: Current File", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Start AirSim", | ||
"type": "shell", | ||
"options": {"shell": {"executable": "powershell.exe"}}, | ||
"command": ".\\start-airsim.ps1" | ||
|
||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import airsim | ||
import pprint | ||
|
||
def print_state(client): | ||
state = client.getMultirotorState() | ||
s = pprint.pformat(state) | ||
print("state: %s" % s) | ||
|
||
imu_data = client.getImuData() | ||
s = pprint.pformat(imu_data) | ||
print("imu_data: %s" % s) | ||
|
||
barometer_data = client.getBarometerData() | ||
s = pprint.pformat(barometer_data) | ||
print("barometer_data: %s" % s) | ||
|
||
magnetometer_data = client.getMagnetometerData() | ||
s = pprint.pformat(magnetometer_data) | ||
print("magnetometer_data: %s" % s) | ||
|
||
gps_data = client.getGpsData() | ||
s = pprint.pformat(gps_data) | ||
print("gps_data: %s" % s) | ||
|
||
# connect to the AirSim simulator | ||
client = airsim.MultirotorClient() | ||
client.confirmConnection() | ||
client.enableApiControl(True) | ||
client.armDisarm(True) | ||
|
||
print_state(client) | ||
print('Takeoff') | ||
client.takeoffAsync().join() | ||
|
||
while True: | ||
print_state(client) | ||
print('Go to (-10, 10, -10) at 5 m/s') | ||
client.moveToPositionAsync(-10, 10, -10, 5).join() | ||
client.hoverAsync().join() | ||
print_state(client) | ||
print('Go to (0, 10, 0) at 5 m/s') | ||
client.moveToPositionAsync(0, 10, 0, 5).join() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
airsim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/master/docs/settings_json.md", | ||
"SettingsVersion": 1.2, | ||
"SimMode": "Multirotor", | ||
"ClockSpeed": 1.0, | ||
"Vehicles": { | ||
"SimpleFlight": { | ||
"VehicleType": "SimpleFlight", | ||
"DefaultVehicleState": "Armed", | ||
"EnableCollisionPassthrogh": false, | ||
"EnableCollisions": true, | ||
"AllowAPIAlways": true, | ||
"RC": { | ||
"RemoteControlID": 0, | ||
"AllowAPIWhenDisconnected": false | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
$airSimInstallPath = "C:\AirSim\" | ||
$airSimBinaryZipUrl = "https://github.com/microsoft/AirSim/releases/download/v1.3.1-windows/Blocks.zip" | ||
$airSimBinaryZipFilename = "Blocks.zip" | ||
$airSimBinaryPath = $airSimInstallPath + "blocks\blocks\binaries\win64\blocks.exe" | ||
$airSimBinaryName = "Blocks" | ||
|
||
$webClient = new-object System.Net.WebClient | ||
|
||
# Install the OpenSSH Client | ||
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 | ||
# Install the OpenSSH Server | ||
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 | ||
# Enable service | ||
Start-Service sshd | ||
Set-Service -Name sshd -StartupType 'Automatic' | ||
|
||
#Install Chocolatey | ||
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex | ||
# Bypass confirmation in scripts. | ||
choco feature enable --name="'allowGlobalConfirmation'" | ||
choco install python --version=3.8.2 | ||
choco install git | ||
# Run time c++ | ||
choco install vcredist-all | ||
choco install directx | ||
|
||
#Create new folder & set as default directory | ||
New-Item -ItemType directory -Path $airSimInstallPath | ||
cd $airSimInstallPath | ||
|
||
# Get AirSim | ||
$webClient.DownloadFile($airSimBinaryZipUrl, $airSimInstallPath + $airSimBinaryZipFilename) | ||
# Unzip AirSim | ||
Expand-Archive $airSimBinaryZipFilename | ||
|
||
# Firewall rule for AirSim | ||
New-NetFirewallRule -DisplayName $airSimBinaryName -Direction Inbound -Program $airSimBinaryPath -Action Allow |
Oops, something went wrong.