Webots-如何在模拟过程中标记环境中的坐标



Robot控制器使用RRT生成一组节点(x,y(,从开始到结束。如果可能的话,我希望这些节点以某种方式显示在环境中。

编辑:

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)

您可以在运行时使用Supervisor在环境中导入/修改/更改/移动/删除节点(如可视化节点(:https://www.cyberbotics.com/doc/reference/supervisor

您可以在这里找到一些使用Supervisor的模拟示例:

  • https://www.cyberbotics.com/doc/guide/samples-devices#supervisor-wbt
  • https://www.cyberbotics.com/doc/guide/samples-howto#supervisor_draw_trail-wbt

最新更新