Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #19

Closed
The1only opened this issue Aug 10, 2020 · 52 comments
Closed

Development #19

The1only opened this issue Aug 10, 2020 · 52 comments
Assignees

Comments

@The1only
Copy link
Collaborator

We need people to work on the upgrade to the latest SDK, I ended up with no video at all.

We need people to work on the upgrading Gradel, it makes the code fail....

We need people to work on the Android lib uppdates.

We need more people on the Mavlink interface, there is loot of work to be done implementing one and one feature.

We need people on the GoogleMAP flight planner page, it does not work.

We need people to test on all different DJI platforms.

We need heads up when new things are coming our way, as DJI changes things without telling..,.

@BkMak16
Copy link

BkMak16 commented Aug 11, 2020

I'd like to help where I can.
For now I'm busy trying to cure a pandemic, As you can imagine what its like to have the answers but lack the resources to prove it. Annoying to say the least.

When all this is over I'd love to do the testing, I use python so mavlink I think is about as far as my programming skills will help us. If resources allow I'll collect more drones and we'll get to test them out.

@The1only
Copy link
Collaborator Author

Keep up the good work, I hold the forth until the pandemic has passed. The pandemic is on it's way back for a second round around here.

@chron0
Copy link

chron0 commented Aug 27, 2020

I can offer testing with a DJI Mavic Pro and QGC on Linux. I've been looking forward to be able to control the Mavic outside of the DJI ecosphere for a long time, especially mission planning etc. Will try to build latest master again and see how far I can get.

@The1only
Copy link
Collaborator Author

The1only commented Aug 27, 2020 via email

@danammeansbear
Copy link

hello i am on the project. I have a mavic air, how can i test/help?

@The1only
Copy link
Collaborator Author

The1only commented Oct 1, 2020 via email

@danammeansbear
Copy link

danammeansbear commented Oct 1, 2020 via email

@The1only
Copy link
Collaborator Author

The1only commented Oct 1, 2020 via email

@danammeansbear
Copy link

danammeansbear commented Oct 2, 2020 via email

@ma-ramezani
Copy link

hi
I can work on the Mavlink interface

@robbiedood
Copy link
Contributor

@The1only The project is great, would help many users. Feel free to count me in. I am testing on mavic 2 zoom and mini with QGC on Ubuntu and Google Pixel 2/3/4; and will work on interfacing MAVROS and web applications.

That would be great to get an initial guide from you, so we could understand the code structure well. (even a simple flow diagram is helpful)
For example, after main/java/sq.rogue.rosettadrone/MainActivity.java, which one is the next important .java file to look at?
I would think sq.rogue.rosettadrone/video contains the core to handle video streaming, and com.MAVLink contains the core to do the translation between MAVLink and DJI language. But maybe I miss the global picture of the code.

Best,
-- Luke

@The1only
Copy link
Collaborator Author

The1only commented Nov 11, 2020

Let’s se:

Focus on: DroneModel, MainActivity and MavlinkReceiver, and the layout and GUI stuff.

Everything that is related to Drone communication and control, except for Video happens in “DroneModel”, so any new actions is suppose to be there. I have done quite now new things lately, will put soon.

"MainActivity" handles the main screen and the video related stuff, except for the low-level stuff. I have noticed that when I use Inspire 1 or Mavic Air ( and probably Phantom 3) drones, we need a quite power full Android device to avoid video errors. So we need to look at performance and threading. Another ting is that it seems that there are threads that gets hanging after an exit, as some times I can run video just fine right after rebooting the Android device, but after restarting the app the video gets crap...

In the "Video" catalog are very low-level H264, RTSP and RTP files, Only edit these files if you are familiar with these format on a bit level. DJI do not deliver a H.264 format we directly can transmit over UDP, we need to add NALs and other stuff.

"MavLinkReceiver" handles all mavlink related stuff, so when a new Mavlink command is received it is parsed here.
Then the actions is executed in the DroneModel. Unfortunately there are some waypoint stuff in this file also, that is quite confusing, and not working at the moment. If someone could fix the waypoints that would be great. Remember DJI got some strange demand for minimum and maximum distance and minimum number og waypoints etc.

The rest of the files are helper files, doing small dedicated stuff as can be seen.
I am about to add a generic AI screen that everyone can modify to their own likings.
I use this mostly for AI research using Python on a Linux host computer to control the drone from live video.

The layout is at the moment tuned for DJI SmartControll screen layout. Some more dynamic layout would be fine.
On the CrystalSky it looks a bit odd.

@The1only
Copy link
Collaborator Author

