Code Monkey home page Code Monkey logo

Comments (6)

rmackay9 avatar rmackay9 commented on July 18, 2024 1

Hi @engcang

  1. sending in the current positions to the EKF from an external system is not the same as setting the EKF origin.
  2. the vehicle must be armed before the motors can spin so it won't fly unless it is armed
  3. yes, the EKF origin and AHRS home are two different things. Normally home is initialised automatically to the vehicle's current location soon after the EKF origin is set. So normally only the EKF origin needs to be set. Setting Home is not required.

Perhaps I'm misunderstanding some questions so apologies if you already know some of the above.

Hope that helps.

from ardupilot.

FahrulID avatar FahrulID commented on July 18, 2024 1

@engcang

In Mavlink To set the EKF Origin, you need to send SET_GPS_GLOBAL_ORIGIN, in Mavros you can use global_position plugin with this topic /mavros/global_position/set_gp_origin. The topic used geographic_msgs::GeoPointStamped message.

from ardupilot.

rmackay9 avatar rmackay9 commented on July 18, 2024

Hi @engcang,

In general users should set the EKF origin using the ground station. E.g. open MP's Flight Data screen and right-mouse-button click on the map and select Set Home Here, Set EKF Origin Here

Alternatively we've got a Lua script here that could be modified and used.

I've created a wiki page issue here to document this better: ArduPilot/ardupilot_wiki#5935

I'll go ahead and close this issue but I'll see replies in case you think the above isn't sufficient.

from ardupilot.

engcang avatar engcang commented on July 18, 2024

Hi @rmackay9

After I publish the SLAM's estimated pose via /mavros/vision_pose/pose, which is VISION_POSITION_ESTIMATE, mavproxy outputs

AP: EKF3 IMU0 yaw aligned
AP: EKF3 IMU1 yaw aligned
AP: EKF3 IMU0 is using external nav data
AP: EKF3 IMU0 initial pos NED = 0.0,-0.0,-0.1 (m)
AP: EKF3 IMU1 is using external nav data
AP: EKF3 IMU1 initial pos NED = 0.0,-0.0,-0.1 (m)

and also mavros which is connected to the pixhawk outputs

[ INFO] [1715073248.269162075, 82.965000000]: FCU: EKF3 IMU0 yaw aligned
[ INFO] [1715073248.269425090, 82.965000000]: FCU: EKF3 IMU1 yaw aligned
[ INFO] [1715073248.271926815, 82.968000000]: FCU: EKF3 IMU0 is using external nav data
[ INFO] [1715073248.272076282, 82.968000000]: FCU: EKF3 IMU0 initial pos NED = 0.0,-0.0,-0.1 (m)
[ INFO] [1715073248.272214568, 82.968000000]: FCU: EKF3 IMU1 is using external nav data
[ INFO] [1715073248.272355966, 82.968000000]: FCU: EKF3 IMU1 initial pos NED = 0.0,-0.0,-0.1 (m)
  1. Are not these the outputs of setting the EKF origin you mentioned?
    (FYI, as I wrote in the first comment, after manually taking off the drone and then change the mode into GUIDED, the drone flies well autonomously. So the EKF parameters are set properly.)
  2. From somewhere I found that the drone must be armed after the mode is changed to GUIDED, otherwise the drone cannot takeoff in GUIDED mode. Is this correct information?
  3. I found that setting home and setting origin for EKF/AHRS are different at here - https://ardupilot.org/dev/docs/mavlink-get-set-home-and-origin.html. What exactly do we have to set to takeoff in GUIDED mode?

from ardupilot.

engcang avatar engcang commented on July 18, 2024

@rmackay9
Thank you for your detailed and fast reply.
With the Lua script you attached, the drone can successfully take off in GUIDED mode without GPS/GNSS.
The second question was about the order of command. I read somewhere that arming -> mode change into GUIDED cannot takeoff drone, but only mode change into GUIDED -> arming -> then drone can takeoff. Is this true information?

I was about to ask how I can set the EKF origin without Lua script but with mavros (mavlink) command, but thanks to @FahrulID I just checked it works well!

I've got an another question about landing in GUIDED mode.
In PX4, with OFFBOARD mode (GUIDED in Ardupilot), the command with the z-axis downward flies the drone vertically downward and then it disarms automatically after it contacts the ground (i.e., mavros/setpoint_position/local's translation values).

So, is it same in Ardupilot? or do I have to use /mavros/cmd/land again to land the drone as we have to do for the takeoff?

from ardupilot.

rmackay9 avatar rmackay9 commented on July 18, 2024

Hi @engcang,

Yes, we've got a wiki page here which describes the commands to control the vehicle (in Guided mode) and includes the Takeoff command. https://ardupilot.org/dev/docs/copter-commands-in-guided-mode.html

from ardupilot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.