-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c45fabc
Showing
10,671 changed files
with
1,942,910 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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,88 @@ | ||
* text=auto | ||
# Unity files | ||
*.meta -text merge=unityyamlmerge diff | ||
*.unity -text merge=unityyamlmerge diff | ||
*.asset -text merge=unityyamlmerge diff | ||
*.prefab -text merge=unityyamlmerge diff | ||
*.mat -text merge=unityyamlmerge diff | ||
*.anim -text merge=unityyamlmerge diff | ||
*.controller -text merge=unityyamlmerge diff | ||
*.overrideController -text merge=unityyamlmerge diff | ||
*.physicMaterial -text merge=unityyamlmerge diff | ||
*.physicsMaterial2D -text merge=unityyamlmerge diff | ||
*.playable -text merge=unityyamlmerge diff | ||
*.mask -text merge=unityyamlmerge diff | ||
*.brush -text merge=unityyamlmerge diff | ||
*.flare -text merge=unityyamlmerge diff | ||
*.fontsettings -text merge=unityyamlmerge diff | ||
*.guiskin -text merge=unityyamlmerge diff | ||
*.giparams -text merge=unityyamlmerge diff | ||
*.renderTexture -text merge=unityyamlmerge diff | ||
*.spriteatlas -text merge=unityyamlmerge diff | ||
*.terrainlayer -text merge=unityyamlmerge diff | ||
*.mixer -text merge=unityyamlmerge diff | ||
*.shadervariants -text merge=unityyamlmerge diff | ||
# Image formats | ||
*.psd filter=lfs diff=lfs merge=lfs -text | ||
*.jpg filter=lfs diff=lfs merge=lfs -text | ||
*.png filter=lfs diff=lfs merge=lfs -text | ||
*.gif filter=lfs diff=lfs merge=lfs -text | ||
*.bmp filter=lfs diff=lfs merge=lfs -text | ||
*.tga filter=lfs diff=lfs merge=lfs -text | ||
*.tiff filter=lfs diff=lfs merge=lfs -text | ||
*.tif filter=lfs diff=lfs merge=lfs -text | ||
*.iff filter=lfs diff=lfs merge=lfs -text | ||
*.pict filter=lfs diff=lfs merge=lfs -text | ||
*.dds filter=lfs diff=lfs merge=lfs -text | ||
*.xcf filter=lfs diff=lfs merge=lfs -text | ||
# Audio formats | ||
*.mp3 filter=lfs diff=lfs merge=lfs -text | ||
*.ogg filter=lfs diff=lfs merge=lfs -text | ||
*.wav filter=lfs diff=lfs merge=lfs -text | ||
*.aiff filter=lfs diff=lfs merge=lfs -text | ||
*.aif filter=lfs diff=lfs merge=lfs -text | ||
*.mod filter=lfs diff=lfs merge=lfs -text | ||
*.it filter=lfs diff=lfs merge=lfs -text | ||
*.s3m filter=lfs diff=lfs merge=lfs -text | ||
*.xm filter=lfs diff=lfs merge=lfs -text | ||
# Video formats | ||
*.mov filter=lfs diff=lfs merge=lfs -text | ||
*.avi filter=lfs diff=lfs merge=lfs -text | ||
*.asf filter=lfs diff=lfs merge=lfs -text | ||
*.mpg filter=lfs diff=lfs merge=lfs -text | ||
*.mpeg filter=lfs diff=lfs merge=lfs -text | ||
*.mp4 filter=lfs diff=lfs merge=lfs -text | ||
# 3D formats | ||
*.fbx filter=lfs diff=lfs merge=lfs -text | ||
*.obj filter=lfs diff=lfs merge=lfs -text | ||
*.max filter=lfs diff=lfs merge=lfs -text | ||
*.blend filter=lfs diff=lfs merge=lfs -text | ||
*.dae filter=lfs diff=lfs merge=lfs -text | ||
*.mb filter=lfs diff=lfs merge=lfs -text | ||
*.ma filter=lfs diff=lfs merge=lfs -text | ||
*.3ds filter=lfs diff=lfs merge=lfs -text | ||
*.dfx filter=lfs diff=lfs merge=lfs -text | ||
*.c4d filter=lfs diff=lfs merge=lfs -text | ||
*.lwo filter=lfs diff=lfs merge=lfs -text | ||
*.lwo2 filter=lfs diff=lfs merge=lfs -text | ||
*.abc filter=lfs diff=lfs merge=lfs -text | ||
*.3dm filter=lfs diff=lfs merge=lfs -text | ||
*.bgeo filter=lfs diff=lfs merge=lfs -text | ||
*.bgeo.sc filter=lfs diff=lfs merge=lfs -text | ||
*.bgeosc filter=lfs diff=lfs merge=lfs -text | ||
*.gltf filter=lfs diff=lfs merge=lfs -text | ||
*.glb filter=lfs diff=lfs merge=lfs -text | ||
# Build | ||
*.dll filter=lfs diff=lfs merge=lfs -text | ||
*.pdb filter=lfs diff=lfs merge=lfs -text | ||
*.mdb filter=lfs diff=lfs merge=lfs -text | ||
# Packaging | ||
*.zip filter=lfs diff=lfs merge=lfs -text | ||
*.7z filter=lfs diff=lfs merge=lfs -text | ||
*.gz filter=lfs diff=lfs merge=lfs -text | ||
*.rar filter=lfs diff=lfs merge=lfs -text | ||
*.tar filter=lfs diff=lfs merge=lfs -text | ||
*.bytes filter=lfs diff=lfs merge=lfs -text | ||
*.so filter=lfs diff=lfs merge=lfs -text | ||
Assets/Plugins/Grpc.Core/runtimes/ios/libgrpc.a filter=lfs diff=lfs merge=lfs -text | ||
*.a filter=lfs diff=lfs merge=lfs -text |
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,75 @@ | ||
# =========================== | ||
# Default Collab Ignore Rules | ||
# =========================== | ||
|
||
# OS Generated | ||
# ============ | ||
._* | ||
.DS_Store | ||
.Spotlight-V100 | ||
.Trashes | ||
[Dd]esktop.ini | ||
ehthumbs.db | ||
Icon? | ||
[Tt]humbs.db | ||
|
||
|
||
# Visual Studio / MonoDevelop generated | ||
# ===================================== | ||
.vs/ | ||
*.booproj | ||
*.csproj | ||
*.pdb | ||
*.pidb | ||
*.sln | ||
*.suo | ||
*.unityproj | ||
*.user | ||
*.userprefs | ||
[Ee]xported[Oo]bj/ | ||
|
||
|
||
# Other IDE / Misc | ||
================== | ||
.consulo/ | ||
*.tmp | ||
*.mdb | ||
*.opendb | ||
*.svd | ||
*.tmp | ||
*.VC.db | ||
|
||
|
||
# Unity generated | ||
# =============== | ||
.*/ | ||
*.stackdump | ||
[Bb]uild/ | ||
[Bb]uilds/ | ||
[Ll]ibrary/ | ||
[Ll]ogs/ | ||
[Oo]bj/ | ||
sysinfo.txt | ||
[Tt]emp/ | ||
[Cc]apturedFrames/ | ||
[Uu]serSettings/ | ||
|
||
# Build related | ||
# ============= | ||
.gradle/ | ||
*.apk | ||
*.unitypackage | ||
crashlytics-build.properties | ||
|
||
|
||
.collab/ | ||
|
||
*.zip | ||
|
||
# Other | ||
# ===== | ||
/[Cc]onfiguration/ | ||
[Uu]ntracked/ | ||
HoudiniEngineUnity | ||
heu_session | ||
heu_settings |
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,6 @@ | ||
{ | ||
"version": "1.0", | ||
"components": [ | ||
"Microsoft.VisualStudio.Workload.ManagedGame" | ||
] | ||
} |
34 changes: 34 additions & 0 deletions
34
API/examples/01-SpawnAgent-LoadScene-Reset-Run-GetSpawn.py
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,34 @@ | ||
import grpc | ||
|
||
from zlrsimapi import api_pb2 | ||
from zlrsimapi import api_pb2_grpc | ||
|
||
channel = grpc.insecure_channel('localhost:3258') | ||
stub = api_pb2_grpc.APIStub(channel) | ||
|
||
# Reset the scene without reloading if certain scene is already loaded, just clear the spawned objects. | ||
if stub.GetCurrentScene(api_pb2.GetCurrentSceneRequest()).scene == 'MainScene': | ||
stub.Reset(api_pb2.ResetRequest()) | ||
print("Reset scene") | ||
else: | ||
stub.LoadScene(api_pb2.LoadSceneRequest(scene = 'MainScene')) | ||
print("Scene loading...") | ||
|
||
getSpawnResponse = stub.GetSpawn(api_pb2.GetSpawnRequest()) | ||
|
||
# Get all available spawn spots | ||
# print('List of spawn points:') | ||
# for spawn in getSpawnResponse.spawns: | ||
# print(spawn) | ||
|
||
# Spawn an agent. After the reset command, you must respawn agent again. | ||
# If an agent will be spawned on the landing platform | ||
# Send LandingPlatformControl (check example 09-LandingPlatformControl) command to open the gates (gates closed by default) | ||
AgentUid = stub.SpawnAgent(api_pb2.SpawnAgentRequest(state = api_pb2.State( | ||
transform = getSpawnResponse.spawns[4], | ||
velocity = api_pb2.Vector3(x = 0, y = 0, z = 0), | ||
angularVelocity = api_pb2.Vector3(x = 0, y = 0, z = 0)), | ||
type = 1, | ||
name = 'Quadcopter-M690')).uid | ||
|
||
stub.Run(api_pb2.RunRequest(timeLimit = 0)) # timeLimit = 0 - set Simulator to work, 1 - set Simulator on pause |
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,47 @@ | ||
import grpc | ||
|
||
from zlrsimapi import api_pb2 | ||
from zlrsimapi import api_pb2_grpc | ||
|
||
channel = grpc.insecure_channel('localhost:3258') | ||
stub = api_pb2_grpc.APIStub(channel) | ||
|
||
if stub.GetCurrentScene(api_pb2.GetCurrentSceneRequest()).scene == 'MainScene': | ||
stub.Reset(api_pb2.ResetRequest()) | ||
print("Reset scene") | ||
else: | ||
stub.LoadScene(api_pb2.LoadSceneRequest(scene = 'MainScene')) | ||
print("Scene loading...") | ||
|
||
getSpawnResponse = stub.GetSpawn(api_pb2.GetSpawnRequest()) | ||
|
||
AgentUid = stub.SpawnAgent(api_pb2.SpawnAgentRequest(state = api_pb2.State( | ||
transform = getSpawnResponse.spawns[4], | ||
velocity = api_pb2.Vector3(x = 0, y = 0, z = 0), | ||
angularVelocity = api_pb2.Vector3(x = 0, y = 0, z = 0)), | ||
type = 1, | ||
name = 'Vtol-T300')).uid | ||
|
||
# Spawn obstacle by Name | ||
SpawnObstacleRequest = api_pb2.SpawnObstacleRequest(transform = api_pb2.Transform( | ||
position = api_pb2.Vector3(x = -486.46, y = 548.4, z = -5.55), | ||
rotation = api_pb2.Vector3(x = 0, y = 0, z = 0)), | ||
type = 2, # 2 - obstacles | ||
name='M300') # Helicopter | ||
|
||
SpawnObstacleResponse = stub.SpawnObstacle(SpawnObstacleRequest) | ||
|
||
print('SpawnObstacleResponse : ', SpawnObstacleResponse.uid) | ||
|
||
SpawnObstacleRequestCar = api_pb2.SpawnObstacleRequest(transform = api_pb2.Transform( | ||
position = api_pb2.Vector3(x = -480.71, y = 535.62, z = -7.207), | ||
rotation = api_pb2.Vector3(x = 0, y = 0, z = 0)), | ||
type = 2, # 2 - obstacles | ||
name='MiniCountryman') | ||
|
||
SpawnObstacleResponseCar = stub.SpawnObstacle(SpawnObstacleRequestCar) | ||
|
||
print('SpawnObstacleResponseCar : ', SpawnObstacleResponseCar.uid) | ||
|
||
|
||
stub.Run(api_pb2.RunRequest(timeLimit = 0)) # timeLimit = 0 - set Simulator to work, 1 - set Simulator on pause |
33 changes: 33 additions & 0 deletions
33
API/examples/03-AgentOnCollision-SubscribeOnCollisionEvent.py
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,33 @@ | ||
import grpc | ||
|
||
from zlrsimapi import api_pb2 | ||
from zlrsimapi import api_pb2_grpc | ||
|
||
channel = grpc.insecure_channel('localhost:3258') | ||
stub = api_pb2_grpc.APIStub(channel) | ||
|
||
if stub.GetCurrentScene(api_pb2.GetCurrentSceneRequest()).scene == 'MainScene': | ||
stub.Reset(api_pb2.ResetRequest()) | ||
print("Reset scene") | ||
else: | ||
stub.LoadScene(api_pb2.LoadSceneRequest(scene = 'MainScene')) | ||
print("Scene loading...") | ||
|
||
getSpawnResponse = stub.GetSpawn(api_pb2.GetSpawnRequest()) | ||
|
||
AgentUid = stub.SpawnAgent(api_pb2.SpawnAgentRequest(state = api_pb2.State( | ||
transform = getSpawnResponse.spawns[4], | ||
velocity = api_pb2.Vector3(x = 0, y = 0, z = 0), | ||
angularVelocity = api_pb2.Vector3(x = 0, y = 0, z = 0)), | ||
type = 1, | ||
name = 'Quadcopter-M690')).uid | ||
|
||
# Subscribe on collision event | ||
print('Subscribed on collision') | ||
stub.AgentOnCollision(api_pb2.AgentOnCollisionRequest(uid = AgentUid)) | ||
|
||
stub.Run(api_pb2.RunRequest(timeLimit = 0)) | ||
iterator = stub.SubscribeOnCollisionEvent(api_pb2.CollisionEventRequest()) | ||
while True: | ||
print(next(iterator)) | ||
|
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,33 @@ | ||
import grpc | ||
|
||
from zlrsimapi import api_pb2 | ||
from zlrsimapi import api_pb2_grpc | ||
|
||
channel = grpc.insecure_channel('localhost:3258') | ||
stub = api_pb2_grpc.APIStub(channel) | ||
|
||
if stub.GetCurrentScene(api_pb2.GetCurrentSceneRequest()).scene == 'MainScene': | ||
stub.Reset(api_pb2.ResetRequest()) | ||
print("Reset scene") | ||
else: | ||
stub.LoadScene(api_pb2.LoadSceneRequest(scene = 'MainScene')) | ||
print("Scene loading...") | ||
|
||
getSpawnResponse = stub.GetSpawn(api_pb2.GetSpawnRequest()) | ||
|
||
AgentUid = stub.SpawnAgent(api_pb2.SpawnAgentRequest(state = api_pb2.State( | ||
transform = getSpawnResponse.spawns[4], | ||
velocity = api_pb2.Vector3(x = 0, y = 0, z = 0), | ||
angularVelocity = api_pb2.Vector3(x = 0, y = 0, z = 0)), | ||
type = 1, | ||
name = 'Quadcopter-M690')).uid | ||
|
||
# Subscribe on min distance event | ||
print('Subscribed on min distance') | ||
stub.AgentOnMinDistance(api_pb2.AgentOnMinDistanceRequest(uid = AgentUid)) | ||
|
||
stub.Run(api_pb2.RunRequest(timeLimit = 0)) | ||
iterator = stub.SubscribeOnMinDistanceEvent(api_pb2.OnMinDistanceEventRequest()) | ||
while True: | ||
print(next(iterator)) | ||
|
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,31 @@ | ||
import grpc | ||
|
||
from zlrsimapi import api_pb2 | ||
from zlrsimapi import api_pb2_grpc | ||
|
||
channel = grpc.insecure_channel('localhost:3258') | ||
stub = api_pb2_grpc.APIStub(channel) | ||
|
||
if stub.GetCurrentScene(api_pb2.GetCurrentSceneRequest()).scene == 'MainScene': | ||
stub.Reset(api_pb2.ResetRequest()) | ||
print("Reset scene") | ||
else: | ||
stub.LoadScene(api_pb2.LoadSceneRequest(scene = 'MainScene')) | ||
print("Scene loading...") | ||
|
||
getSpawnResponse = stub.GetSpawn(api_pb2.GetSpawnRequest()) | ||
|
||
AgentUid = stub.SpawnAgent(api_pb2.SpawnAgentRequest(state = api_pb2.State( | ||
transform = getSpawnResponse.spawns[4], | ||
velocity = api_pb2.Vector3(x = 0, y = 0, z = 0), | ||
angularVelocity = api_pb2.Vector3(x = 0, y = 0, z = 0)), | ||
type = 1, | ||
name = 'Quadcopter-M690')).uid | ||
|
||
|
||
# AgentGetBBoxRequest | ||
AgentGetBBoxRequest = api_pb2.AgentGetBBoxRequest(uid = AgentUid) | ||
AgentGetBBoxResponse = stub.AgentGetBBox(AgentGetBBoxRequest) | ||
|
||
print('AgentGetBBoxResponse : ', AgentGetBBoxResponse) | ||
|
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,34 @@ | ||
import grpc | ||
from time import sleep | ||
|
||
from zlrsimapi import api_pb2 | ||
from zlrsimapi import api_pb2_grpc | ||
|
||
channel = grpc.insecure_channel('localhost:3258') | ||
stub = api_pb2_grpc.APIStub(channel) | ||
|
||
if stub.GetCurrentScene(api_pb2.GetCurrentSceneRequest()).scene == 'MainScene': | ||
stub.Reset(api_pb2.ResetRequest()) | ||
print("Reset scene") | ||
else: | ||
stub.LoadScene(api_pb2.LoadSceneRequest(scene='MainScene')) | ||
print("Scene loading...") | ||
|
||
getSpawnResponse = stub.GetSpawn(api_pb2.GetSpawnRequest()) | ||
|
||
AgentUid = stub.SpawnAgent(api_pb2.SpawnAgentRequest(state = api_pb2.State( | ||
transform = getSpawnResponse.spawns[4], | ||
velocity = api_pb2.Vector3(x = 0, y = 0, z = 0), | ||
angularVelocity = api_pb2.Vector3(x = 0, y = 0, z = 0)), | ||
type = 1, | ||
name = 'Octocopter-Amazon')).uid | ||
|
||
stub.Run(api_pb2.RunRequest(timeLimit = 0)) # timeLimit = 0 - set Simulator to work, 1 - set Simulator on pause | ||
|
||
sleep(10) # Only for the example. Do not use in the real job. | ||
|
||
# Remove agent by uid | ||
RemoveAgentRequest = api_pb2.RemoveAgentRequest(uid = AgentUid) | ||
RemoveAgentResponse = stub.RemoveAgent(RemoveAgentRequest) | ||
|
||
|
Oops, something went wrong.