Adding collision data to gazebo world models
The lasers on my robot model are not detecting the kerbs of a virtual city environment, as shown below"
My only clue so far is the sidewalk model does not have collision data. So, in the world file, I added the collision part of the following code but it did not resolve my issue:
<model name="sidewalk_12">
<static>true</static>
<pose>0 0 0 0 0 0</pose>
<link name="link">
<visual name="visual">
<geometry>
<polyline>
<height>0.15</height>
<point>-11.3 -6.2</point>
<point>-11.275528258147578 -6.3545084971874735</point>
<point>-11.204508497187474 -6.493892626146237</point>
<point>-11.093892626146237 -6.604508497187474</point>
<point>-10.954508497187474 -6.675528258147577</point>
<point>-10.8 -6.7</point>
<point>40.8 -6.7</point>
<point>40.95450849718747 -6.675528258147577</point>
<point>41.093892626146236 -6.604508497187474</point>
<point>41.20450849718747 -6.493892626146237</point>
<point>41.275528258147574 -6.3545084971874735</point>
<point>41.3 -6.2</point>
<point>41.3 -4.2</point>
<point>41.275528258147574 -4.045491502812527</point>
<point>41.20450849718747 -3.9061073738537635</point>
<point>41.093892626146236 -3.7954915028125265</point>
<point>40.95450849718747 -3.7244717418524234</point>
<point>40.8 -3.7</point>
<point>-10.8 -3.7</point>
<point>-10.954508497187474 -3.7244717418524234</point>
<point>-11.093892626146237 -3.7954915028125265</point>
<point>-11.204508497187474 -3.9061073738537635</point>
<point>-11.275528258147578 -4.045491502812527</point>
<point>-11.3 -4.2</point>
</polyline>
</geometry>
<material>
<ambient>0.2 0.2 0.2 1.0</ambient>
</material>
</visual>
<collision>
<geometry>
<polyline>
<height>0.15</height>
<point>-11.3 -6.2</point>
<point>-11.275528258147578 -6.3545084971874735</point>
<point>-11.204508497187474 -6.493892626146237</point>
<point>-11.093892626146237 -6.604508497187474</point>
<point>-10.954508497187474 -6.675528258147577</point>
<point>-10.8 -6.7</point>
<point>40.8 -6.7</point>
<point>40.95450849718747 -6.675528258147577</point>
<point>41.093892626146236 -6.604508497187474</point>
<point>41.20450849718747 -6.493892626146237</point>
<point>41.275528258147574 -6.3545084971874735</point>
<point>41.3 -6.2</point>
<point>41.3 -4.2</point>
<point>41.275528258147574 -4.045491502812527</point>
<point>41.20450849718747 -3.9061073738537635</point>
<point>41.093892626146236 -3.7954915028125265</point>
<point>40.95450849718747 -3.7244717418524234</point>
<point>40.8 -3.7</point>
<point>-10.8 -3.7</point>
<point>-10.954508497187474 -3.7244717418524234</point>
<point>-11.093892626146237 -3.7954915028125265</point>
<point>-11.204508497187474 -3.9061073738537635</point>
<point>-11.275528258147578 -4.045491502812527</point>
<point>-11.3 -4.2</point>
</polyline>
</geometry>
</collision>
</link>
</model>
As with basic urdf models, I just duplicated the existing visual tag including all it's contents and renamed it as collision.
My approach was entirely experiemntal and did not work.
Can anyone help me understand how to amend the sidewalks in the world so my laser detects it as an edge instead of just going through it ?