AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

How to modify the distance between two cameras

Open dehuachen2017 opened this issue 8 years ago • 5 comments

Hi, everyone, we known there are two cameras in front of the drone. I use cameraID 1 and cameraID 2 in setting.json file. I have two questions. (1)How do we know the distance between the two cameras? (2) How to modify the distance between cameras?

dehuachen2017 avatar May 10 '18 08:05 dehuachen2017

After run the UE4 project, we can see and set the distance in BP_FlyingPawn Blueprint.

Robin-Wong avatar May 10 '18 09:05 Robin-Wong

Thanks for your reply.

dehuachen2017 avatar May 10 '18 11:05 dehuachen2017

As @Robin-Wong said you can modify camera positions in BP_FlyingPawn Blueprint. But new versions of Airsim also allow you to add new camera IDs and set their positions through json setting file as you can see on https://github.com/Microsoft/AirSim/blob/master/docs/settings.md, where the example uses:

"AdditionalCameras": [ { "X": 0.00, "Y": 0.5, "Z": 0.0, "Roll": 0.0, "Pitch": 0.0, "Yaw": 90.0 }

Domi47 avatar May 11 '18 09:05 Domi47

I do not think this can add new camera, if want to add, I used add camera in Blueprint and add code refer to the exist ones. Or just use the exist ones with changing their position.

Robin-Wong avatar May 14 '18 01:05 Robin-Wong

@Robin-Wong I have used 'AdditionalCameras' and i don't see any problem using it. As it's said on settings doc:

"Additional Camera Settings This allows to configure cameras in addition to the standard ones. This is only implemented in the multirotor drone at the moment. The X, Y and Z fields specify the location of the new camera in the body frame, where X points forward, Y points to the right, and Z points downwards, and the values are given in SI units (meters). Yaw, Pitch, and Roll specify the orientation of the camera, where Yaw denotes rotation around the Z axis, Pitch rotation around the Y axis and Roll rotation around the X axis."

Domi47 avatar May 14 '18 08:05 Domi47