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

Reading ALL Remote Control channels #70

Closed
nikonikolov opened this issue Nov 9, 2016 · 8 comments
Closed

Reading ALL Remote Control channels #70

nikonikolov opened this issue Nov 9, 2016 · 8 comments

Comments

@nikonikolov
Copy link

Looking though the code it seems like the struct read from the DJI autopilot returns RCData struct which only contains the roll, pitch, yaw, throttle, mode and gear signals. There is another struct VirtualRCData which contains all channels but it does not seem to be used anywhere. How can I read all the channels from the remote control. Apparently this is possible according to this https://www.youtube.com/watch?v=_9VR9IQP7QM

@rohitsantdji
Copy link

Hi Nikolay,

Those six values are the only RC Data fields available through the open protocol. The VirtualRCData struct is used for setting data, not for getting it, when in Virtual RC mode.

The video most likely uses information from other parts of the SDK (e.g. flight status for LAND, OFF display and battery percentage from the BroadcastData).

@jasperza
Copy link

I made that video. I dont use the SDK for the onboard, I wrote my own code
for Arduino. The DJI SDK is not compatible with arduino because it uses
C++ functionality not available on arduino, like multi-threading.

I wrote my code from nothing, it consists of a class which interprets the
binary data directly from the DJI serial UART port onboard.I adapts to
different messages being sent. It processes the data byte by byte, and bit
by bit.

On Wed, Nov 9, 2016 at 11:15 PM, Rohit Sant [email protected]
wrote:

Closed #70 #70.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#70 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AMCBEuvE4VTLyerEWL0kyLtfniKL4DCfks5q8jfkgaJpZM4Kt-0j
.

@rohitsantdji
Copy link

@jasperza That's very cool! We do provide a single-threaded DJI Onboard SDK implementation for STM32, but for the computing budget of an Arduino the smart answer in many cases is to implement your own protocol parser that only deals with the messages you're interested in.

Thanks for sharing the video!

@nikonikolov
Copy link
Author

@jasperza Thanks a lot for sharing!

@jasperza
Copy link

Pleasure!
Also, every time the class gets a message it checks the data against the
data in the previous message and if something has changed, performs an
action, eg releases a servo.

The class also prepares and outputs data back to the drone for flight
control, so we programmatically get the matrice to take off and hover at a
certain height.

We have control over all the directions of travel, we communicate with our
server over our own protocol to set the target height , but once set, all
of the control is fully on board on the arduino.

The arduino monitors the rc signals from the drone over the serial port
and if the user wants to control the drone using the sticks it releases
control to the user. After one second of no user input, the arduino takes
over again.

This means that the operator can make quick, small adjustments to one or
two axes without changing the mode switch.

On Nov 12, 2016 13:45, "Nikolay Nikolov" [email protected] wrote:

@jasperza https://github.com/jasperza Thanks a lot for sharing!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#70 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMCBEg07Fro9bvKyP38oT-tkX-E9HZJSks5q9abNgaJpZM4Kt-0j
.

@camilojimo
Copy link

Hi, I'm starting to develop my own app using osdk stm32 discovery and A3 flight controller. It has come to my attention that to run the code from the samples (https://github.com/dji-sdk/Onboard-SDK/tree/3.1/sample/STM32) using MDK-ARM (Keil uVision) toolchain it is requairing a license because of the size of the code. I'm wondering if @nikonikolov were successful i wold like to know how did you set up your model. also, @jasperza, I'm open in terms of software to cominicate with the flight controler and using Arduino is a possibility for me, if its possible could you give me more details on how you did your set up. I want to take control of yaw with an external parameter and maintain control of everything else with the controller. I've used arduino to read what is coming out from the flight controller but at this point is only data that doesn't give me any information because i don't know when to start reading and when to stop.
if you @jasperza could explain me in more detail how to ('interprets the binary data directly from the DJI serial UART port onboard.I adapts to different messages being sent. It processes the data byte by byte, and bit by bit.') i would very much appreciate that

Thanks !

@jasperza
Copy link

jasperza commented Dec 5, 2017 via email

@nikonikolov
Copy link
Author

@camilojimo I used a Raspberry Pi and developed on Linux. Never actually ran the samples code and did not need any license for my custom app. I would recommend switching to Linux toolchains as this will save you a lot of headaches.

pcler pushed a commit that referenced this issue May 7, 2020
* commit '2f298000fe70510c4042fa1a582a680f9da325a2':
  fix: turn on avoid enable switch after land
  fix: use the nema satellite index as data index
  fix: modify the timesync data sytle
  fix: fix the log sample
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

4 participants