Ruslan-B / AR.Drone

The AR.Drone 2.0 controlling library for C#/.NET and Mono, with video support.
GNU Lesser General Public License v3.0
67 stars 66 forks source link

May I know if this one is still available to use? #10

Closed bbjbf closed 8 years ago

bbjbf commented 8 years ago

I download this API on my laptop which is Win7 with Visual Studio 2012. However, I cannot load it. May I know if it is still working?

Ruslan-B commented 8 years ago

Yes, you may :). It should still work - if you build it right. Revisit this section https://github.com/Ruslan-B/AR.Drone#build

bbjbf commented 8 years ago

I did download the FFmpeg as mentioned but error occur mentioning that need debugger to run it...however, i am not sure what should i also download...can you help me or tell me? thx...i need this api for my final year project a lot:(

Ruslan-B commented 8 years ago

download, debugger, final - it sounds funny. You need to have ffmpeg linked with the project. The best way to do it checkout repository with the linked version of ffmpeg: Clone the project go inside and update dependent submodule, then you will be able to compile it:

git clone git://github.com/Ruslan-B/AR.Drone.git   
cd AR.Drone   
git submodule update --init   

And I promise when you get it running you will have a real headache. :)

bbjbf commented 8 years ago

i am so sorry that i am not quite understand what should i do.

does it mean,

  1. download this project
  2. download this (https://github.com/Ruslan-B/FFmpeg.AutoGen)
  3. put the folder in 2. into the "ffmpeg.autogen" folder
  4. open the project

i am so sorry that i am so green in coding in windows so i am not so sure what should i do

bbjbf commented 8 years ago

i used github, direct typed git clone git://github.com/Ruslan-B/AR.Drone.git
cd AR.Drone
git submodule update --init
and i run the project....however, same problem is there:(

does the project require any reference? also....since i cant find any ddl file in every debug file, are there suppose to have any?

bbjbf commented 8 years ago

does it require installing extra things like python? if yes, what shd i install too?

bbjbf commented 8 years ago

i solved the problem. so sorry for disturbing. also thank you.

one more question, how can i convert the video recorded into mp4?

Ruslan-B commented 8 years ago

great, ffmpeg.exe for windows should be able to convert raw video stream to any format.

bbjbf commented 8 years ago

Um...but can I modify which code to directly generate a mp4 file rather than generate a .ardrone file?

Ruslan-B commented 8 years ago

.ardrone file also includes navdata frames, you can exclude them (by commenting some lines in PacketWriter) then you will get H264 stream, you can play it directly with VLC player for example.
Thus if you want pure mp4 you need to decode H264 and encode it to mp4, despite decoding part is in place already, it is still not a trivial task though.

bbjbf commented 8 years ago

thank you very much and you are really a responsible guy!

bbjbf commented 8 years ago

I am so sorry to annoying you again.

May I know can I control the moving speed of drone by this API?

Ruslan-B commented 8 years ago

I would advise to go through original idk pdf it explains the model behind drone firmware: http://www.msh-tools.com/ardrone/ARDrone_Developer_Guide.pdf

As for API you have DroneClient class and this method control drone movement:


        /// <summary>
        /// This command controls the drone flight motions.
        /// </summary>
        /// <param name="mode">Enabling the use of progressive commands and/or the Combined Yaw mode (bitfield).</param>
        /// <param name="roll">Drone left-right tilt - value in range [−1..1].</param>
        /// <param name="pitch">Drone front-back tilt - value in range [−1..1].</param>
        /// <param name="yaw">Drone angular speed - value in range [−1..1].</param>
        /// <param name="gaz">Drone vertical speed - value in range [−1..1].</param>
        public void Progress(FlightMode mode, float roll = 0, float pitch = 0, float yaw = 0, float gaz = 0)

Pease note these commands changing state of drone, i.e. if you need to fly for 2 seconds in some direction you send Progress command,then after to seconds you need to send Hover to stop movement. Besides there are different settings in drone - usually they are just limiting drone max speed.

bbjbf commented 8 years ago

thank you again.

One more question, may i know how can i threading the task, like it can move upward and left at the same time rather than moving up then end task then moving left?

thx

Ruslan-B commented 8 years ago

droneClient.Progress(mode, roll: -0.1,gaz: 0.1)?