Hi Victor, Anuj and Siddharth,
Jason Kridner has asked that the 3 beaglepilot projects be more isolated
from each other. At the moment the boundaries between them are not as
clear as they could be. I presume that Jason wants to see isolation so
that if one student doesn't make progress that it doesn't hold up the
others.
I've clicked the button on your 3 proposals so they are open for editing
again, so you can make updates based on this discussion if you want to.
The way I see the separation at the moment (based on current proposals) is:
Victor: hardware drivers, hw test code, realtime kernel evaluation and
comparison, IDE integration, ROS integration, security review
Sidbh: PRU communication from Linux userland, port starterware to PRU,
sensor drivers on PRU
Anuj: device tree for cape, PRU PPM/PWM handling, SPI on PRU, GCS development
(I know this isn't complete, just a rough summary)
Some of these components are well separated and are not dependent on the
work of the other students. For example the ROS integration work is well
separated I think.
Other pieces have overlap. The most obvious pieces of overlap are:
- the hw test code for the cape in Victors proposal will probably need
the device tree that Anuj is planning to develop, unless Victor has a
plan for writing the test code without a DTS?
- the hardware drivers in Victors proposal potentially overlaps with
the SPI work by Anuj and the sensor drivers work by Sidbh.
To get the separation that Jason has asked for I think we first need to
work out the plan for the split between PRU and ARM functionality in
ardupilot on BBB. My current thought is that the split would be as
follows:
- PPM/PWM/PPM-SUM on PRU (see earlier IRC discussions on why this is a
good idea, and why not using the eCap and hw PWM chips)
- I2C sensor drivers on ARM, either kernel drivers or userspace drivers
- SPI sensor drivers on ARM, if possible. Either kernel or userspace
drivers
Running the I2C drivers on the ARM I think is fairly obvious. We expect
the I2C sensors to be low rate (100Hz and below) for things like
magnetometer, airspeed sensor, sonar etc. The only real question is
whether we do in-kernel drivers or do userspace drivers via the AP_HAL
I2C abstraction layer. The existing port of ardupilot on BBB uses
userspace drivers, but there may be reasons to move them in-kernel.
The SPI drivers is trickier. So far I've done SPI drivers in userspace
on ARM, but the performance isn't (as yet!) great. I'm hoping that with
a bit of work on the Linux SPI code on BBB that it will be viable, but
if we find we can't support at least 4 sensors running with 1kHz
sampling on SPI with very consistent timing then we may need to look at
doing SPI transfers on a PRU.
This is where things get a bit tricky with project proposals. If the SPI
work on ARM goes well then Victors "hardware drivers" work can be
separate from the other two proposals. If however we find that we just
can't get SPI drivers on the ARM working well enough then the proposal
from Anuj on SPI on PRU will be needed (btw, I'd still think that we'd
do the main sensor drivers on ARM, we'd just offer an API to ask the PRU
to queue and service SPI transfers on behalf of the ARM - we would
dedicate one PRU to SPI transfers, probably interfacing via the AP_HAL
SPI API).
I think the solution to this overlap is to propose that Victor will work
on making the SPI drivers on ARM work as well as possible, while Anuj
will work on SPI on the PRU, working in parallel with Victor and not
depending on Victors work. Both are very worthwhile pieces of work, and
it is quite possible that we will decide in the end to use a mixture of
the two approaches in the final design. To choose between them we really
need both developed and well tested.
The next piece of overlap between the proposals is the PRU comms work
from Sidbh, and the PRU PPM/PWM handling from Anuj. At first glance this
looks like a dependency issue, but I think it is easily resolved. For
the PRU PPM/PWM work Anuj can use a simple shared memory ring buffer to
start with, similar to what Pantelis did here:
https://github.com/pantoniou/testpru
then when the PRU comms API from Sidbh is ready, Anuj could choose to
start using it at his own discretion. That allows Anuj and Sidbh to make
progress independently.
Does that sound OK? If it does then it would be great if you could edit
your proposals a bit to make this separation a bit clearer. I'm sure
Jason would appreciate it!
Cheers, Tridge