AirSim settings.json文件设置子窗

settings.json的子窗口设置

{
  "SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/main/docs/settings.md",
  "SettingsVersion": 1.2,
  "SimMode":"Multirotor",
  "ViewMode": "FlyWithMe",
  "SubWindows": [
	{
		"WindowID": 0,
		"CameraName": "front_center_custom",
		"ImageType": 0,
		"Visible": true,
		"ImageSize": [480,720],
		"CameraPosition": [0.0, 0.0, -2.5],
		"CameraRotation": [0.0, 0.0, 0.0]
	},
	{
		"WindowID": 1,
		"CameraName": "front_center_custom",
		"ImageType": 3,
		"Visible": true,
		"ImageSize": [480,720],
		"CameraPosition": [0.0, 0.0, -2.5],
		"CameraRotation": [0.0, 0.0, 0.0]
	},
	{
		"WindowID": 2,
		"CameraName": "front_center_custom",
		"ImageType": 5,
		"Visible": true,
		"ImageSize": [480,720],
		"CameraPosition": [0.0, 0.0, -2.5],
		"CameraRotation": [0.0, 0.0, 0.0]
	}
  ],
  "Vehicles":{
		"Drone":{
			"VehicleType": "SimpleFlight",
			"DisplayName": "My First Drone",
			"AutoCreate": true
			}
	}
}

一、SeeDocsAt

该字段提供了 AirSim 配置文档的链接,用户可以访问该文档以获取更多关于设置的说明和帮助。

二、SettingsVersion

配置文件的版本,表示该文件遵循 AirSim 的设置规范版本 1.2。

三、SimMode

该设置指定模拟模式为“Multirotor”,表示模拟器将模拟一个多旋翼无人机。

四、ViewMode

该设置指定视图模式为“FlyWithMe”,这通常是指模拟器的视图模式,将显示从无人机的视角飞行的画面。

五、SubWindows

该部分定义了多个子窗口

"SubWindows": [
	{
		"WindowID": 0,
		"CameraName": "front_center_custom",
		"ImageType": 0,
		"Visible": true,
		"ImageSize": [480,720],
		"CameraPosition": [0.0, 0.0, -2.5],
		"CameraRotation": [0.0, 0.0, 0.0]
	},
	{
		"WindowID": 1,
		"CameraName": "front_center_custom",
		"ImageType": 3,
		"Visible": true,
		"ImageSize": [480,720],
		"CameraPosition": [0.0, 0.0, -2.5],
		"CameraRotation": [0.0, 0.0, 0.0]
	},
	{
		"WindowID": 2,
		"CameraName": "front_center_custom",
		"ImageType": 5,
		"Visible": true,
		"ImageSize": [480,720],
		"CameraPosition": [0.0, 0.0, -2.5],
		"CameraRotation": [0.0, 0.0, 0.0]
	}
  ],

这里一共配置了三个窗口,分别用于显示不同类型的图像。从ImageType可以看出:

0: 场景图像(RGB图像)。
3: 深度图像(Depth)。
5: 语义分割图像(Segmentation)

一共显示了三种图像。

针对每一个窗口的设置:

1.WindowID

每个窗口的唯一标识符。

2.CameraName

使用的相机名称,这里使用了 "front_center_custom",表明是一个自定义的前方中央相机。

3.ImageType

图像类型的编号。不同的编号对应不同类型的图像。

4.Visible

设置窗口是否可见,true 表示可见。

5.ImageSize

图像的分辨率,[480, 720] 表示宽度为 480 像素,高度为 720 像素。

5.CameraPosition

相机在模拟环境中的位置,格式为 [x, y, z],其中 z 方向表示高度。这里设置的是 [0.0, 0.0, -2.5],表示相机位于飞行器的下方 2.5 单位。

6.CameraRotation

相机的旋转角度,格式为 [pitch, yaw, roll],这里的 [0.0, 0.0, 0.0] 表示相机没有旋转。

CameraPosition和CameraRotation都是相对于飞行器坐标的偏移和旋转。

六、Vehicles

定义了模拟的无人机的参数信息

"Vehicles":{
		"Drone":{
			"VehicleType": "SimpleFlight",
			"DisplayName": "My First Drone",
			"AutoCreate": true
			}
	}

1.Drone

这里定义了一个名为 "Drone" 的无人机。

1.VehicleType

设置为 "SimpleFlight",表示模拟器将使用一个简单的飞行控制模型。(还可以换成car汽车控制模型和custom自定义的模型)。

2.DisplayName

给无人机设置一个显示名称,"My First Drone"。

3.AutoCreate

设置为 true,表示自动创建该无人机。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值