Skip to content

Is there a difference between what the getMultiRotorState API returns and the px4 internal position estimate? #2678

Closed

Description

I am running airsim with PX4 sitl and mavros to access the sensor data and control a simulated drone.

I have a question about how the values returned from the getMultiRotorState method used in airsim_node rosnode might differ from what could be retrieved when subscribing to the fcu local_position estimate provided by mavros.

In my simulation, airsim node publishes a topic /airsim_node/PX4/odom_local_ned, while mavros publishes a topic ~/mavros/local_position/pose.

My understanding is that airsim uses the getMultiRotorState method to get the latest estimated kinematic state of the drone.

The mavros topic should be returning the latest position estimate as calculated by the simulated flight controller, which would be the internal position estimate.

What is the relationship, if any, between these two sources, apart from a frame conversion from NED to ENU? Is the latest kinematic state based on the most recent actuator control outputs from the flight controller, which would have been generated based on the fcu internal position estimate and current setpoint goals?

Or, when using PX4 based sitl simulation, is the getMultiRotorState returning the ground truth position of the model, and the mavros topic provides the estimated position of the model as generated by the flight controller?

Activity

  1. rajat2004 commented on May 9, 2020

    @rajat2004
    Contributor

    From the code, it seems that it's publishing the estimated kinematics returned by PX4, see
    https://github.com/microsoft/AirSim/blob/master/AirLib/include/vehicles/multirotor/api/MultirotorApiBase.hpp#L125

    But best way to make sure might be to get the ground truth data and see if it's the same, o do the conversion on either the PX4 topic or Airsim one and see if they're the same

  2. locked and limited conversation to collaborators on Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions