Servers by jDrones

UAVCAN for Hobbiests

uavcan
magnetometer
arducopter

(OlliW42) #21

ok, so it’s me who has to define - and tell to the user - how the “x arrow” is related to the chip marking … that’s cool
so I’ll choose the “3DR convention” and will do an internal correction

many thx for your detailed answer

will be interesting to hear how this DEV_ID is fabricated …

btw, the 128 bit unique ID I’ve constructed from the STM32’s 96bit unique device id (the missing higher bits are duplicates of lower bits) … is that an acceptable procedure, or what would be recommended?


(Pavel Kirienko) #22

Any unique ID is acceptable as long as it is globally unique, so yes.


(OlliW42) #23

haha … well, you know, from within my little world it’s really hard to claim that a number is globally unique, and I actually doubt that the STM32 ids are disjunct from other “globally unique” number sets one could draw a number from … but I’m happy to hear that it’s considered sufficiently unique :slight_smile:


(OlliW42) #24

next set of questions/points

Following the demo.c I’ve implemented the dynamic id allocation feature, and with the GUI Tool it just works nicely. However, I can’t get the AuavX2 to perform the dynamic ID allocation. Yes, I have set BRD_CAN_ENABLE = 2, following the Zubax GPS Tutorial, and an (older) comment in an issue. I note though that this is not in the docu. When, while having the AuavX2 and the node running, I start the GUI Tool and let it do the ID allocation, then things also work, i.e. the node is getting an ID, and the AuavX2 finds and uses it.
Is BRD_CAN_ENABLE = 2 working in master?
What might I do wrong?

I’d like to bring up again the DEV_ID question raised few posts in the above, in case it got buried by the other posts :). I find it quite relevant, from a practical perspective.

What I don’t like with AP and it’s current Uavcan support is that it is kind of impossible to see the status of the node, e.g. if it has been detected, what ID it is, etc… I think a page with info on all sensors on it, such as it is found for other flight controllers, would be appreciated not only be me.

:slight_smile:
Cheers, Olli


(Pavel Kirienko) #25

I suspect that the new CAN stack on APM does not yet support dynamic node ID allocation. @EShamaev is it true? Do you know, perchance, when this feature will be supported? Thanks!


(OlliW42) #26

I would be totally happy with that, IMHO that’s not the most pressing feature … (IMHO the whole sensor discovery and health management (all buses) is much more pressing, to me the logic looks quite screwed up)

it would be good to know though
I’m working on parameters in the uc4h mag node, so its id can anyhow be configured


(OlliW42) #27

brief update:

got some more transceivers today, and could now equip all three nodes, the AuavX2, the uc4h mag node, and the uc4h slcan adapter with transceivers, and things work perfectly as they should.

So, the issue was unequivocally a hardware bug in the AuavX2, as EShamaev suspected.

Thx a lot for the help.

The calibration issue and DEV_ID thing are still dangling around, but they don’t prevent operation. The node supports dynamic id allocation, supports all the parameter services and in fact is configurable, and of course emits the mag field message with proper orientation and scaling. I’ve also designed pcb boards for the mag node and the slcan adapter, which will come however only in few weeks. So, I think I’m quite close to an actual test … time to get the winter dust off my copter :slight_smile:

cheers, Olli


(EShamaev) #28

Dynamic ID allocation is not supported, but will be right after multiple CAN interfaces are finished. I expect it to be few weeks.
As for the Dev ID field this work is now in progress and will be based on UAVCAN ID and type of device.


(OlliW42) #29

dynamic ID: fantastic
albeit no “pressure” from my side, I myself am happy also with fixed ID’s
thx for the clarification

Dev_ID: fantastic
you certainly know the unique id thing, I would think that this maybe could also be digested into the dev_id in some way … as much as I understand (and which would match my bill) the Dev_Id is also used to determine if a calibration is valid for the attached device (although this seems to be broken, but there is such a comment in the code) … so it would also have to be node specific to some extend

mag calibration issue: comments on that ?


(EShamaev) #30

As for dynamic ID I must say that personally I am strongly against this feature.
As for Dev_ID, you are absolutely right, it is used to distinguish calibration.


(OlliW42) #31

Dev_ID:
ok

so, I herewith officially report that this feature is then broken !!

(and I consider that a very serious issue, as it affects safety of the vehicle). I can provide screenshots, if needed, but I think it is trivial to reproduce for anyone: reset all magcal values, do mag cal with only an internal mag available, connect external mag, redo mag cal, disconnect external mag, and check mag cal values …

mag calibration issues (reported some posts up): comments on that? :smiley:


(EShamaev) #32

Working on this. Major update with several CAN interfaces is coming and this will also be solved in it.


(OlliW42) #33

hey Folks,

just a kind of a status report: The project made some great progress, but stalled again.

I’ve extended the uc4h node to also handle gps. I.e. you can connect it now to a standard gps+magnetometer unit, and get both data delivered via UAVCAN. Also, the parameters (and other stuff) became useful.

The UAVCAN GUI Tool seems to be quite happy with my node and slcan adapter. On an oszi signals look good, also the debug outputs I can activate on an additional uart port of the node. So I considered getting “serious” and doing the next steps towards an actual flight.

I thus flashed the flight controller (AUAV-X2 1st batch) with AP3.6-dev (5.5.), fetched the latest MP, and started setting up the flight controller for a real flight. In the course of that I found that the ardupilot node is extremely “unstable”. I thus tried AP3.4.6, presuming this to be a more stable version. Behavior is more reliable, but often the pixhawk node will disappear after ca 10 secs.

I do have some confidence in, especially, my SLCAN adapter. It’s such as simple hardware and code thing that it’s not obvious how it could make the ardupilot/pixhawk node to disappear, while being happy with the uc4h node. On the other hand, one rightfully could argue that my earlier issues was a hardware issue, so one could suspect that here too.

Anyway. The situation is weird and I can’t figure it out as it seems. Whatever the reasons are, I’ve given up on that project. Was IMHO a nice idea, but UAVCAN and AP is not DIY, at least currently.

I’d like to seriously thank EShamaev and Pavel, especially Pavel. Keep up your great work.

Cheers,
Olli


(lucamax) #34

Sorry you decided to give up, anyway I was unable to use my Zubax gps and compass with AC 3,5.5 while with 3.5.4 it was initialise correctly.


(EShamaev) #35

I am very sorry to hear that you gave up.
As for node disappeared, I advise to check everything one more time (hardware and software) and also to use latest master version.
I have now almost 5 hours of flight time with Zubax and also 6 UAVCAN controlled servos (8 nodes total in network) and did not notice any hangup or node disappear.


(Andrey Kolobov) #36

Folks, this is a long complicated thread, so apologies for finding an answer to my question in it if it is there… This issue seems to be related to the one I’m having and about which I have even filed a bug (https://github.com/ArduPilot/ardupilot/issues/6400).

It’s quite simple – the Zubax V2 GPS used to work with ArduPlane on Pixhawk until February-March or so. To get it to work, I set BRD_CAN_ENABLE to 2, GPS_TYPE to 9, and the GPS ran just fine. However, since at least ArduPlane 3.8 beta 5 it hasn’t been working with the above parameters anymore.

How do I get to work again?

Thanks,

Andrey


(lucamax) #37

akolobov , not sure is the right place to ask, but I notice too that with latest Arducopter beta 3.5 Zubax do not work anymore.

It would be nice if the manufacturer of Zubax will find a solution.


(Pavel Kirienko) #38

@akolobov @lucamax The new CAN stack in the APM does not support dynamic node ID allocation yet, so you will need to configure Zubax GNSS to use a static node ID. Any value from 2 to 125 will work fine. The configuration parameter for node ID is uavcan.node_id, and the commands to set it are as follows:

cfg set uavcan.node_id 42
cfg save

Paging @EShamaev


Bad baro health
(Andrey Kolobov) #39

Thanks @Pavel_Kirienko, could you clarify a bit though: where should I run these commands? From Mission Planner somehow?


(lucamax) #40

Thanks @Pavel_Kirienko.

akolobov, you must use the Command-line interface, as explain here https://docs.zubax.com/zubax_gnss_2

I suggest to use Putty , as explain here https://docs.zubax.com/usb