1
$\begingroup$

In Webots: I want to do a Predator/Prey simulation and need to spawn the exact same robot when an event occurs. How do I copy/paste a robot I have in my world scene tree. I build it my self therefore I can not use a Webots PROTO. When I use the "Import EXTERNPROTO" function only my TexturedBackground and my Arena node are visible in my world file. They appear purple and the other nodes in the scene tree are green.

$\endgroup$

1 Answer 1

0
$\begingroup$

You should probably turn your robot into a PROTO file, store it into your local protos folder and add it to the list of Importable EXTERNPROTO. This way, your supervisor process will be able to spawn it dynamically in the simulation by using the wb_supervisor_field_import_mf_node_from_string function. This tutorial explains in details how to proceed.

Disclaimer: I am a Webots developer working at Cyberbotics.

$\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.