Quantcast
Channel: ArduPilot Discourse - Latest topics
Viewing all 46721 articles
Browse latest View live

Altitude Over Large Distances

$
0
0

Consider a scenario where a high endurance plane is given a single waypoint command that is 10+ km away. Due to the curvature of the earth, would the plane loose altitude while en route? Do Ardupilot’s controllers use a reference height based on a tangent plane coordinate system (which would cause an altitude loss over large distances), or do they use an altitude in WGS84, MSL, etc?

1 post - 1 participant

Read full topic


Precision Landing Issue – Oscillations & Wind Shadow Near Box with Hatch

$
0
0

Hi everyone,

I’m working on a drone that uses ArduPilot for precision landing into a box (85x85 cm) with a hatch that raises up to 120 degrees. The landing platform lifts up to the box edge. The drone relies on a MAVLink-based precision landing system, which provides accurate landing target messages. The landing process works, but there are two major issues:

  1. Turbulence Near Hatch – When the drone gets close to the box, the airflow interactions between the props, the hatch, and the box edges creates turbulance, which causes small movements for the drone, which in turn causes small oscillations and can cause the drone to drift and potentially hit the hatch.

  2. Wind Shadow Effect Causes Sudden Drift – In strong wind conditions, the hatch blocks the wind, and as the drone descends near it, the sudden loss of wind force makes the drone unexpectedly drift into the hatch or cause instability.

We have tried landing in better conditions: the precision landing messages are correct, and the drone does land on the target, there are no issues with that.

We have played around with all the precision land parameters and some position control tuning, but the issue persists. The position control in other cases works fine, for example in loitering.

The effect is especially noticeable in strong wind conditions.

We cannot change the box for the time being, but is there something to be done for the drone to keep itself more strictly on the target? If tuning can help, then which part of the control pipeline to start with?

Has anyone dealt with similar issues when landing in a confined space with turbulent airflow?
Are there any more parameter tweaks (beyond the usual LAND_SPEED/PID tuning) that could help stabilize descent near the hatch?
Would modifying EKF wind estimation settings help mitigate the wind shadow effect?
Any other ideas to reduce oscillations and improve landing accuracy in these conditions?

Thanks in advance for any help or suggestions!

1 post - 1 participant

Read full topic

How to change the dz when loiter will hover

$
0
0

How do I change the stick sensitivity on my drone? It’s too little sensitive in loiter mode; so there is a big “deadzone” at which loiter will hover but I want to minimize that so I don’t need to move the sticks from center to start moving the drone.

1 post - 1 participant

Read full topic

Copter uses last seen RC from SBUS in spite of receiver settings to the contrary

$
0
0

Running Copter 4.3.7 (with a custom motor mixer so I can’t easily upgrade right now).

With an X8R FRSKY receiver configured in “no pulses” failsafe mode, and with a saleae logic analyzer hooked up to the sbus lines going into the cube, I can see proper RC commands make it on the wire and read by the cube. When I turn the transmitter off, I see 0’s go out on the wire and the failsafe bit set, but the cube sees the last input RC channel. Is this some kind of known bug for 4.3.7? FS_THR_VALUE is set lower than the lowest possible input throttle value via stick, but the flight controller sees the last real throttle value instead of what is on the sbus wires. It seems to ignore the FS bit as well (or else is still seeing the last FS bit). When the Receiver is ultimately unplugged from the cube, the cube seems to detect it’s loss and trigger the failsafe.
I have used the receiver manual to reset it’s failsafe mode to “no pulses”, but it doesn’t matter what I do, it seems that when the receiver goes into failsafe mode, the readings are no longer respected by the cube.

I have also started a Discord chat for this issue here

2 posts - 2 participants

Read full topic

Sending Image Data and FC Data Through Companion Computer to Ground Station

$
0
0

Hey all!

I am currently trying to send image data from a companion computer to my ground station, as well as flight controller data using the same Radio Modem.

The transceiver im using is the RFD900x radio modem.

I am able to route image data to the ground station using pymavlink. I am also able to route FC data to the ground station through the companion computer using pymavlink as well, although it is a bit slow. The problem is that I need to send both at the same time, as well as send it across the same transceiver. I am wondering if there is a way to use mavlink-router or mavproxy to route both the image data and flight computer data across the same modem.

I understand that typically mavlink-router is typically used to route the autopilot data to multiple endpoints, so that you can send it over both a serial connection and a wifi connection, but is there a way to where you could potentially send image data across the same serial connection as well?

1 post - 1 participant

Read full topic

Lua Script Unable to Test CubeBlack

$
0
0

I’m currently working on a LUA script to act as a driver for a DFRobot Sen0629 sensor, meant to act as a 1D range finder. Right now I am trying to run the script on a CubeBlack, with plans to move this onto a custom fc based on an H743. I am currently running into an issue with SCR_HEAP_SIZE. If I increase memory any further, EKF3 does not have enough memory to run. I am also confused as to why the script needs so much memory, as it is only 2KB, but it still does not have enough memory at 51200. Attached below are my parameters, as well as my driver script.

C4001.lua (2.6 KB)
pixhawk382025.param (17.9 KB)

2 posts - 2 participants

Read full topic

100kg VTOL Pitch change when motor run

$
0
0

Hello Guys,

Whe set accelerometer level and make QLOITER perfect, but when we start main petrol engine (rear position pusher) the level of Loiter change, tail sit down and we see +5 +8 degrees pitch.

Big motor 170cc boxer, run minimum ad possible by EFI, i think the problem is 50% thrust and 50% big propeller near rear rotors disturb air flow.

How can fix this? i see one parameter Q_trim_pitch but i’m not sure if is this

Thanks

1 post - 1 participant

Read full topic

Error while enabling Proximity in "sitl_on_hardware"

$
0
0

I am trying to debug a custom proximity sensor and interface that I added in ardupilot firmware, It connects with CAN.

I am trying to run the SITL_ON_HARDWARE firmware with the following command.

/Tools/scripts/sitl-on-hardware/sitl-on-hw.py --board CubeOrangePlus --vehicle copter --simclass MultiCopter --upload --enable-PROXIMITY_TI_ENABLED --enable-header-checks

However the compilation runs into an error

In file included from ../../libraries/AP_Proximity/AP_Proximity_TI_CAN.cpp:27:
../../libraries/AP_Proximity/AP_Proximity_TI_CAN.h:16:57: error: expected class-name before '{' token
   16 | class AP_Proximity_TI_CAN : public AP_Proximity_Backend {
      |                                                         ^
compilation terminated due to -Wfatal-errors.

Waf: Leaving directory `/media/zebu/f9737023-f8af-4cee-8a7e-1bf98a2b8439/ardupilot/build/CubeOrangePlus'
Build failed
 -> task in 'objs/AP_Proximity' failed (exit status 1): 
	{task 134631170884656: cxx AP_Proximity_TI_CAN.cpp -> AP_Proximity_TI_CAN.cpp.0.o}
 (run with -v to display more information)

Could someone help me figure out what am I doing wrong.

I tried the same launch command with --enable-PROXIMITY_MAV and I get the same error.
upon adding --enable-PROXIMITY, I get HAL_PROXIMITY_ENABLED redefinition error.

1 post - 1 participant

Read full topic


Is there a speed limit in Autopilot mode?

$
0
0

Hello.
I am unable to get the speed with the engine powered helicopter that has been working with you guys for some time now.
Looking at the log data, it appears that the limit or once deceleration occurs at about 60 km/h, just before the set speed value.
What is causing these?
Thank you.

1 post - 1 participant

Read full topic

Drone in AltHold mode flies up to 100 meters by itself

$
0
0

Good day, dear community! I encountered such a problem: I use the AltHold mode in the Arducopter firmware, and the drone always takes off to a height of 100 meters when Arming. I found a parameter in the mission planner application in the Actions tab where I can set 0, reboot the flight controller, and the drone no longer flies itself to a height of 100 meters. But this has to be done every time after restarting the drone, is there some parameter that will do this once and for all, so that my drone does not fly immediately to a height of 100 meters? Thanks for your answers!

1 post - 1 participant

Read full topic

Map is blurry in Mission Planner

$
0
0

Hello

I’m having a problem with the map in Mission Planner. When I zoom in or out of the zoom, the map isn’t clear. The map is pixelated, and the map text is blurry, as if I were using an 8-bit display.

I’ve cleared the map cache, changed the screen resolution in Windows, changed the scaling in Windows, and tested all map providers.
Google map is clear and precise.

What can I do now?

Thank you very much

1 post - 1 participant

Read full topic

Drone log analysis for smooth flying

$
0
0

Dear All,

Thanks for making this wonderful community.
I am building the hexacopter drone and having some problems in making it stable.

I want to know you all experience guys feedback on it.

I have done the flight in Althold mode and found the drone is drifting away faster without any pilot stick, I done the log analysis and found out that anticlockwise motors are running faster.

This is the log link for your reference: 2025-03-25 08-35-22.bin - Google Drive

Logically all motors are run almost same in Althold hovering. I think this is related to some leveling problem. But I want all your opinions and if this is the leveling problem then I did my best to do the motor and level calibration and I don’t know what more I can do so please suggest me the best way for motor leveling.

Really looking forward to hearing back from you all.

Thanks

2 posts - 2 participants

Read full topic

My Quad spins and EKF attitude is bad

$
0
0

Hi All,

My Quad is F450 frame, LiPo 3S 6500 mAH 60C, 10" propeller , MPU9250, QMC5883l, M10 GPS, OBAL flight controller,

I calibrated the Quad and seems everything was fine.

when I tried to fly it starts to spin (Yaw) before it leave the ground then it gave EKF issues so I stopped it :

here is my Zipped logs :

log_0_UnknownDate.bin.zip (1001.5 KB)

can someone point me to a solution ? I am completely stuck.

1 post - 1 participant

Read full topic

Object Attaching/Dettaching For Cargo Drone

$
0
0


I want to make an cargo mission in gazebo. I need a plugin for attaching/detaching the delivery to drone. Visualizing the mission is enough for me. Which plugin should I use? any guidance would be appreciated. (ROS2, Gazebo Garden)

1 post - 1 participant

Read full topic

RTK GPS Correction (Fixed Baseline) on Mission Planner


Effect of Calibrate Level on VTOL Performance with Different Surface Angles

$
0
0

In the Setup section, under Accel Calibration/Calibrate Level, I wonder how my VTOL’s performance will be affected in two cases:

  • one where I place it on a flat horizontal surface
  • another where I place it on a surface tilted at 5 degrees

before performing the Calibrate Level.

1 post - 1 participant

Read full topic

Feeding Lua Float into MAVLink Encode Gets NIL Ouput

$
0
0

I am trying to read CAN data with a Lua script (which I can do successfully) and then encode a MAVLink message with the data that I am pulling from that CAN input. I am running into an issue where I read in the CAN data successfully (the printed value is what I expect), but when I try and encode the MAVLink message, I get a “expected number, got nil” error in the mavlink_msgs.lua file (line 158 where it tries to execute the “pack” function). I have verified that I am getting the correct message ID (225 for EFI_STATUS) and that the cht_val is of type “number” which as i understand it, is a float as far as lua is concerned (which is also what the “encode” function is expecting for all of its table values). Here is a snippet of my code that I am working with:

– Load CAN driver1. The first will attach to a protocol of 10, the 2nd to a protocol of 12
– this allows the script to distinguish packets on two CAN interfaces
local driver1 = CAN:get_device(5)
–local driver2 = CAN:get_device2(5)
local mavlink_msgs = require(“MAVLink/mavlink_msgs”)

– Verified is printing 225
local EFI_STATUS_ID = mavlink_msgs.get_msgid(“EFI_STATUS”)
gcs:send_text(6, "EFI msg ID = " … tostring(EFI_STATUS_ID))

local msg_map = {}
msg_map[EFI_STATUS_ID] = “EFI_STATUS”

– Unclear what to set this to for my situation or how much it matters
mavlink:init(20,1)

– Verified is printing “true”
local rec_id = mavlink:register_rx_msgid(EFI_STATUS_ID)
gcs:send_text(6, "receiveID? = " … tostring(rec_id))

– convert binary
function tobinary(num)
local binary = “”
for i = 8, 0, -1 do
binary = binary … ((num & (1<<i)) > 0 and “1” or"0")
end
return binary
end

– cht value, 1000
function show_CHT(dnum, frame, idx1, idx2)
local var = tonumber((frame:data(idx1)*256 + frame:data(idx2)) * 0.1)
gcs:send_text(6,string.format(“CAN[%u] msg: CHT = %f C”, dnum, var))
gcs:send_named_float(‘ECHT’, var)
logger:write(‘ECHT’,‘CHT(C)’,‘f’,var)
if var <= 90 then
gcs:send_text(0, “Cylinder Head Temp LOW”)
elseif var > 90 and var <= 130 then
gcs:send_text(6, “Cylinder Head Temp in range.”)
elseif var > 130 and var <= 170 then
gcs:send_text(1, “Cylinder Head Temp HIGH”)
elseif var > 170 then
gcs:send_text(0, “Cylinder Head Temp CRITICAL”)
end
return var
end

local CHTrate = 50 – CHT, MAP, voltage, throttle percent
local RPMrate = 60 – RPM, fuel flow rate
local baroRate = 1000 – barometer
local MATrate = 500 – MAT, coolant temp
local AFRrate = 10000 – AFR, warm up enrichment
local currRate = 1000 – Gen Temp, ECU Temp, Throttle Servo Current, Duct Servo Current, Fuel Pump Current
local EWTRate = 1000 – EWT, Fuel Remaining
local IngRate = 2000 – Ingnition and Injector Current
local SysStaRate = 1000 – System Status
local EngStaRate = 1000 – Engine Status
local CHT_time = 0
local RPM_time = 0
local baro_time = 0
local MAT_time = 0
local AFR_time = 0
local curr_time = 0
local EWT_time = 0
local Ing_time = 0
local SysSta_time = 0
local EngSta_time = 0

– get time in ms
function get_time_sec()
return millis():tofloat()
end

function update()
– Eventually I will read in all the engine data, but for now I am focusing on CHT which is why all – the others are commented out.
frame = driver1:read_frame()
local currentTime = get_time_sec()
if frame then
local frameStr = tostring(frame:id())
shortStr = string.sub(frameStr, 7)
local frameNum= tonumber(shortStr)
if frameNum == 5520 then
if currentTime - CHT_time >= CHTrate then
–show_voltage(1, frame, 0)
–show_TPS(1, frame, 1)
–cht_val = show_CHT(1, frame, 2, 3)
cht_val = tonumber((frame:data(2)*256 + frame:data(3)) * 0.1)
–show_MAP(1, frame, 6, 7)
CHT_time = currentTime
gcs:send_text(0, "cht_val = " … tostring(cht_val))
gcs:send_text(0, tostring(type(cht_val)))
end
end
end
local msg, chan = mavlink:receive_chan()
gcs:send_text(6, "receive chan = " … tostring(chan))

local efi = {}
        efi.ecu_index = 0
        efi.rpm = 0
        efi.fuel_consumed = 0
        efi.fuel_flow = 0
        efi.engine_load = 0
        efi.throttle_position = 35
        efi.spark_dwell_time = 0
        efi.barometric_pressure = 0
        efi.intake_manifold_pressure = 0
        efi.intake_manifold_temperature = 23
        efi.cylinder_head_temperature = cht_val
        efi.ignition_timing = 0
        efi.injection_time = 0
        efi.exhaust_gas_temperature = 0
        efi.throttle_out = 0
        efi.pt_compensation = 0
        efi.health = 0
        efi.ignition_voltage = 0
        efi.fuel_pressure = 0

-- This line throws the errors
mavlink:send_chan(0, mavlink_msgs.encode("EFI_STATUS", efi))

if (msg ~= nil) then
    local parsed_msg = mavlink_msgs.decode(msg, msg_map)
    if (parsed_msg ~= nil) then
        gcs:send_text(6, "parsed msg id = " .. tostring(parsed_msg.msgid))
    end
else
    gcs:send_text(0, "Message = NIL")
end    

return update, 10

end

return update()

1 post - 1 participant

Read full topic

Strange reverse rc out in ACRO mode

$
0
0

Hello everyone, I apologise if this topic is already covered, I’ve looked everywhere and not found an answer.

So I’m back on arduplane after about a decade of life based distraction and have found a small problem I cannot seem to fix.

I’ve uploaded a log to google drive with the link below. During this realflight SITL flight in ACRO mode I did four relatively large up and down pitch commands with wings level and all is fine. However, during the following three very small pitch up commands it seems rcin vs rcout is overall opposed, giving an obvious pitch down result. At the same time attitude demanded vs actual attitude are pretty close, so it seems the computer is getting what it thinks it should be.

Stall speed is approximately 10m/s and this manoeuvre was done at 19m/s, having read the section on stall prevention I don’t think it effects ACRO mode.

At the moment I simply don’t know what is causing this, any help and wisdom will be very gratefully received.

Thanks, Ed.

1 post - 1 participant

Read full topic

Understanding COMMAND_LONG

$
0
0

Is the following statement correct ?
The user has a choice to send a MAVlink message explicitly or instead encode the same message inside a COMMAND_LONG.
Both methods will have the same effect.

1 post - 1 participant

Read full topic

Integrate optical navigation system :smiling_face_with_tear:

$
0
0

Hello, I am a young programmer with a passion for aviation! And I ask you to help me with integration of optical navigation system! I didn’t know where to write about the problem, so I decided to write here.

I want to integrate an Optical Navigation System that sends longitude and latitude with the following command in a Pytohn script over MavLink:

while True:
    mavserial.mav.command_int_send(
        target_system=1,
        target_component=1,
        frame=MAV_FRAME_GLOBAL,
        command=MAV_CMD_EXTERNAL_POSITION_ESTIMATE,
        current=1,
        autocontinue=1,
        param1=time.time(),
        param2=0.0,
        param3=1.0,
        param4=0.0,
        x=int(56.0 * 1e7),
        y=int(34.0 * 1e7),
        z=float(“nan”),
    )

I went through the standard mavlink commands and thought of accepting SON’s mavlink messages in the standard way and changing the position accordingly, but so far I’m stumped: the values don’t change. Although debug messages indicate that all processing steps have been passed (although I’ve set some of them by force)

Link to the branch: GitHub - VermennikovMV/ardupilot at EK3_ALL_ENABLE_+_Debug

Now I will describe my ideas and what I did:

  1. First of all (as I found out) the message starts processing with the command handle_command_int_external_position_estimate from the file GCS_Common.cpp. And here I noticed something wrong at once, because the AP_AHRS_POSITION_RESET_ENABLED macro was shown inactive in VSCode because of HAL_PROGRAM_SIZE_LIMIT_KB <= 1024. And in the code HAL_PROGRAM_SIZE_LIMIT_KB always seems to be greater than 1024. In general, I decided to forcibly enable the macro to make the function of reading mavlink-package work.
  2. Then the message was processed in handle_external_position_estimate and then in EKF3.setLatLng(loc, pos_accuracy, timestamp_ms);. The NavEKF3::setLatLng function again contained the EK3_FEATURE_POSITION_RESET macro, which was specified as inactive. To make this macro active, I forcibly set EK3_FEATURE_ALL = 1 (it was enabled by default from the replay or standalone build condition, but we don’t build that).
  3. After that the message was processed in the NavEKF3_core::setLatLng( function from AP_NavEKF3_PosVelFusion.cpp, where it returned false. I decided to set PV_AidingMode and initialize validOrigin through appropriate functions. And I made deadReckonDeclare_ms 0 so that the flase condition would not occur.

But all this didn’t give any result: the message passes all the processing stages, but the coordinates don’t change. Perhaps I missed something. I will be very grateful for your help!!!

1 post - 1 participant

Read full topic

Viewing all 46721 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>