I have added some experimental DJI TimeLine usage lately, to test it out. At the moment I use this to do takeoff to x meters, as DJI do not support that. In the current code I have created that function using very low-level virtual stick movements to climb while holding position. It work well, but the TimeLine might make is simpler and hourly better in wind. I will add all this code later to day.

@The1only
Copy link
Collaborator Author

The1only commented Nov 11, 2020

If anyone know how to make a plugin interface to the software please let me know. We need a plugin for the AI, such that every one can make their own AI stuff without getting involved in RosettaDrone2 it self...

Plugin is now added for the AI function block. This allow users to make totally independent Activities that can be lisensed outside Rosettadrone. It opens a new world of posibilities.

@robbiedood
Copy link
Contributor

robbiedood commented Nov 13, 2020

@The1only , thanks for your guide. We found that the module of validateTranscodingMethod in MainActivity.java doesn't include the case of MAVIC_MINI. Should we add it ?

Hope to hear your expertise.

Best,
-- Luke

@kripper
Copy link
Collaborator

kripper commented Feb 15, 2023

Hi @The1only and team,

I have good news.

1.- I just finished testing, reviewing and merging all forks, added support for native MAVLink waypoints and many other features, fixed hundreds of bugs, implemented feature requests, cleaned a lot of code, etc.

It's time to upload all my changes to the master branch and respond and close the issues.

Since this project has been dead for over a year and I know you have no time, please give me full access to this repo since I will be the active maintener for some time in the future.
If not possible, I will create a "Rosetta 3" forked project, but I prefer to keep the development centralized.

In the future, please let's start commiting atomic changes immediately and apply good GIT practices.

For example, the merge of the CommandManager was a good move, but I noticed you had to revert it because we are not up to date.
The codebase still needs a lot of refractoring and cleaning, but we first have to get up to date.

2 .- We are connecting Mavlink with DJI, the best flying drones considering features/price.
After cleaning the mess, I will contact the other opensource communities (ArduPilot, DroneCode, etc) and ask them to include "Rosetta 3" to their list of "member" projects.

@danammeansbear
Copy link

danammeansbear commented Feb 15, 2023 via email

@The1only
Copy link
Collaborator Author

The1only commented Feb 15, 2023 via email

@kripper
Copy link
Collaborator

kripper commented Feb 16, 2023

@The1only I still have no access to close issues or merge pull requests. My user is "kripper"

@danammeansbear
Copy link

danammeansbear commented Feb 16, 2023 via email

@kripper
Copy link
Collaborator

kripper commented Feb 16, 2023

@danammeansbear sure

@kripper
Copy link
Collaborator

kripper commented Feb 16, 2023

@The1only you got confused and added Adam instead of me :-)

I can fix it once you give me access.

@The1only
Copy link
Collaborator Author

The1only commented Feb 17, 2023 via email

@The1only
Copy link
Collaborator Author

The1only commented Feb 17, 2023 via email

@kripper
Copy link
Collaborator

kripper commented Feb 17, 2023

@The1only yes, thanks. Master branch is up to date now.
Please everybody switch back to master and report issues.

@chron0
Copy link

chron0 commented Feb 17, 2023

++ thanks for keeping this project alive and moving it forward. being able to use qtgroundcontrol over mavlink with dji hw is <3

@kripper kripper changed the title We need more developers involved, the project is growing out of a one man show... Development Feb 17, 2023
@kripper
Copy link
Collaborator

kripper commented Feb 17, 2023

SUBJECT: Precision landing

Hi team,

WayPoint missions are working fine now with QGC using the new MissionManager class (using VirtualSticks).
Next, I will implement precision landing using Python and OpenCV.
There are a lot of python scripts around on Github but some of you probably have also been playing with precision landing in the past.
Does anybody want to share their existing precision landing implementation to Rosetta?

I'm available for reviewing, cleaning and integrating the code into master so we can all maintain and improve it after.
My recommendation is to always share your code and stay up to date on the same codebase.
Otherwise personal efforts and implementations get obsolate and start to conflict with upstream implementations which sooner or later will be superior and well maintained by others.

@The1only
Copy link
Collaborator Author

The1only commented Feb 18, 2023 via email

@kripper
Copy link
Collaborator

kripper commented Feb 18, 2023

I'm thinking in integrating the precision landing Algorithm using Aruco from this repo:
https://github.com/tizianofiorenzani/how_do_drones_work

@kripper
Copy link
Collaborator

kripper commented Feb 18, 2023

