Compass issues, again and again and again

I am not saying supporting new stuff isn’t important, i am just saying that if compass problems keeps on showing up there are 2 options:

1 - we are a bunch of dumbs (me included)
2 - there is something to correct in the magnetometer setup

In my understanding there is no point in supporting new stuff unless what is there is consolidated and works good, in my opinion magnetometer stuff is not at the moment. As said it is just my opinion.

Keep on saying that magnetometer stuff is ok as it is and negletting difficulties in it, ignoring all the threads about the subject is just turning head away in my opinion. But, as said, i am glad everything in magnetometer setup is nice and easy and works excellent, it is just me and some other hundreds people too dumb for the system.

regards,

Corrado

no, this is NOT just your opinion. Definitely not. And it’s not the first time it was mentioned or good proposals were made. You have analyzed the situation quite correctly, IMHO. But you also have seen what the standard response is: It’s all perfect and cool.

and the “funny” thing is, all that multi magnetometers (and in conclusion all the hazzles with them) are not really useful for anything (except to check your primary mag is calibrated) … once it decides for one at start up it sticks with it, whatever what

and you have not yet tried to have two uavcan barometers … if you want real fun you do that :wink:

Nobody is saying that. I’m a dumb user as well - I hate setting up the hardware and I’m not very good at it, and I often make mistakes. I hate the compass dance, hence why the link above is relevant to this - it will be a major improvement to new users not to have to do the dance to calibrate the compasses. I’m personally saying that I’ve never had any problems selecting which compasses to use, and I’ve shown a screenshot from QGC to show that it looks easy enough to me. Why don’t you show a screenshot to show an example of where it isn’t good enough? Perhaps then the GCS developers can improve it. Ranting and raving here doesn’t do any good at all - specific examples either raised as github issues or in the correct section (I don’t think this has anything to do with Ardupilot so far, rather the GCS software) will do good.

ps - as a general comment, IMHO, there are a lot of things wrong with setting up Ardupilot, and from a new user perspective that could be improved (just try setting up a plane as a newbie - I’m about 4 years into Ardupilot and I still can’t get a plane flying without smashing it to bits). But the core developers around here have their own priorities which are generally working on the core aspects of the code or whatever companies/sponsors pay them to add. You can’t fault them for what they decide to do - it’s their life, their choice and they have to make livings as well. If you don’t like something, step up and fix it, or pay someone to fix it, or raise constructive user requests/issues/threads to discuss it. A lot of the problems that get dragged up again and again tend to be user error, often stemming from unclear or missing documentation.

Anyone - including you - can contribute to and improve the documentation. If the documentation and guides around setting up compasses aren’t clear enough for a new users to follow, then help to improve them. If you feel the software needs to be improved to stop the same thing being brought up again and again by new users, then either improve the software yourself with a PR, or if you don’t have the skillset then raise a specific issue in github against the software, and try and nicely point the relevant developer towards it. I still don’t understand what your particular problem is from reading this thread.

2 Likes

Ok everything is perfect, my bad in trying to say what i think it should look like to be easier and better. Much better to implement the latest load of pixracer clones.

Regards,

Corrado

You obviously haven’t read or understood what I’ve written - I’m trying to help you. If you can’t have a sensible discussion, you’re in the wrong place.

No need for a discussion, magnetometer setup sucks big time in my opinion, i wrote here what i think it should look like. Nothing is going to change about it? Than great, as i said i’ll be happy with the new, super, duper, latest implementation of chibios on a 20 dollars puxracer clone and be done with it

2 Likes

As @fnoop say I think QGC does this already, mission planner also but is is less intuitive. You can find the device ID of each of your attached compasses in the parameters here.

I think the improvement your suggesting would be to display the device ID from the parameters on the compass setup page in the ground control software?

1 Like

If you attach 2 external compasses and have 2 internal (cube 2.1), there is no way to have the second external picked up, no matter what (uavcan). Worst thing is that you don’t even know if the system sees it or not.

There is really no point in continuing telling me it is fine as it is. If it was there wouldn’t be tons of mag problem on the forum again and again.

regards,

Corrado

p.s. In the end as said 100 times is my only opinion, if it is ok as it is than fine with me.

Just my two cents, there are other flight boards out there, maybe give them a try. The one downside I see to that is that there is not nearly as much support out there if you do decide to switch to another flight controller. Agreed it could be a bit easier to setup compasses in MP but still not bad, I haven’t had many compass issues as of late after moving mine around to find the best spot on the airframe for it, each person’s setup is going to be different and some investigating is needed to find the best location.

I’m trying to understand your problem so we can fix it.

I have had a look at the code, the DEV ID parameter seems to be a number that denotes the compasses type and the protocol its connected over. So if we published a key, or better yet coded this into ground control software you would be able to tell which compass it which.

Alternatively we could do a message on boot as for GPS, probably just for external compasses. That provided the compass type and number. This would probably the easier solution and would, I think, solve your issue?

In this case the external compasses are detected first (compass 1 and 2) so you will be left with only one internal (compass 3) as Ardupilot supports a maximum of three.

1 Like

As already said, if you don’t see the problem than is probably me too dumb for arducopter and barely smart enough for dji

Regards,

Corrado

Did you try to connect 2 uavcan external compasses? Try to have the system recognize them as 1st and 2nd, good luck…you’ll be really lucky if you understand wich one of the two was picked up by the system…best thing is that it doesn’t pick up the same one each time and guess what, normal user with no phd in programming is stuck, but as said it is wonderful as it is and we have all the leds working on the latest 20 dollars pixracer, isn’t that wonderful??
And do not give me the bs that dev do their work and we do nothong, because we risk our machines daily to give feedback as best as we can on any new release.

1 Like

Some time ago Randy posted a link to a Python script that decodes the device ID. It might be helpful. Attached and used as follows:
“decode_comp.py -C xxxx” where the xxxx is the device ID.
decode_comp.zip (990 Bytes)

2 Likes

Corrado, you’re correct that there are a lot of posts about compasses. Mounting location, orientation, interference, calibration, etc, can all be difficult, and different for every copter. I’ve got at least a few posts around the web asking for help w/ magnetometers.
But, your specific issue might not be a common one. I doubt a lot of people have your exact flight controller and two uavcan compasses.
You could try qgroundcontrol, as fnoop mentioned. See if that shows the same issue w/ randomly displaying different compasses as 1,2,3. External are supposed to be first. Also be sure everything physical is OK. No intermittent connections or loose wires, etc. Then if it’s still not working, make a post w/ detailed info about compass types, device ID’s, how they’re connected, etc, and maybe you can help the developers find the issue.
Otherwise, I think it’s unfair to say not enough work is being done w/ the magnetometers.
It’s always getting better. Mounting location and ability to handle interference has gotten better over the years. Automatic orientation detection was recently added, and now the in flight learning. Those are huge improvements.
Plus, to your comment about supporting other boards, the people adding support for new FC’s are generally not the same people doing the core development on things like the magnetometers. Adding support for new FC’s is not slowing the development of anything else. If anything it will eventually lead to faster development as more people are interested in using and contributing to the project.

2 Likes

I’m sure there’s more that we can do to make the compass setup better/easier. I’m also sure that it’s one of the major issues that users face.

I have 2 things in mind that I hope to get to in the near-ish future:

  • add the individual compass device ids to the parameter descriptions so that a user can look at the COMPASS_DEVID parameter and instead of just seeing a number, they can see a description of the device and bus that it’s ok
  • document the procedure for connecting two external compasses (like two Hex HERE GPSs).

There is a 3rd item I’d like to do involving an EKF enhancement to make it better able to estimate the vehicle’s heading after takeoff. I think with this we could possibly relax some of our compass checks because we could deal with a bad compass better. This project will require some signficant funding however to get done (about $30k). I’m hoping that we can convince a partner (or two or three) to fund this but I haven’t managed to convince them yet. I’m sure it’ll get done eventually it’s just a matter of when…

3 Likes

As i said i don’t think it needs a big work on to make it a lot better and don’t give the user the sensation of being blind.
I think if the system could show all mag attached and let user just check what they want to use, in a clear way with no guessing.

Corrado

Tried the new bitmask and loaded only uavcan and the driver for the mag chip on the zubaxx datasheet (LIS3MDL) and i get a “bad compass health”.

Than i loaded all the drivers as it was previously (curiously by default LIS3MDL was the only one not loaded) and all worked again, but system said i needed a compass calibration.

Obviously i have never been able to see the 2 external compasses, that, in theory, should show up and be detected as first and second.

The more i dig into this the less i understand the incredible logic behind it, it is just a mess.

It is my strong convincement that the magnetometer, being one of the fundamental sensor, should be way way way easier to setup and more understandable!!!

Really really do not understand why this stuff is not on top priority list, really puzzles me.

are your two external mags the same? Maybe they have the same address so the code cant tell the difference between them.

Most compass setups are fairly painless, so long as its mounted far enough from interference, especially with the new auto orientation feature. I think its far to say using dual CAN compass is very unusual. Out of interest why do you need two external compasses?

edit: the cube has two can bus’s i think, have you tried each compass on separate bus?

I have tried everything. Address of the 2 compasses are obviously different.

Probably you are right about painless compass setup, so it is almost incredible it is one of the most discussed argument. They must be all dumbs like me.

Just to point it out, it is not a matter of pain or not but is a feeling of complete confusion on how it works. If something goes wrong it becomes an hocus pocus kind of thing, but again, it is probably me and compass stuff is GREAT as is.