mirkix / ardupilotblue

Howto use BeagleBone Blue with ArduPilot
GNU General Public License v3.0
151 stars 56 forks source link

Modify Arducopter firmware/coding #6

Closed oscarjgv24 closed 6 years ago

oscarjgv24 commented 7 years ago

Hi,

I would like to modify arducopter firmware and coding for implementing my own control loops. Could you give me an idea where to start?

I also have some questions regarding the codes you are running in the PRUs. I just want to know if the signal you are feeding to the ESCs is running "automatically", i.e. without needing to update it every control loop, and if so, at what frequency is running? The reason I ask this is because I must run my control loop at 50 Hz but I want the ESCs to update at 400 Hz.

Regards, Oscar

oscarjgv24 commented 7 years ago

Okay, I've got ardupilot installed now and I've been reading about the ardupilot code base in (http://ardupilot.org/dev/docs/learning-ardupilot-the-example-sketches.html#). I am trying to understand it implementing some of the examples there.

Could someone tell me what would I need to do to simply get the RC signals from the PRUs and send ESC (PPM or PWM) signals to the PRUs, without the trouble of the all the HAL libraries...

I just neeed something very simple and I am making my own code. I don't want to get through all the trouble of understanding the whole ardupilot code.

Regards, Oscar

mirkix commented 6 years ago

@OscarJGV26 Hi Oscar, you can check this https://github.com/ArduPilot/ardupilot/blob/master/Tools/Linux_HAL_Essentials/pru/aiopru/RcAioPRUTest.c

mirkix commented 6 years ago

or this https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_HAL/examples/RCOutput/RCOutput.cpp

https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_HAL/examples/RCOutput2/RCOutput.cpp

https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_HAL/examples/RCInputToRCOutput/RCInputToRCOutput.cpp

https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_HAL/examples/RCInput/RCInput.cpp

oscarjgv24 commented 6 years ago

Thank you @mirkix

I asked about the "automatic" update cause you have to service the PRUs of the robotics cape library, so I was really looking for something more like yours and I've already been able to code everything as I wanted outside ardupilot with your PRU codes which work perfect as expected.

Regards, Oscar

mirkix commented 6 years ago

@OscarJGV26 Sound good, so I can close this issue?

oscarjgv24 commented 6 years ago

@mirkix Sure. Delete it if you want... It's not even an issue but tbh I didn't know gitter before this so this was the wrong place to post this kind of questions.

Regards.

mirkix commented 6 years ago

@OscarJGV26 I will close the issue.