Adds vehicle name to ros1 camera frame_ids. #4579
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Makes tf frame_ids of multiple cameras w/ same name distinct.
Fixes: #
Fixes #4578Related PR #4509 (fixes the frame_ids partially)
PR #4478 fixes exactly this behavior but for ROS2. This PR fixes it for ROS1
About
Adds the vehicle name to camera related tf frame_ids. This avoids ambiguous frame_ids, if cameras of multiple
vehicles have the same name.
How Has This Been Tested?
settings.json
{ "SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/master/docs/settings.md", "SettingsVersion": 1.2, "ClockSpeed": 0.2, "SimMode": "Multirotor", "PhysicsEngineName": "ExternalPhysicsEngine", "ViewMode": "Manual", "DefaultSensors": { "imu_1": { "SensorType": 2, "Enabled" : true } }, "Vehicles": { "drone_1": { "VehicleType": "SimpleFlight", "Cameras": { "img0":{ "CaptureSettings": [ { "ImageType": 0, "Width": 1024, "Height": 1024, "FOV_Degrees": 90 } ], "NoiseSettings": [ { } ], "X": 0.5, "Y": 0.0, "Z": 0.0, "Pitch": 0, "Roll": 0, "Yaw": 0 } }, "X": 0, "Y": 0, "Z": -1 }, "drone_2": { "VehicleType": "SimpleFlight", "Cameras": { "img0":{ "CaptureSettings": [ { "ImageType": 0, "Width": 1024, "Height": 1024, "FOV_Degrees": 90 } ], "NoiseSettings": [ { } ], "X": 0.5, "Y": 0.0, "Z": 0.0, "Pitch": 0, "Roll": 0, "Yaw": 0 } }, "X": 2.0, "Y": 2.0, "Z": -1 }, "drone_3": { "VehicleType": "SimpleFlight", "Cameras": { "img0":{ "CaptureSettings": [ { "ImageType": 0, "Width": 1024, "Height": 1024, "FOV_Degrees": 90 } ], "NoiseSettings": [ { } ], "X": 0.5, "Y": 0.0, "Z": 0.0, "Pitch": 0, "Roll": 0, "Yaw": 0 } }, "X": 2.0, "Y": 4.0, "Z": -1 } }, "CameraDefaults": { "CaptureSettings": [ { "ImageType": 0, "Width": 1024, "Height": 1024, "FOV_Degrees": 80 } ] }, "SubWindows": [ {"WindowID": 0, "VehicleName": "drone_1", "ImageType": 0, "CameraName": "img0", "Visible": true}, {"WindowID": 1, "VehicleName": "drone_2", "ImageType": 0, "CameraName": "img0", "Visible": true}, {"WindowID": 2, "VehicleName": "drone_3", "ImageType": 0, "CameraName": "img0", "Visible": true} ], "OriginGeopoint": { "Latitude": 0.0, "Longitude": 0.0, "Altitude": 0.0 } }Screenshots (if appropriate):
Before - frames img0_optical and img0_body are ambiguous i.e. some drones don't have a transformation to it:

After - every drone now has their own transformations to their respective camera:
