Skip to content

Commit 8d6a96e

Browse files
committed
Updated IGVC drivetrain and LIDAR configuration. Added reset RosBridge button. Embiggened drums.
1 parent 9fc0e68 commit 8d6a96e

File tree

6 files changed

+323
-36
lines changed

6 files changed

+323
-36
lines changed

Assets/Prefabs/Drum.prefab

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Transform:
2727
m_PrefabAsset: {fileID: 0}
2828
m_GameObject: {fileID: 6736396618544631729}
2929
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
30-
m_LocalPosition: {x: 0, y: 30, z: 0}
31-
m_LocalScale: {x: 44, y: 30, z: 44}
30+
m_LocalPosition: {x: 0, y: 40, z: 0}
31+
m_LocalScale: {x: 44, y: 40, z: 44}
3232
m_Children: []
3333
m_Father: {fileID: 6226772515755348062}
3434
m_RootOrder: 0
@@ -139,6 +139,6 @@ CapsuleCollider:
139139
m_IsTrigger: 0
140140
m_Enabled: 1
141141
m_Radius: 22.4
142-
m_Height: 109.9
142+
m_Height: 125
143143
m_Direction: 1
144144
m_Center: {x: 0, y: 30, z: 0}

Assets/Robots/IGVC_Robot_2021.prefab

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ Transform:
2424
m_PrefabAsset: {fileID: 0}
2525
m_GameObject: {fileID: 2283990103325503251}
2626
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
27-
m_LocalPosition: {x: 0, y: 0, z: 0}
27+
m_LocalPosition: {x: 0, y: 0, z: 0.298}
2828
m_LocalScale: {x: 1, y: 1, z: 1}
2929
m_Children:
3030
- {fileID: 9021790290558916599}
3131
m_Father: {fileID: 6116572216260438476}
32-
m_RootOrder: 7
32+
m_RootOrder: 5
3333
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
3434
--- !u!1 &6116572215990976585
3535
GameObject:
@@ -57,12 +57,12 @@ Transform:
5757
m_PrefabAsset: {fileID: 0}
5858
m_GameObject: {fileID: 6116572215990976585}
5959
m_LocalRotation: {x: 0.2815042, y: 0, z: 0, w: 0.95956004}
60-
m_LocalPosition: {x: 0, y: 1.16, z: -0.85}
60+
m_LocalPosition: {x: 0, y: 1.16, z: -0.552}
6161
m_LocalScale: {x: 0.10562, y: 0.048891686, z: 0.08247501}
6262
m_Children:
6363
- {fileID: 6116572218028855840}
6464
m_Father: {fileID: 6116572216260438476}
65-
m_RootOrder: 5
65+
m_RootOrder: 3
6666
m_LocalEulerAnglesHint: {x: 32.7, y: 0, z: 0}
6767
--- !u!33 &6116572215990976596
6868
MeshFilter:
@@ -140,11 +140,11 @@ Transform:
140140
m_PrefabAsset: {fileID: 0}
141141
m_GameObject: {fileID: 6116572216019989485}
142142
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
143-
m_LocalPosition: {x: 0, y: -0.327, z: -0.751}
143+
m_LocalPosition: {x: 0, y: -0.327, z: -0.45299998}
144144
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
145145
m_Children: []
146146
m_Father: {fileID: 6116572216260438476}
147-
m_RootOrder: 6
147+
m_RootOrder: 4
148148
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
149149
--- !u!33 &6116572216019989480
150150
MeshFilter:
@@ -249,8 +249,6 @@ Transform:
249249
m_Children:
250250
- {fileID: 6116572216309536752}
251251
- {fileID: 6116572216334250670}
252-
- {fileID: 6116572216873300087}
253-
- {fileID: 6116572216841258427}
254252
- {fileID: 6116572216897894780}
255253
- {fileID: 6116572215990976586}
256254
- {fileID: 6116572216019989481}
@@ -288,8 +286,8 @@ MonoBehaviour:
288286
m_EditorClassIdentifier:
289287
speedMod: 2.2727273
290288
turnMod: 1
291-
wheelRadius: 0.1016
292-
axleLength: 0.6604
289+
wheelRadius: 0.127
290+
axleLength: 0.76
293291
minSpeed: 0.1
294292
drag: 0.85
295293
vl: 0
@@ -480,13 +478,13 @@ Transform:
480478
m_PrefabInstance: {fileID: 0}
481479
m_PrefabAsset: {fileID: 0}
482480
m_GameObject: {fileID: 6116572216309536757}
483-
m_LocalRotation: {x: 0.1666775, y: -0.10017266, z: 0.018704036, w: 0.9807315}
484-
m_LocalPosition: {x: 0.5, y: 0.59, z: -1.024}
481+
m_LocalRotation: {x: 0.15831324, y: -0.074113674, z: 0.011917522, w: 0.98453146}
482+
m_LocalPosition: {x: 0.626, y: 0.865, z: -1.042}
485483
m_LocalScale: {x: 1, y: 1, z: 1}
486484
m_Children: []
487485
m_Father: {fileID: 6116572216260438476}
488486
m_RootOrder: 0
489-
m_LocalEulerAnglesHint: {x: 19.31, y: -11.63, z: 0.2}
487+
m_LocalEulerAnglesHint: {x: 18.27, y: -8.61, z: 0}
490488
--- !u!20 &6116572216309536759
491489
Camera:
492490
m_ObjectHideFlags: 0
@@ -575,11 +573,13 @@ Transform:
575573
m_PrefabAsset: {fileID: 0}
576574
m_GameObject: {fileID: 6116572216334250669}
577575
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
578-
m_LocalPosition: {x: 0, y: 0.129, z: -0.3680001}
576+
m_LocalPosition: {x: 0, y: 0.146, z: 0}
579577
m_LocalScale: {x: 1, y: 1, z: 1}
580578
m_Children:
581579
- {fileID: 6116572217397061391}
582580
- {fileID: 6116572217700496738}
581+
- {fileID: 6116572216873300087}
582+
- {fileID: 6116572216841258427}
583583
m_Father: {fileID: 6116572216260438476}
584584
m_RootOrder: 1
585585
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -609,10 +609,10 @@ Transform:
609609
m_PrefabAsset: {fileID: 0}
610610
m_GameObject: {fileID: 6116572216841258426}
611611
m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068}
612-
m_LocalPosition: {x: 0.4, y: -0.12899996, z: -0.022400111}
613-
m_LocalScale: {x: 0.2032, y: 0.020000022, z: 0.2032}
612+
m_LocalPosition: {x: 0.4, y: -0.25799996, z: 0}
613+
m_LocalScale: {x: 0.25, y: 0.02000002, z: 0.25}
614614
m_Children: []
615-
m_Father: {fileID: 6116572216260438476}
615+
m_Father: {fileID: 6116572216334250670}
616616
m_RootOrder: 3
617617
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
618618
--- !u!33 &6116572216841258438
@@ -690,10 +690,10 @@ Transform:
690690
m_PrefabAsset: {fileID: 0}
691691
m_GameObject: {fileID: 6116572216873300086}
692692
m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068}
693-
m_LocalPosition: {x: -0.4, y: -0.129, z: -0.022400111}
694-
m_LocalScale: {x: 0.2032, y: 0.020000007, z: 0.2032}
693+
m_LocalPosition: {x: -0.4, y: -0.258, z: 0}
694+
m_LocalScale: {x: 0.25, y: 0.020000005, z: 0.25}
695695
m_Children: []
696-
m_Father: {fileID: 6116572216260438476}
696+
m_Father: {fileID: 6116572216334250670}
697697
m_RootOrder: 2
698698
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
699699
--- !u!33 &6116572216873300082
@@ -770,12 +770,12 @@ Transform:
770770
m_PrefabAsset: {fileID: 0}
771771
m_GameObject: {fileID: 6116572216897894771}
772772
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
773-
m_LocalPosition: {x: 0, y: 0.077, z: 0.0039999187}
773+
m_LocalPosition: {x: 0, y: 0.458, z: 0}
774774
m_LocalScale: {x: 1, y: 1, z: 1}
775775
m_Children:
776776
- {fileID: 6116572217639720015}
777777
m_Father: {fileID: 6116572216260438476}
778-
m_RootOrder: 4
778+
m_RootOrder: 2
779779
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
780780
--- !u!114 &6116572216897894781
781781
MonoBehaviour:
@@ -825,7 +825,7 @@ Transform:
825825
m_PrefabAsset: {fileID: 0}
826826
m_GameObject: {fileID: 6116572217397061390}
827827
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
828-
m_LocalPosition: {x: -0.4, y: -0.258, z: 0.3436}
828+
m_LocalPosition: {x: -0.4, y: -0.258, z: 0}
829829
m_LocalScale: {x: 1, y: 1, z: 1}
830830
m_Children: []
831831
m_Father: {fileID: 6116572216334250670}
@@ -839,7 +839,7 @@ WheelCollider:
839839
m_PrefabAsset: {fileID: 0}
840840
m_GameObject: {fileID: 6116572217397061390}
841841
m_Center: {x: 0, y: 0, z: 0}
842-
m_Radius: 0.1016
842+
m_Radius: 0.127
843843
m_SuspensionSpring:
844844
spring: 90000
845845
damper: 9000
@@ -967,7 +967,7 @@ Transform:
967967
m_PrefabAsset: {fileID: 0}
968968
m_GameObject: {fileID: 6116572217700496737}
969969
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
970-
m_LocalPosition: {x: 0.4, y: -0.25799996, z: 0.3436}
970+
m_LocalPosition: {x: 0.4, y: -0.25799996, z: 0}
971971
m_LocalScale: {x: 1, y: 1, z: 1}
972972
m_Children: []
973973
m_Father: {fileID: 6116572216334250670}
@@ -981,7 +981,7 @@ WheelCollider:
981981
m_PrefabAsset: {fileID: 0}
982982
m_GameObject: {fileID: 6116572217700496737}
983983
m_Center: {x: 0, y: 0, z: 0}
984-
m_Radius: 0.1016
984+
m_Radius: 0.127
985985
m_SuspensionSpring:
986986
spring: 90000
987987
damper: 9000

Assets/RosSharp/Scripts/RosBridgeClient/RosCommuncation/RosConnector.cs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,25 @@ private void OnApplicationQuit()
8282
}
8383
}
8484

85+
public void Reset() {
86+
Debug.Log("Resetting RosBridge!");
87+
88+
if (RosSocket != null) {
89+
RosSocket.Close();
90+
}
91+
92+
// Necessary as this is also our flag to stop running threads
93+
RosSocket = null;
94+
95+
if (SocketThread != null) {
96+
SocketThread.Join();
97+
}
98+
99+
IsConnected = new ManualResetEvent(false);
100+
SocketThread = new Thread(ConnectAndWait);
101+
SocketThread.Start();
102+
}
103+
85104
private void OnConnected(object sender, EventArgs e)
86105
{
87106
IsConnected.Set();
@@ -95,7 +114,7 @@ private void OnClosed(object sender, EventArgs e)
95114

96115
RosSocket.Close();
97116
RosSocket = null;
98-
SocketThread.Join((int)(SecondsTimeout * 1000));
117+
SocketThread.Join();
99118

100119
SocketThread = new Thread(ConnectAndWait);
101120
SocketThread.Start();

0 commit comments

Comments
 (0)