Webots:ERROR: “E:/**/wheelfinready.wbt”:33:23:错误:Expected ‘浮点值’, found ‘[’. {1’?} {2:23:?}
问题描述
昨天新建了一个世界用来仿真最近在做的一个机器人,晚上回去的时候就保存之后关闭了,今天来了之后发现打开世界之后是空的,人直接傻掉了,还以为忘记保存了,但是仔细看了文件最后的保存时间确实是昨晚走的时候,重新打开了一下,发现还是不行,并发先下面显示如下错误:
ERROR: “E:/Webots/wheelFinRobot/worlds/wheelfinready.wbt”:33:23:错误:Expected ‘浮点值’, found ‘[’. {1’?} {2:23:?}
ERROR: ‘E:/Webots/wheelFinRobot/worlds/wheelfinready.wbt’: Failed to load due to syntax error(s).
问题解决
似乎是读取保存的世界文件wbt文件的时候出现了一些问题,网上搜了一下也没有什么解决方法,只能自己想办法了,想到了之前看到的Webots使用的语音是VRML(Virtual Reality Modeling Language)即虚拟现实建模语言。因此可以用文本编辑器打开.wbt文件,寻找解决办法。
打开后可以很明确的看到世界的结构
#VRML_SIM R2020b utf8
WorldInfo {
basicTimeStep 1
coordinateSystem "NUE"
contactProperties [
ContactProperties {
coulombFriction [
0.4
]
}
]
}
Viewpoint {
orientation -0.14560678248228257 -0.9759251935056109 -0.16238436370597023 1.6114345810625152
position -15.057677608988085 3.0920645357548664 -0.24588279808939442
}
TexturedBackground {
}
TexturedBackgroundLight {
}
UnevenTerrain {
size 100 0 100
appearance SandyGround {
colorOverride 0.698039 1 0.760784
textureTransform TextureTransform {
scale 0 0
}
}
}
DEF Build Group {
children [
HelicoidalRoadSegment {
roadBorderWidth [
0.1
]
translation 6 0.001 20
rotation 0 1 0 1.570796327
name "road(1)"
width 2
roadBorderHeight 0.05
roadBorderWidth 0.1
bottom TRUE
height 5
radius 20
roadBoundingObject