Skip to content

Commit

Permalink
fix: dummy message type (#158)
Browse files Browse the repository at this point in the history
Signed-off-by: Alptuğ Cırıt <[email protected]>
  • Loading branch information
mozhoku authored Sep 26, 2024
1 parent 7357010 commit ddace19
Show file tree
Hide file tree
Showing 59 changed files with 909 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25019,6 +25019,7 @@ GameObject:
m_Component:
- component: {fileID: 7194879542207918461}
- component: {fileID: 7194879540961746275}
- component: {fileID: 1865386616294816128}
m_Layer: 0
m_Name: Nishishinjuku RandomTraffic
m_TagString: Untagged
Expand Down Expand Up @@ -25068,6 +25069,35 @@ MonoBehaviour:
m_EditorClassIdentifier:
mgrsOffsetPosition: {x: 81655.73, y: 50137.434, z: 42.49998}
mgrsGridZone: 54SUE
--- !u!114 &1865386616294816128
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7194879542207918458}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 134fb5ad0cefe76c8895739ca367180b, type: 3}
m_Name:
m_EditorClassIdentifier:
dummyPerceptionTopic: /simulation/dummy_perception_publisher/object_info
qosSettings:
ReliabilityPolicy: 0
DurabilityPolicy: 0
HistoryPolicy: 0
Depth: 0
npcPedestrianPrefab: {fileID: 500668027104458449, guid: 27e8a3736efefa447b1f65b33b30908a, type: 3}
npcCarPrefabs:
- {fileID: 6604874415271597525, guid: 7e772e9ad7eb79040be629d8d04542ab, type: 3}
- {fileID: 3333523281254186578, guid: 589cf2e451adab34eb1332da5701195a, type: 3}
- {fileID: 714549001370495616, guid: d0094c5a0e9fb6148873c658dbc61a89, type: 3}
- {fileID: 536101250511469494, guid: 433e715a84edbae418fe585f802f3918, type: 3}
npcBusPrefabs:
- {fileID: 6850358619771218631, guid: 9bc315af95865dd4bbf4a8f716791609, type: 3}
npcPedestrianParent: {fileID: 1041813114}
npcVehicleParent: {fileID: 9027057600357292003}
despawnTime: 30
--- !u!1 &7285300991010974236
GameObject:
m_ObjectHideFlags: 0
Expand Down
44 changes: 2 additions & 42 deletions Assets/AWSIM/Scenes/Main/AutowareSimulation.unity
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,6 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 58d73df60b244d146bdf5f5896f78355, type: 3}
--- !u!4 &10387859 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 9027057600357292003, guid: 58d73df60b244d146bdf5f5896f78355, type: 3}
m_PrefabInstance: {fileID: 10387858}
m_PrefabAsset: {fileID: 0}
--- !u!1 &12639409
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1502,7 +1497,6 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 203643521}
- component: {fileID: 203643522}
m_Layer: 0
m_Name: Environment
m_TagString: Untagged
Expand All @@ -1529,35 +1523,6 @@ Transform:
- {fileID: 113080103}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &203643522
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 203643520}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 134fb5ad0cefe76c8895739ca367180b, type: 3}
m_Name:
m_EditorClassIdentifier:
dummyPerceptionTopic: /simulation/dummy_perception_publisher/object_info
qosSettings:
ReliabilityPolicy: 0
DurabilityPolicy: 0
HistoryPolicy: 0
Depth: 0
npcPedestrianPrefab: {fileID: 500668027104458449, guid: 27e8a3736efefa447b1f65b33b30908a, type: 3}
npcCarPrefabs:
- {fileID: 6604874415271597525, guid: 7e772e9ad7eb79040be629d8d04542ab, type: 3}
- {fileID: 3333523281254186578, guid: 589cf2e451adab34eb1332da5701195a, type: 3}
- {fileID: 714549001370495616, guid: d0094c5a0e9fb6148873c658dbc61a89, type: 3}
- {fileID: 536101250511469494, guid: 433e715a84edbae418fe585f802f3918, type: 3}
npcBusPrefabs:
- {fileID: 6850358619771218631, guid: 9bc315af95865dd4bbf4a8f716791609, type: 3}
npcPedestrianParent: {fileID: 1822423795}
npcVehicleParent: {fileID: 10387859}
despawnTime: 30
--- !u!1 &221280047
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1656,8 +1621,8 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1743169424}
m_HandleRect: {fileID: 1743169422}
m_Direction: 2
m_Value: 1
m_Size: 1
m_Value: 1.0000002
m_Size: 0.666092
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
Expand Down Expand Up @@ -7911,11 +7876,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1814292294}
m_CullTransparentMesh: 1
--- !u!4 &1822423795 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1041813114, guid: 58d73df60b244d146bdf5f5896f78355, type: 3}
m_PrefabInstance: {fileID: 10387858}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1826199770
GameObject:
m_ObjectHideFlags: 0
Expand Down
8 changes: 4 additions & 4 deletions Assets/AWSIM/Scripts/NPCs/RvizNPCSpawner/RVIZNPCSpawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ public class RVIZNPCSpawner : MonoBehaviour
private float _raycastStart = 1.33f;

// Subscriber
ISubscription<dummy_perception_publisher.msg.Object> dummyPerceptionSubscriber;
ISubscription<tier4_simulation_msgs.msg.DummyObject> dummyPerceptionSubscriber;

void Start()
{
// Initialize the ROS2 node and create the subscription
dummyPerceptionSubscriber
= SimulatorROS2Node.CreateSubscription<dummy_perception_publisher.msg.Object>(
= SimulatorROS2Node.CreateSubscription<tier4_simulation_msgs.msg.DummyObject>(
dummyPerceptionTopic, OnObjectInfoReceived, qosSettings.GetQoSProfile());
}

Expand Down Expand Up @@ -100,7 +100,7 @@ private void FixedUpdate()
/// Callback method to handle incoming ROS messages
/// </summary>
/// <param name="msg">Received Object message</param>
void OnObjectInfoReceived(dummy_perception_publisher.msg.Object msg)
void OnObjectInfoReceived(tier4_simulation_msgs.msg.DummyObject msg)
{
_npcLabel = msg.Classification.Label; // Label: 0 = delete All Npcs, 7 = Spawn pedestrians, 3 = spawn vehicle
_interactiveAction = msg.Action; // Action: 0 = uninteractive mode, 1 = interactive mode, 2 = delete interactive NPCs
Expand Down Expand Up @@ -321,7 +321,7 @@ private void DespawnInteractiveNPCs()
/// </summary>
void OnDestroy()
{
SimulatorROS2Node.RemoveSubscription<dummy_perception_publisher.msg.Object>(dummyPerceptionSubscriber);
SimulatorROS2Node.RemoveSubscription<tier4_simulation_msgs.msg.DummyObject>(dummyPerceptionSubscriber);
}
}
}
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Loading

0 comments on commit ddace19

Please sign in to comment.