Skip to content

Commit

Permalink
Added ground truth topics
Browse files Browse the repository at this point in the history
  • Loading branch information
noahzemlin committed Nov 15, 2020
1 parent c9e317e commit 551f22c
Show file tree
Hide file tree
Showing 7 changed files with 391 additions and 21 deletions.
7 changes: 7 additions & 0 deletions Unity/Assets/RosSharpModules/GPSPublisher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class GPSPublisher : UnityPublisher<Gps>
private float previousScanTime = 5;
private float updatePeriod = 0.1f;

public bool noNoiseOverride = false;

protected override void Start()
{
base.Start();
Expand All @@ -30,6 +32,11 @@ protected override void Start()
lonNoiseStdDev *= 0.5f;
break;
}

if (noNoiseOverride) {
latNoiseStdDev = 0;
lonNoiseStdDev = 0;
}
}

private void FixedUpdate()
Expand Down
6 changes: 6 additions & 0 deletions Unity/Assets/RosSharpModules/VelocityPublisher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public class VelocityPublisher : UnityPublisher<Float32>
private float updatePeriod = 0.05f;
private AckermannController c;

public bool noNoiseOverride = false;

protected override void Start()
{
base.Start();
Expand All @@ -27,6 +29,10 @@ protected override void Start()
velocityNoiseStdDev *= 0.5f;
break;
}

if (noNoiseOverride) {
velocityNoiseStdDev = 0;
}
}

private void FixedUpdate()
Expand Down
37 changes: 37 additions & 0 deletions Unity/Assets/Scenes/MainScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand Down Expand Up @@ -671,7 +672,9 @@ GameObject:
- component: {fileID: 829615087}
- component: {fileID: 829615089}
- component: {fileID: 829615090}
- component: {fileID: 829615099}
- component: {fileID: 829615096}
- component: {fileID: 829615097}
- component: {fileID: 829615095}
- component: {fileID: 829615092}
- component: {fileID: 829615091}
Expand Down Expand Up @@ -782,6 +785,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
Topic: /sim/gps
noNoiseOverride: 0
--- !u!114 &829615091
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -950,6 +954,21 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
Topic: /sim/velocity
noNoiseOverride: 0
--- !u!114 &829615097
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 829615084}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c5970dc0eb3926240b605e471f7eeced, type: 3}
m_Name:
m_EditorClassIdentifier:
Topic: /truth/velocity
noNoiseOverride: 1
--- !u!114 &829615098
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -962,6 +981,20 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b9e9655389f72214098993bf1e7e3a04, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &829615099
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 829615084}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b44e1486d7dbdce40958f480202bf058, type: 3}
m_Name:
m_EditorClassIdentifier:
Topic: /truth/gps
noNoiseOverride: 1
--- !u!1 &874833490
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1014,6 +1047,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand Down Expand Up @@ -1681,6 +1715,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.18867922, g: 0.18867922, b: 0.18867922, a: 0.78431374}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand Down Expand Up @@ -1810,6 +1845,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand Down Expand Up @@ -2272,6 +2308,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand Down
4 changes: 2 additions & 2 deletions Unity/Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"dependencies": {
"com.unity.collab-proxy": "1.2.16",
"com.unity.ide.rider": "1.1.4",
"com.unity.ide.vscode": "1.1.4",
"com.unity.ide.vscode": "1.2.1",
"com.unity.probuilder": "4.2.3",
"com.unity.test-framework": "1.1.13",
"com.unity.test-framework": "1.1.16",
"com.unity.textmeshpro": "2.0.1",
"com.unity.timeline": "1.2.13",
"com.unity.ugui": "1.0.0",
Expand Down
Loading

0 comments on commit 551f22c

Please sign in to comment.