Skip to content

Airsim ROS wrapper in airsim_ros_pkgs gives TF_NAN_INPUT error #4904

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

Open
sandilyasg opened this issue Nov 8, 2023 · 0 comments
Open

Airsim ROS wrapper in airsim_ros_pkgs gives TF_NAN_INPUT error #4904

sandilyasg opened this issue Nov 8, 2023 · 0 comments

Comments

@sandilyasg
Copy link

sandilyasg commented Nov 8, 2023

Bug report

  • AirSim Version/#commit: 6688d27 on Jul 21, 2022
    Unity version: 2021.3.31f1
  • OS Version: Linux Ubuntu 18.04 LTS

I am using a single Multirotor in Unity with Airsim. I am trying to run ROS wrapper for Airsim from airsim_ros_pkgs given the tutorial in AirSim ROS Tutorials.

I am trying the simple example of Single drone with monocular and depth cameras, and lidar; it uses settings.json - front_stereo_and_center_mono.json. When I run the launch files in this example, I get the error

Error:   TF_NAN_INPUT: Ignoring transform for child_frame_id "front_center_optical" from authority "/airsim_node" because of a nan value in the transform (0.000000 0.000000 0.000000) (-nan -nan -nan -nan)
         at line 244 in /tmp/binarydeb/ros-melodic-tf2-0.6.5/src/buffer_core.cpp
Error:   TF_DENORMALIZED_QUATERNION: Ignoring transform for child_frame_id "front_center_optical" from authority "/airsim_node" because of an invalid quaternion in the transform (-nan -nan -nan -nan)

Settings

{
  "SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/main/docs/settings.md",
  "SettingsVersion": 1.2,
  "SimMode": "Multirotor",
  "ViewMode": "FlyWithMe",
  "ClockSpeed": 1.0,
  "Vehicles": {
    "Drone1": {
      "VehicleType": "SimpleFlight",
      "DefaultVehicleState": "Armed",
      "EnableCollisionPassthrogh": false,
      "EnableCollisions": true,
      "AllowAPIAlways": true,
      "RC": {
        "RemoteControlID": 0,
        "AllowAPIWhenDisconnected": false
      },
      "Sensors": {
        "Imu" : {
          "SensorType": 2,
          "Enabled": true
        }
      },
      "Cameras": {
        "front_center": {
          "CaptureSettings": [
            {
              "PublishToRos": 1,
              "ImageType": 0,
              "Width": 256,
              "Height": 144,
              "FOV_Degrees": 90,
              "TargetGamma": 1.0
            }
          ],
          "X": 0, "Y":0, "Z": 0,
          "Pitch": 0.0, "Roll": 0.0, "Yaw": 0.0
        }
      },

      "X": -2, "Y": 5, "Z": 0,
      "Pitch": 0, "Roll": 0, "Yaw": 0
    }
  }
}

How can the issue be reproduced?

  1. Ensure settings.json used is Settings.json - front_stereo_and_center_mono.json
  2. source PATH_TO/AirSim/ros/devel/setup.bash
  3. roscd airsim_tutorial_pkgs
    4. cp settings/front_stereo_and_center_mono.json ~/Documents/AirSim/settings.json
  4. Start your Unity simulation here

  5. roslaunch airsim_ros_pkgs airsim_node.launch
  6. in a new pane / terminal

  7. source PATH_TO/AirSim/ros/devel/setup.bash
  8. roslaunch airsim_tutorial_pkgs front_stereo_and_center_mono.launch

Include full error message in text form

Error:   TF_DENORMALIZED_QUATERNION: Ignoring transform for child_frame_id "front_center_body" from authority "/airsim_node" because of an invalid quaternion in the transform (0.000000 0.000000 0.000000 0.000000)
         at line 257 in /tmp/binarydeb/ros-melodic-tf2-0.6.5/src/buffer_core.cpp
Error:   TF_NAN_INPUT: Ignoring transform for child_frame_id "front_center_optical" from authority "/airsim_node" because of a nan value in the transform (0.000000 0.000000 0.000000) (-nan -nan -nan -nan)
         at line 244 in /tmp/binarydeb/ros-melodic-tf2-0.6.5/src/buffer_core.cpp

I think this is a bug in the airsim_ros_wrapper.cpp ROS wrapper code. Has anyone also experienced this issue?

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

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

No branches or pull requests

1 participant