1
$\begingroup$

In Webots is it possible to define a DEF for defining a feature in order to reuse it more time in the same world It works very well we do the tutorials online creating a solid and then a shape. But it does not work when creating a CadShape. No matter how you define it, it cannot be reused in any way.

Any idea why? It would be very inefficient, if after importing a CadShape I need to define a solid geometry for boundary

To reproduce this, just do the following:

  1. Create a new base node "robot" by clicking on the plus
  2. In children import another base node as CadShape.
  3. Import an .STL or a .DAE file
  4. Define a DEF name for the CadShape you just imported
  5. Click on bounding object to add the defined DEF into the robot
  6. There is no USE to be clicked

Even creating a Solid first and adding a CadShape as a child does not work.

Screenshot

I expected to find under USE the DEF I already defined. It works in the same Webots with Solid and Shapes

Here my system specifications:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

I use a laptop with an:

NVIDIA T1000
Driver Version: 535.113.01 CUDA Version: 12.2
$\endgroup$

1 Answer 1

1
$\begingroup$

An other idea is use the Mesh node as your geometry inside a Shape node. Once you've got that, you could use it whether you DEF the Shape node or the Mesh as your BoundingObject. I tested with an french fries and work fine.

a french fries mesh as a boundry object in Webots

I would like to add that using Meshes as Bounding Objects requires more computing power which could make the simulation run slowly, consider using simpler objects instead such as boxes, cylinders or spheres.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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