3
$\begingroup$

I am wondering if there's an easy way of modifying an existing robot, such as the Mavic drone, and then test how this modification worked.

For example, I would like to change the shape or angle of the blades.

I have opened the Mavic demo, and I have converted the Drone "convert the root to base node" and I see more nodes, but I am not sure if this would be enough.

$\endgroup$

1 Answer 1

2
$\begingroup$

What you did is not a bad approach to quickly test modifications on a PROTO. However, instead of Convert Root to Base Node(s), you should have selected Convert to Base Node(s). Once you have converted the PROTO to base nodes in the scene tree, you should be able to open the resulting base node and its children to modify them and immediately see how your changes affect the model in the 3D view.

However, the recommended way to modify an existing robot is to create a local copy of the PROTO of the robot and modify it in a text editor.

In order to proceed:

  1. Open a world file, for example the Mavic demo. From the Webots File menu, Open Sample World..., then type mavic in the Find: search box and click on mavic_2_pro.wbt.

  2. If it is running, stop the simulation and reset it |<< or reload it .

  3. In the scene tree (left hand side), right-click on the Mavic2Pro "Mavic 2 PRO" node located at the bottom of the list and select Edit PROTO Source.

  4. Proceed with the two dialog boxes to download the PROTO file and relocate the project inside your own folders. The Webots text editor should now display a new tab entitled Mavic2Pro.proto with a copy of the original PROTO file.

  5. Edit this copy of the Mavic2Pro.proto file to make your own changes, save the PROTO file and reload the simulation to see the result of your changes.

  6. Repeat step 5 as much as you need.

For details on how to edit a PROTO file, see the reference PROTO documentation and the PROTO tutorial.

Disclaimer: I am a Webots developer working at Cyberbotics.

$\endgroup$
2
  • $\begingroup$ @OlivierMichael, is there any guide about how to modify proto files? $\endgroup$
    – Dr Sokoban
    Commented Jun 23, 2023 at 10:03
  • 1
    $\begingroup$ Yes, see my edited answer. $\endgroup$ Commented Jun 23, 2023 at 10:14

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.