nightman
nightman

Reputation: 11

Webots - How mark coordinates in environment during simulation

Robot controller uses RRT to generate a set of nodes (x,y) taking it from start to finish. If possible I would like for these nodes to somehow show in the environment.

Edit:

root = supervisor.getRoot() 
root_children_field = root.getField("children") root_children_field.importMFNode(-1,"tree_node.wbo") 
node = root_children_field.getMFNode(-1) 
field = node.getField("translation") 
location = [-1, 0.5, 0] # location of path node 
field.setSFVec3f(location)

Upvotes: 1

Views: 470

Answers (1)

David Mansolino
David Mansolino

Reputation: 1733

You can use the Supervisor to import/modify/change/move/remove nodes (such as visual nodes) at runtime in the environment: https://www.cyberbotics.com/doc/reference/supervisor

You will find some example simulations using the Supervisor here:

Upvotes: 1

Related Questions