raul-ortega / u360gts

The Universal 360º Continous Rotation Tracker System for Drones (UAVs, RPAs and FPV).
http://www.u360gts.com
GNU General Public License v3.0
217 stars 58 forks source link

Update Mavlink to Version 2 #37

Open edsellar opened 5 years ago

edsellar commented 5 years ago

Vast majority of Mavlink instances are using version 2 of the protocol. Would be good to link to the version 2 library for builds and replace v1.

edsellar commented 5 years ago

I went ahead and updated a branch with v2 of the mavlink spec. I ran into some initial build issues. Mainly in the mavlink.c file (line 100) as v2 spec has 18 arguments that need to be populated and the v1 spec has 13. Simply adding 5x, 0, builds fine but what that means in terms of use it yet TBD. Any thoughts on this would be helpful since changing the mavlink version was a 20 sec drag and drop proposition but enables use from the mavlink side of only stipulating to broadcast mav v2 from the vehicle. @raul-ortega what are your thoughts on this. The file they link to are the mavlink_msg_gps_raw_int.h in /common.

edsellar commented 5 years ago

Any thoughts on this? I’ve been tryin to use with PX4 (which is mavlink) and mav protocol v2 but the v2 is problematic with the current way the u360gts is setup using the v1 spec.

Happy to do whatever you need on my end.

Maybe even mavlink as a submoduke if the user is compiling the code themselves (less likely but will always be up to date).

What would you like to see to get this implemented? A pr?

raul-ortega commented 5 years ago

Are you using Ardupilot on your PX4? In Mission Planner you may select mavlink v1 protocol for the telemetry port you desire.

edsellar commented 5 years ago

Px4. And mavlink v2 is old so wondering why not update to v2 spec?

edsellar commented 5 years ago

(Px4 stack on Pixhawk)

raul-ortega commented 5 years ago

Px4. And mavlink v2 is old so wondering why not update to v2 spec?

Because you can select both versions in Mission Planner. Implementing v2 means spending memory in something that can be solved quite easy from the source. Other flight controll sofware only uses v1. Implementing both versions would be quite expensive in terms of memory usage.

edsellar commented 5 years ago

Then you should keep a branch with v2. Even if you select the protocol for the mav stream in each specific port (which you can do on px4 and qgroundcontrol) the issue is that if you are using mavlink over the main telemetry stream to drive the tracker and to receive telemetry data for the vehicle, it won’t work because you are forced to use v1 spec which even in new serial modem firmware, make you upgrade. I’ll maintain it if you don’t want to but we really need to see a v2 spec to make it truly robust, adaptable and work. V1 is going to get phased out anyway since the dialect is not fully defined, hence v2.

I’ll compute all here and keep it working for people if you don’t want to, just need a few things on submodukes and how you immerse the library in.

This really is needed.

raul-ortega commented 5 years ago

Ok, let's try to do it.

Please, could you provide a zip file, or a link to the library you exactly would like to use?

I also need version number and publish date information in order to document it.

El mié., 22 may. 2019 2:12, edsellar notifications@github.com escribió:

(Px4 stack on Pixhawk)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/raul-ortega/u360gts/issues/37?email_source=notifications&email_token=ADCWBYC6TRDP7AOSCHBLEWTPWSFWRA5CNFSM4GKIKZW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV5RBBI#issuecomment-494604421, or mute the thread https://github.com/notifications/unsubscribe-auth/ADCWBYF7P44354A6GQUFUI3PWSFWRANCNFSM4GKIKZWQ .

edsellar commented 5 years ago

Great to hear that! Since there is no stable branch ever designated let’s just use master which has its last update 5 days ago. So just master as of today:

https://github.com/mavlink/c_library_v2/tree/master

edsellar commented 5 years ago

Thanks Raul - you do some amazing stuff and I’m really happy to hear you’re willing to give this a try. It will make such a difference. I’m standing by to help however needed.

edsellar commented 5 years ago

Should we mark this as open. What's needed from here? Happy to assist if youd like.

edsellar commented 5 years ago

If you want to give me a rough idea, I’ll start trying to implement this. Can I just replace the v1 library with v2?

raul-ortega commented 5 years ago

That's the idea, replace the v1 with v2 library and compile it. The library is placed at this folder.

If it doesn't work properly, you have to modify this file mavlink.c in order parse the correct mavlink message ID.

pki791 commented 2 months ago

I compiled the NAZE target with MAVlink v2 support by the above description. I only used/tested the incoming telemetry from an ExpressLRS backpack ESPNOW reciever on ESP32-C3 SuperMini. That works very good.

So my actual setup is the ExpressLRS TX sends telemetry via its integrated ESP backpack as ESPNOW frames. That frames get recieved by an ESP32-C3 SuperMini and fed into the serial port of u360gts.

amv-open360tracker_NAZE_mavlinkv2.zip

I released also a version with SH1106 LCD support and MAVlinkV2 https://github.com/pki791/u360gts/releases/tag/MAVlinkV2

raul-ortega commented 1 month ago

@pki791 One friend of mine is going to test your version of the firmware in a real flight, I hope I get good news from him.

pki791 commented 1 month ago

Cool, i hope same, fingers crossed.

Bendau commented 1 month ago

I compiled the NAZE target with MAVlink v2 support by the above description. I only used/tested the incoming telemetry from an ExpressLRS backpack ESPNOW reciever on ESP32-C3 SuperMini. That works very good.

So my actual setup is the ExpressLRS TX sends telemetry via its integrated ESP backpack as ESPNOW frames. That frames get recieved by an ESP32-C3 SuperMini and fed into the serial port of u360gts.

amv-open360tracker_NAZE_mavlinkv2.zip

I released also a version with SH1106 LCD support and MAVlinkV2 https://github.com/pki791/u360gts/releases/tag/MAVlinkV2

Hello i plan to use approximatively the same with a SP3Racing. I use a T20 with Gemini module. Can you explain more about the ESP32-C3 SuperMini ? I try soon to compile for my SP3 with MAVlink v2 if i all understand. Thanks

pki791 commented 1 month ago

Here You go https://www.expresslrs.org/software/mfd-crossbow/

I used the ESP32-C3 SuperMini as i had it on hand. Its just a small board with ESP32-C3 chip. image

Use pins 20+21 as RX+TX.

jiri-jirus commented 1 month ago

this is beautiful, but it outputs mavlink v2

Bendau commented 1 month ago

I compiled the NAZE target with MAVlink v2 support by the above description. I only used/tested the incoming telemetry from an ExpressLRS backpack ESPNOW reciever on ESP32-C3 SuperMini. That works very good.

So my actual setup is the ExpressLRS TX sends telemetry via its integrated ESP backpack as ESPNOW frames. That frames get recieved by an ESP32-C3 SuperMini and fed into the serial port of u360gts.

amv-open360tracker_NAZE_mavlinkv2.zip

I released also a version with SH1106 LCD support and MAVlinkV2 https://github.com/pki791/u360gts/releases/tag/MAVlinkV2

Hello i found on your git the hex for my SP3 i test it soon. Thank you !

Bendau commented 1 month ago

after test i cant go in ESPnow mode in the ELRS LUA, i don't undertand ...

Bendau commented 1 month ago

Ok, answer to me for the other. Must go to ELRS 3.5