djnugent / SmartCamera

Use image processing to perform visual navigation for Ardupilot
35 stars 26 forks source link

only code on SITL? #8

Closed killerlayup closed 9 years ago

killerlayup commented 9 years ago

hi, Daniel now I can run the code on sitl well, and I read your code carefully. Now I have a question that the code on github only works for SITL? is there some code for true flight? I tried, but have a lot bugs....

Thanks!

killerlayup commented 9 years ago

could you give me some hints?

djnugent commented 9 years ago

SITL is a simulated version of arducopter. The code is the same. The only difference is an actual autopilot vs SITL. Glad to hear you got SITL working! Configure the odroid to run mavproxy and then smart camera on startup. Then make sure you are connecting over serial from the odroid to autopilot. Make sure you are running arducopter 3.3(still in beta). That's all I have for now.

killerlayup commented 9 years ago

Hi, Daniel I recently read your code carefully and find that you only use a P constroller on XY axis,right? when I run your code on SITL, the drone flies around the land zone(the circle), but it is not as stable as your demo on youtube. In my SITL, the drone flies back and forth but never keep stable. what the problem you think it would be?

Futhermore, I have some stupid question. I think maybe you can help me out.

1.in my SITL, it seems that when flight mode is "LOITER", the drone can not be controlled by the command "set_velocity(vx,vy,vz)", but I see your video that it can be controlled, why? 2.I see your video about testing an true autopilot. you can get your drone's video on your own PC, how do you make it?

  1. I use VNC vier to login the odroid on my PC via WIFI, do your have a better solution to login odroid on PC? Because it is a little inconvenient in this way.

thanks!

djnugent commented 9 years ago

Not sure why it is doing that. Sorry.

  1. The program operates in guided mode, not loiter mode. 2.I do not stream video to my computer. I save it on the odroid.
  2. I don't use vnc(remote desktop). I code on my laptop and transfer files using ftp and control the odroid using ssh. On Apr 22, 2015 2:25 AM, "killerlayup" notifications@github.com wrote:

Hi, Daniel I recently read your code carefully and find that you only use a P constroller on XY axis,right? when I run your code on SITL, the drone flies around the land zone(the circle), but it is not as stable as your demo on youtube. In my SITL, the drone flies back and forth but never keep stable. what the problem you think it would be?

Futhermore, I have some stupid question. I think maybe you can help me out.

1.in my SITL, it seems that when flight mode is "LOITER", the drone can not be controlled by the command "set_velocity(vx,vy,vz)", but I see your video that it can be controlled, why? 2.I see your video about testing an true autopilot. you can get your drone's video on your own PC, how do you make it?

  1. I use VNC vier to login the odroid on my PC via WIFI, do your have a better solution to login odroid on PC? Because it is a little inconvenient in this way.

thanks!

— Reply to this email directly or view it on GitHub https://github.com/djnugent/SmartCamera/issues/8#issuecomment-95059250.

killerlayup commented 9 years ago

Hi,Daniel

I am not asking what mode the program runs, I am asking if the drone can be controlled by by the command "set_velocity(vx,vy,vz)" on mode "LOITER". It seemed that you can control it in your youtube video.

Meanwhile,I am thinking about that maybe the param P is too much(you set it 0.15), that make the drone unstable. Besides, the control period can also influence it, right? So, I think maybe I can add PI controller to your program and adjust the control period?

PS:I use ODROID XU3 with 4 cores, is it the reason that make the control period different?

Thanks, Joel

2015-04-23

hlshen

发件人:Daniel Nugent notifications@github.com 发送时间:2015-04-22 23:06 主题:Re: [SmartCamera] only code on SITL? (#8) 收件人:"djnugent/SmartCamera"SmartCamera@noreply.github.com 抄送:"killerlayup"hlshen@zju.edu.cn

Not sure why it is doing that. Sorry.

  1. The program operates in guided mode, not loiter mode. 2.I do not stream video to my computer. I save it on the odroid.
  2. I don't use vnc(remote desktop). I code on my laptop and transfer files using ftp and control the odroid using ssh. On Apr 22, 2015 2:25 AM, "killerlayup" notifications@github.com wrote:

Hi, Daniel I recently read your code carefully and find that you only use a P constroller on XY axis,right? when I run your code on SITL, the drone flies around the land zone(the circle), but it is not as stable as your demo on youtube. In my SITL, the drone flies back and forth but never keep stable. what the problem you think it would be?

Futhermore, I have some stupid question. I think maybe you can help me out.

1.in my SITL, it seems that when flight mode is "LOITER", the drone can not be controlled by the command "set_velocity(vx,vy,vz)", but I see your video that it can be controlled, why? 2.I see your video about testing an true autopilot. you can get your drone's video on your own PC, how do you make it?

  1. I use VNC vier to login the odroid on my PC via WIFI, do your have a better solution to login odroid on PC? Because it is a little inconvenient in this way.

thanks!

— Reply to this email directly or view it on GitHub https://github.com/djnugent/SmartCamera/issues/8#issuecomment-95059250.

— Reply to this email directly or view it on GitHub.

killerlayup commented 9 years ago

It seems that SITL set a default wind that influences the drone's flight. Do you set the wind speed to o?

killerlayup commented 9 years ago

Hi, Daniel when I use "set_velocity(vx,vy,vz)" command and set vx,vy vz to 0, as set_velocity(0,0,0), the drone on SITL doesn't keep stable but instead of periodic motion back and forth. It seems that when I give the drone velocity(0,0,0), it has some kind of noise that influences the drone. Do you have this problem? I think this makes it unstable when running Precision Landing. I really need help, this problem makes me confused.

killerlayup commented 9 years ago

I have got it worked! thanks!