0
$\begingroup$

I'm using Webots to model an irregular polygon floor for a coverage problem. I want to define the floor using the coordinates of the vertices. So far I have been able to generate an irregular polygon with desired coordinates using polygons.wbt. But I'm not sure if this would function correctly as the "floor" or "ground" for the robot to go over.

$\endgroup$

2 Answers 2

4
$\begingroup$

I would recommend you to use (or take inspiration from) the UnevenTerrain proto included in the recent versions of Webots. See a demo on webots.cloud. This proto file will generate a random uneven terrain, suitable for robots to move on. If you want a pre-defined, e.g., non random terrain, you can probably take inspiration from this proto to create your own from a Solid node containing an ElevationGrid node with custom size and height values.

Note: polygon.wbt is not the best example for this as it relies on the IndexedFaceSet node which is not the best option to create terrains, because the quality and efficiency of collisions is not as good as with the ElevationGrid.

$\endgroup$
1
$\begingroup$

Webots offers defaults of some object floors in the ~/projects/objects/floors/protos/ directory from your Webots HOME directory. These however don't give you the option to modify the floor on the basis of coordinates.

To do what you have asked, however, will require you to create a new PROTO file that you can do by playing around with the instructions as given here. Another stack user had a question regarding changing the coordinates of the origin of the floor and you may want to check that out too.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.