Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding breadcrumbs to models #398

Merged
merged 8 commits into from
May 5, 2020
Merged

Conversation

nkoenig
Copy link
Contributor

@nkoenig nkoenig commented Apr 16, 2020

Models Added

  1. X1_SENSOR_CONFIG_7 (420 credits) - X1C4 with 12 breadcrumbs
  2. X2_SENSOR_CONFIG_8 (275 credits) - X2C6 with 6 breadcrumbs
  3. COSTAR_HUSKY_SENSOR_CONFIG_2 (385 credits) - COSTAR Husky Config 1 with 12 breadcrumbs
  4. EXPLORER_X1_SENSOR_CONFIG_2 (440 credits) - EXPLORER X1 with 12 breadcrumbs
  5. X1_SENSOR_CONFIG_8 (370 credits) - X1C3 with 12 breadcrumbs
  6. X2_SENSOR_CONFIG_9 (205 credits) - X2C4 with 6 breadcrumbs

To test:

ign launch -v 4 cave_circuit.ign worldName:=simple_cave_01 robotName1:=X1 robotConfig1:=X1_SENSOR_CONFIG_7

To drop a breadcrumb

ign topic -t "/model/X1/breadcrumb/deploy" -m ignition.msgs.Empty -p "unused: true"

@nkoenig nkoenig changed the title Adding breadcrumbs to x1 config 7 & 8 Adding breadcrumbs to models Apr 16, 2020
Copy link
Member

@azeey azeey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I think we should use a simple box shape as a collision for the breadcrumbs. After deploying a few, I got a message:

ODE Message 2: Trimesh-trimesh contach hash table bucket overflow - close contacts might not be culled in AddContactToNode() [collision_trimesh_trimesh_new.cpp:226]

Another issue is that we now have a <model>/breadcrumb/deploy topic for all robots regardless of whether they are capable of deploying breadcrumbs. Having sensor topics that don't have any data has caused confusion in the past.

@nkoenig
Copy link
Contributor Author

nkoenig commented Apr 22, 2020

Version 2 of the breadcrumb model uses a box collision shape: https://app.ignitionrobotics.org/openrobotics/fuel/models/Breadcrumb%20Node

@nkoenig
Copy link
Contributor Author

nkoenig commented Apr 23, 2020

This PR prevents the deployment topic from being created: gazebosim/gz-sim#88

@azeey
Copy link
Member

azeey commented Apr 23, 2020

I guess my concern was more on the ROS side because that's the API for competitors. IIUC, the ROS topic will still exist even if there is no corresponding topic in ign-transport.

@nkoenig
Copy link
Contributor Author

nkoenig commented Apr 23, 2020

I blocked the ROS topics here: 5f7697a

@azeey
Copy link
Member

azeey commented Apr 23, 2020

Looks great! I think we also need to to add the same logic in cloudsim_bridge.ign

@nkoenig
Copy link
Contributor Author

nkoenig commented Apr 23, 2020

Thanks, added: fe173a8

Copy link
Member

@azeey azeey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have made these changes directly, but it looks like I don't have write access

index cbb1ee4..f1e4cfc 100644
--- a/subt_ign/launch/competition.ign
+++ b/subt_ign/launch/competition.ign
@@ -968,12 +968,12 @@
     robotConfigN = config[-1]
     posX = -(robotSpawned / spawnColSize * spawnGridSize - spawnRowOffset)
     posY = -(robotSpawned % spawnColSize * spawnGridSize - spawnColOffset)
-    if robotType == "1" and (robotConfigN == "1" or robotConfigN == "2" or robotConfigN == "3" or robotConfigN == "4" or robotConfigN == "5")
+    if robotType == "1" and (robotConfigN == "1" or robotConfigN == "2" or robotConfigN == "3" or robotConfigN == "4" or robotConfigN == "5" or robotConfigN == "7" or robotConfigN == "8")
       robotSpawned += 1
 %>
 <%=   spawnX1(name, robotConfigN, posX, posY) %>
 <%