BTW, have you tried MAVSDK?
I'm running it locally on the smartphone listening on a UDP port.
Rosetta connects to the port (MAVSDK acknowledges the connection), but somehow the mavlink commands sent by MAVSDK are not received by Rosetta.

@The1only
Copy link
Collaborator Author

The1only commented Feb 18, 2023 via email

@The1only
Copy link
Collaborator Author

The1only commented Feb 18, 2023 via email

@danammeansbear
Copy link

got a new development machine, give me time to set everything up on Mac. will let you know.

@kripper
Copy link
Collaborator

kripper commented Feb 21, 2023

@The1only can we rename the project to "Rosetta Drone" (without the version number) or just "Rosetta"?

@kripper
Copy link
Collaborator

kripper commented Feb 21, 2023

I just found out that Rosetta was not supporting MAVLink 2.
I'm going to implement it now.

@The1only
Copy link
Collaborator Author

The1only commented Feb 21, 2023 via email

@chron0
Copy link

chron0 commented Feb 21, 2023

I would advise against using just "rosetta" - that will conflict with the macos x86 emulation system thats also called rosetta and create unnecessary noise when searching for issues in the future. so, I'd suggest keeping rosettadrone or coming up with a new unique name.

@kripper kripper self-assigned this Feb 21, 2023
@kripper
Copy link
Collaborator

kripper commented Feb 21, 2023

I'm contacting the other Rosetta Drone repo owners on Github to link to this repo.
It would be good to transfer the owner of this repo to a official "RosettaDrone" user.

I've added MAVLink 2 support on master branch and tested it with QGC.
The version number is now hardcoded = 2.

@The1only
Copy link
Collaborator Author

The1only commented Feb 21, 2023 via email

@kripper
Copy link
Collaborator

kripper commented Feb 24, 2023

The other repos on GitHub are now official unmaintained and linking to us.

I need help cleaning the video code.

I wonder why we are not just sending the raw data received from the SDK to a destination UDP port to process it outside Rosetta using ffmpeg (instead of decoding it inside Rosetta with the native helper).
Would it be possible?
I tried it shortly with a mini SE, but wasn't able to decode the video on the end point with ffmpeg, even when ffprobe recognized it as h264 and it's size.
Maybe ffmpeg needs special options?

When trying with the original RTP stream "packetized" by Rosetta, gstreamer works but the video looks as if it had encoding/decoding errors. I couldn't decode or detect the stream with ffmpeg or ffprobe. I could also be a performance problem, so I will try to just decode single frames. I want it for computer vision.

@The1only could you maybe confirm if your latest video code is in master branch?

@kripper
Copy link
Collaborator

kripper commented Feb 24, 2023

I see. You got too long UDP packets when sending them out without decoding first. Here is your old post: #8

I'm just worried about the decoding and encoding (on Rosetta) and then decoding again on the AI end point.
Maybe Rosetta could send already decoded frames as raw to the AI script in a given resolution and frequency.
Specially when the AI script is running locally on Android.

@kripper
Copy link
Collaborator

kripper commented Feb 24, 2023

I created this issue to discuss the idea of doing the decoding outside Rosetta:
#122

@The1only
Copy link
Collaborator Author

The1only commented Feb 24, 2023 via email

@The1only
Copy link
Collaborator Author

The1only commented Feb 24, 2023 via email

@The1only
Copy link
Collaborator Author

The1only commented Feb 24, 2023 via email

@kripper
Copy link
Collaborator

kripper commented Mar 5, 2023

If anyone know how to make a plugin interface to the software please let me know. We need a plugin for the AI, such that every one can make their own AI stuff without getting involved in RosettaDrone2 it self...

Done.
93cf9ef

You can now move your custom code to a class that extends the Plugin class.
This way we can keep the MainActivity clean.

@danammeansbear
Copy link

danammeansbear commented Mar 6, 2023 via email

@kripper
Copy link
Collaborator

kripper commented Mar 19, 2023

with som kalmanfilters

I believe I need to implement EKF.

@The1only
Copy link
Collaborator Author

The1only commented Mar 19, 2023

EKF to do what? I normaly try to stay with KF.

@kripper
Copy link
Collaborator

kripper commented Mar 19, 2023

EKF to do what? I normaly try to stay with KF.

Moved here: #132

@kripper
Copy link
Collaborator

kripper commented Mar 22, 2023

Hi @The1only, can you please take a look at #132?

I'm interested in your experience with KF.
At least on my model, getVelocityX and GPS information are useless.

@kripper
Copy link
Collaborator

kripper commented Apr 8, 2023

Closing. Development discussion continues here:
#132

@kripper kripper closed this as completed Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants