基础
坐标系定义
Coordinate System#
All AirSim API uses NED coordinate system, i.e., +X is North, +Y is East and +Z is Down. All units are in SI system. Please note that this is different from coordinate system used internally by Unreal Engine. In Unreal Engine, +Z is up instead of down and length unit is in centimeters instead of meters. AirSim APIs takes care of the appropriate conversions. The starting point of the vehicle is always coordinates (0, 0, 0) in NED system. Thus when converting from Unreal coordinates to NED, we first subtract the starting offset and then scale by 100 for cm to m conversion. The vehicle is spawned in Unreal environment where the Player Start component is placed. There is a setting called OriginGeopoint
in settings.json which assigns geographic longitude, longitude and altitude to the Player Start component.
采用国际标准单位制(SI units)
国际单位制(SI Units)是一套国际通用的单位标准。
2019 年 5 月 20 日开始生效的新国际单位标准,该标准中的数值也被称为 2018 CODATA 推荐值。CODATA 是科学技术数据委员会(Committee on Data for Science and Technology)的简称。在新标准中,所有基本单位都可以通过 7 个预定义的物理常数来测定(表 1 )。以下的数值除了有特殊说明,都是精确值(无限位小数用省略号表示)
参考:国际单位制 - 小时百科
设置在渲染窗口中,相机如何跟踪机体,可手动设置
自定义相机跟踪拍摄机体时的相对位姿关系
"CameraDirector": {
"FollowDistance": -3,
"X": NaN, "Y": NaN, "Z": NaN,
"Pitch": NaN, "Roll": NaN, "Yaw": NaN
},
Camera Director Settings#
This element specifies the settings used for the camera following the vehicle in the ViewPort.
FollowDistance
: Distance at which camera follows the vehicle, default is -8 (8 meters) for Car, -3 for others.X, Y, Z, Yaw, Roll, Pitch
: These elements allows you to specify the position and orientation of the camera relative to the vehicle. Position is in NED coordinates in SI units with origin set to Player Start location in Unreal environment. The orientation is specified in degrees.
贡献案例
检测二维及三维边界
Python script detection.py shows how to set detection parameters and shows the result in OpenCV capture.
无人机按照指定路径飞行
So the PythonClient/multirotor
folder contains a script named Orbit that will do precisely that.
Ever wanted to capture a bunch of top-down pictures of a certain location? Well, the Python API makes this really simple. See the code available here.
让无人机按照指定路径飞行,但汽车无法实现,是否可借助样条曲线指定路径进行运动?可先查看无人机按照指定路径飞行的代码实现原理(重点在c++代码,python只是调用API)。
深度学习自动驾驶
GitHub - microsoft/AutonomousDrivingCookbook: Scenarios, tutorials and demos for Autonomous Driving