Comments (6)
Hi @engcang
- sending in the current positions to the EKF from an external system is not the same as setting the EKF origin.
- the vehicle must be armed before the motors can spin so it won't fly unless it is armed
- 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.
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.
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.
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)
- 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.) - 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?
- 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.
@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.
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)
- Blitz H7 Pro Logging HOT 1
- COPTER / KAKUTE F7 buzzer startup scream on kakute F7 HOT 4
- AP_DDS: Improve instructions to launch plane SITL with colcon
- Possible bug with `force` argument in `AP_ParamT::set_and_save` function HOT 3
- Overspeed during mission with takeoff item
- VectorNav Driver Improvements HOT 2
- ChibiOS: bi-directional dshot capable in iomcu-f103-dshot and iomcu-f103-8Mhz-dshot HOT 1
- Ubuntu 24.04 environment issue HOT 2
- LED_CONTROL: Unable to specify the LED display pattern.
- iomcu reset with bdshot on 6X HOT 1
- Copter build does not complete Copter-4.5.3
- EK3 Source Switching wrong frame for GUIDED commands SOLVED HOT 4
- size of defaults.parm at build time make parameters resets to default at reboot HOT 2
- Custom firmware for RealFlight and Mission planner doesn't work as per instructions HOT 2
- Plane: ARSPD_USE to 2 causes problems in RTL
- LUA: The error message of the script is unclear HOT 1
- Rover: Add RTL_ENABLE parameter HOT 7
- Support for HEQ g-port mini gimbal
- SERVO-BLH-3DMASK and SERVO-BLH-RVMASK encountered conflicts HOT 3
- MR72 Radar driver does not add obstacles to the OA database HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ardupilot.