Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROS1 ambiguous camera tf frame_ids #4578

Open
lukas-utopiacompression opened this issue Jun 16, 2022 · 3 comments · May be fixed by #4579
Open

ROS1 ambiguous camera tf frame_ids #4578

lukas-utopiacompression opened this issue Jun 16, 2022 · 3 comments · May be fixed by #4579

Comments

@lukas-utopiacompression
Copy link

lukas-utopiacompression commented Jun 16, 2022

Bug report

  • AirSim Version/#commit: eda67e4 and v1.7
  • UE/Unity version: 4.27.2
  • autopilot version: n/a
  • OS Version: Ubuntu 20.04.4

What's the issue you encountered?

When multiple vehicles (see settings.json below) specify a camera with the same name (e.g. "img0") ROS1's tf frame_ids become ambiguous i.e. only one of the drone has a transformation from itself to img0_body or img0_optical. However, all drones should have their own distinct transformation from their respective img0 frame to their NED frame.

Related PR #4478 fixes the same issue but for ROS2.
Related PR #4509 fixes this partially.

Screenshot of rqt_tf_tree, when camera frame_ids are ambiguous.
frames_bad

Screenshot of rqt_tf_tree, when camera frame_ids are distinct (e.g. by adding the vehicle_name to the frame_id):
frames_good

Settings

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
    }
}

How can the issue be reproduced?

  1. Use above settings.json
  2. open Blocks environment
  3. roslaunch airsim_ros_pkgs airsim_node.launch
  4. Open either rviz, or rqt with the rqt_tf_tree plugin

Include full error message in text form

n/a

What's better than filing an issue? Filing a pull request :).

@jonyMarino
Copy link
Collaborator

Hi @lukas-utopiacompression! Thanks for submitting the PR. I'd like to know why you didn't upgrade to ROS2 when you ran into this issue.

@lukas-utopiacompression
Copy link
Author

lukas-utopiacompression commented Jun 20, 2022

Good morning @jonyMarino,

Happy to help!

We haven't transitioned for two reasons:

  1. Our project still requires ROS1.
  2. Fixing and creating a PR for the missing/ambiguous tf frame_ids seemed less work than transitioning our whole project to ROS2 (for now).

@jonyMarino
Copy link
Collaborator

Thanks for the reply, @lukas-utopiacompression. Keep in mind that you can use the Ros1-Ros2 Bridge to connect your project with ROS2 nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants