如何在 Webots 6.4.1 Pro 中获取 Khepera 差动轮的真实位置?

How can I get the true position of a Khepera Differential Wheels in Webots 6.4.1 Pro?

是否可以添加GPS节点?这似乎是最简单的答案。

我在创建监督者方面也取得了一些进展,但是如何让监督者控制器和差速轮控制器同时运行?

我需要每隔几秒获取一次真实位置,以便追踪它的路径。

在场景树中,单击子项,然后添加新的 select GPS 节点。 保存并刷新 webots。

要激活和访问 gps 值:

gps = wb_robot_get_device('gps')
wb_gps_enable(gps, 10) % read every 10 milliseconds.
wb_gps_get_values(gps)