问题描述:
在运行某个工程时,在内部做局部环境修改,点击保存时,控制台经常会提示是否保存询问,但是又无法进行保存操作,提示报错如下:
INFO: 'Ros2Supervisor' extern controller: connected.
INFO: The simulation has run!
Saving the .wbt file will store the current world state: the objects position and rotation and other fields may differ from the original file!
Do you want to save this modified world?
问题原因:
由于工程运行时,加载了wbt文件,是无法直接进行wbt文件修改的。
解决方式:
1、找到自己的webots软件安装目录;
2、执行: ./webots
3、打开上述要修改的wbt环境
4、修改所需,点击保存即可;
5、重新运行前序的工程,可以看到环境更新了。
注意:
在ros2中,colcon build的运行文件在install 中,所以修改的wbt文件也需要同步修改。可以直接修改install中的wbt文件,也可以修改src中的再重新colcon build。