-    elsif robotType == "2" and (robotConfigN == "1" or robotConfigN == "2" or robotConfigN == "3" or robotConfigN == "4" or robotConfigN == "5" or robotConfigN == "6")
+    elsif robotType == "2" and (robotConfigN == "1" or robotConfigN == "2" or robotConfigN == "3" or robotConfigN == "4" or robotConfigN == "5" or robotConfigN == "6" or robotConfigN == "8" or robotConfigN == "9")
       robotSpawned += 1
 %>
 <%=   spawnX2(name, robotConfigN, posX, posY) %>
diff --git a/subt_ign/launch/tunnel_circuit_practice.ign b/subt_ign/launch/tunnel_circuit_practice.ign
index a4b0812..59ff908 100644
--- a/subt_ign/launch/tunnel_circuit_practice.ign
+++ b/subt_ign/launch/tunnel_circuit_practice.ign
@@ -959,12 +959,12 @@
     robotConfigN = config[-1]
     posX = -(robotSpawned / spawnColSize * spawnGridSize - spawnRowOffset)
     posY = -(robotSpawned % spawnColSize * spawnGridSize - spawnColOffset)
-    if robotType == "1" and (robotConfigN == "1" or robotConfigN == "2" or robotConfigN == "3" or robotConfigN == "4" or robotConfigN == "5")
+    if robotType == "1" and (robotConfigN == "1" or robotConfigN == "2" or robotConfigN == "3" or robotConfigN == "4" or robotConfigN == "5" or robotConfigN == "7" or robotConfigN == "8")
       robotSpawned += 1
 %>
 <%=   spawnX1(name, robotConfigN, posX, posY) %>
 <%
-    elsif robotType == "2" and (robotConfigN == "1" or robotConfigN == "2" or robotConfigN == "3" or robotConfigN == "4" or robotConfigN == "5" or robotConfigN == "6")
+    elsif robotType == "2" and (robotConfigN == "1" or robotConfigN == "2" or robotConfigN == "3" or robotConfigN == "4" or robotConfigN == "5" or robotConfigN == "6" or robotConfigN == "8" or robotConfigN == "9")
       robotSpawned += 1
 %>
 <%=   spawnX2(name, robotConfigN, posX, posY) %>
diff --git a/subt_ign/launch/urban_circuit.ign b/subt_ign/launch/urban_circuit.ign
index 1e69f82..eaaed5a 100644
--- a/subt_ign/launch/urban_circuit.ign
+++ b/subt_ign/launch/urban_circuit.ign
@@ -1023,12 +1023,12 @@
     posX = x + spawnWorldXPos
     posY = y + spawnWorldYPos
 
-    if robotType == "1" and (robotConfigN == "1" or robotConfigN == "2" or robotConfigN == "3" or robotConfigN == "4" or robotConfigN == "5")
+    if robotType == "1" and (robotConfigN == "1" or robotConfigN == "2" or robotConfigN == "3" or robotConfigN == "4" or robotConfigN == "5" or robotConfigN == "7" or robotConfigN == "8")
       robotSpawned += 1
 %>
 <%=   spawnX1(name, robotConfigN, posX, posY, spawnWorldZPos, spawnWorldYaw) %>
 <%
-    elsif robotType == "2" and (robotConfigN == "1" or robotConfigN == "2" or robotConfigN == "3" or robotConfigN == "4" or robotConfigN == "5" or robotConfigN == "6")
+    elsif robotType == "2" and (robotConfigN == "1" or robotConfigN == "2" or robotConfigN == "3" or robotConfigN == "4" or robotConfigN == "5" or robotConfigN == "6" or robotConfigN == "8" or robotConfigN == "9")
       robotSpawned += 1
 %>
 <%=   spawnX2(name, robotConfigN, posX, posY, spawnWorldZPos, spawnWorldYaw) %>

@nkoenig nkoenig changed the base branch from master to cave_feature_release1 April 28, 2020 18:13
@nkoenig
Copy link
Contributor Author

nkoenig commented Apr 28, 2020

Thanks, I've applied those changes.

@acschang acschang self-requested a review May 2, 2020 00:35
Copy link
Contributor

@acschang acschang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked out new models with breadcrumbs. The models work as advertised.

@nkoenig nkoenig merged commit 7e6f070 into cave_feature_release1 May 5, 2020
@nkoenig nkoenig deleted the breadcrumb_models branch December 10, 2020 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants