Hi all,
I am using latest version of MP and the download of parameters works fine (I think it is using mavftp becasue it takes a very short time). But … I have a companion computer (using Maverick image) with a D435i realsense 3d camera that sends OBSTACLE_DISTANCE messages trough the mavlink serial link. If the camera is already up and running, the downloading of parameters in MP got stuck and takes for ever, it never ends.
I have reduced the message rate to 7.0Hz just in case, but still does not work.
At the same time, I have tried to run mavproxy in the companion computer and it is able to retrieve all the parameters (see the next screenshot, mavproxy is in the windows to the left, the MP window is shown to the right. There are continous messages “get param 1 by 1 - got 0 of 1”. forever.
Thankyou all for your replies!
The cube black FC (rover 4.1.1) is connected via a serial link (921kbps) to a Raspberry pi 4 running the “maverick” image, it has a mavproxy instance running and I connect to the FC through a 4G/LTE connection, using a TCP port of the companion computer.
The thing is, it works flawless, it connects quickly and download the parameters (using the FTP method) very fast. It works both ways because I can arm , change modes …
I don’t think the link is overloaded because I can see the message rate in the mavlink inspector and it is ok.
When I run the camera script, which injects OBSTACLE_DISTANCE messages at a rate of 7 Hz , everything keeps working, I can see the messages in the mavlink inspector window. However, if I disconnect MP and tries to connect from MP while the script is running, the download of parameters does not work. This issue prevents having the camera script running after boot, i have to run it mannually after connecting MP.
if, at the same time, I run another instance of mavproxy from the command line of the companion computer, and connects to the FC through the same TCP port , it works, the mavproxy terminal shows that it has downloaded all the 849 parameters very fast.
Could it could be related to the way that MP download the parameters? can I tune that?
Thankyou for your help,
Adolfo.
What are the TargetSysID and TargetComponentID of the obstacle_distance messages sent by the companion computer ? Normally you should not see those messages in the GCS Mavlink Inspector… unless the TargetComponentID is zero instead of 1.
Thankyou @Michael_Oborne for your reply. I explained myself badly, the script is run in the companion computer, it is an included python script in the Maverick image which connect to a D4xx Realsense camera and sen the OBSTACLE_DISTANCE messages. I not running any script inside the pixhawk.
I keep looking for possibilities.
Thankyou!
Adolfo.
Thankyou @Eosbandi for your reply. I don’t know how to know those IDs, but here it is the screenshot of the mavlink inspector, the messages appear under “comp 93”, those from the FC are under “comp 1”
What I have done is recording the debug window from the start of MP WITH and WITHOUT the OD messages in the mavlink link. I can see there things like:
INFO MissionPlanner.MAVLinkInterface - ID sys 1 comp 93 ver3 type ONBOARD_CONTROLLER name GENERIC
which I guess are from the script in the companion computer. At some point, MP decides to get the parameters “get param 1 by 1” or using “GetFile 1-1 @PARAM/param.pck”, but I don’t know why.
Do you suggest that it could be related to the IDs the script is using? I have have a look to the source code:
but I don’t see a clue. I see the script has a heartbeat message, I am wondering if, depending of the Id or the presence of the heartbeat message, MP tries to download the parameters from the wrong “vehicle” ???
Thanks again for your help!
Adolfo.
P.D.: text files with the starting messages of MP WITH and WITHOUT the OD messages in the link:
SOLVED!
I just removed the heartbeat message from the python script d4xx_to_mavlink.py and now the parameters are downloaded perfectly. It seems that MP tried to get the parameters from another ID when the heartbeat is present.
Thankyou all for your insights!
Adolfo.
Thankyou! this is very helpful, as I guess that all scripts in that image (for example for dead reckoning with a T265 camera will suffer the same problema.
thanks!
@LuckyBird could you remove the heartbeat from master as it is not used at the moment and it has Mission Planner getting stuck on this device , hence blocking the main vehicle access to MP.
I tried a different definition according to MavLink definition:
# send a heartbeat msg
conn.mav.heartbeat_send(mavutil.mavlink.MAV_TYPE_ONBOARD_CONTROLLER,
mavutil.mavlink.MAV_AUTOPILOT_GENERIC,
0,
0,
0)
But mission still waiting for this device.
@Michael_Oborne do you filter connection by controller types ?