EMC2 running on Raspberry Pi?

More
13 years 5 months ago #33541 by mungkie
I probably should not be saying this yet as I have not hooked up any motors and the scope does not work correctly, but I am guessing maybe I will post a SD image at the weekend.

I have spent a few hours every night this week trying to sort out the raspbian packaging system and the package dependency problems are a nightmare for creating a slim distro. I think I have got most of the image sorted and it should pack to under 350Mb and fit on a 2Gb SD (but there is still huge amounts of unecessary cruft on the system).

The very basic tests show no missed deadlines in RT execution when running axis with a 1ms servo loop (20us DMA virtual base-thread), axis seems a lot snappier with sub second response times (I assume most of this is slowness is due to software based mesa opengl rendering, which could be removed if a OGLES wrapper is created).

The stepgen code ended up requiring a total refactoring and I am not sure about releasing all the code yet as it still requires tiding up and a lot of hardcoded parameters changed to allow configuration via hal.

The only thing required is some testing with motors which I will do over the weekend (I am relying on my cheap chinese stepper board (TB6560) working with the pi 3.3v logic (5v ttl should read 3.3v as high unless there are unusual problems).

If the motors drive okay over the weekend then I will release the SD image, but I have been thinking about what should be done about source release and not sure what to do.

I have spent a lot of time and money messing with this, and sort of feel a bit possesive especially as some people will probably make money from this and everyone hopefully will save money by its use.

I have released opensource software before and have never made any money or expected to, as I feel so many other people have added to opensource and not been paid it seems unreasonable to expect payment. Unfortunately there are people making money that do not seem to contribute so much and I am having a very hard time finding money for many of my projects. So I am wondering if maybe starting a kickstarter to raise something for the final development of the drivers would be a good idea, I would not want to start the kickstarter until I am sure everything will definitely work as I do not want to promise something I cannot deliver.

I was thinking of doing a kickstarter along the lines of $10,000 goal with donations going to what I feel are worthy causes :
5% going to the FSF,
30% for the raspberry pi foundation,
20% for linuxcnc (I have never seen any mention of donations on the linuxcnc website and am not sure how any money could be used, maybe could be used as prize bounty for further development?)
All remainder raised will go to my favourite charity (Althought I would probably rather have stuff that I need rather than money)

What do other people think, would linuxcnc be able to put any donations to good use, is trying to raise money from my work unreasonable, would 5000 people donate $2 to a kickstarter???????.

Maybe this is still pie in the sky as there is still possibility that the system will not work correctly?

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #33713 by mungkie
Well I think there maybe a distribution available, I uploaded it last night, then downloaded it and tested, but unfortunately it does not seem to work :(

I will try and find out what went wrong, maybe an SD card fault or maybe I did something else wrong, the image was working okay on the original card, but I dd'd zeros to all the free space to reduce the compressed size (270Mb), dunno if this has broken things.

The test I did over the weekend "seemed" to drive steppers really nicely (i.e. smooth motion but I did not make any timing or lost step tests) and no faults with real time.

When I tried the download image it gave realtime missed schedule errors and pagefaults and took ages to load up axis (I waited 10 minutes then powered down the system as axis seemed almost locked up).

I was hopeing to make the release announcement last night, but did not due to the errors.

I may be able to fix it tonight, it should be a quick fix as I think its just a data corruption problem(I really should workout how to use md5 ), if anyone wants to try the image check out the very rough quick web page I have setup:

soundproofingforum.co.uk/rpi_linuxcnc/raspberrypilinuxcnc.htm

Probably better people not waste time downloading it (it will take about 1.5hours to compile), but incase anyone wants to make sure I have not just got a bad SD card then download and test then send me some feedback, otherwise I will check the problems tonight and upload another image when I find out what is going wrong.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #33721 by andypugh

mungkie wrote: d took ages to load up axis (I waited 10 minutes then powered down the system as axis seemed almost locked up).


Have you used Axis successfully in the past? I seem to recall mah saying that the Pi didn't really have the processing power to run a graphical GUI. tklinuxcnc or similar lightweight GUI might be a better choice.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago - 13 years 5 months ago #33723 by mungkie
double posted for some weird reason?
Last edit: 13 years 5 months ago by mungkie. Reason: double post

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #33724 by mungkie

andypugh wrote:

mungkie wrote: d took ages to load up axis (I waited 10 minutes then powered down the system as axis seemed almost locked up).


Have you used Axis successfully in the past? I seem to recall mah saying that the Pi didn't really have the processing power to run a graphical GUI. tklinuxcnc or similar lightweight GUI might be a better choice.


Yes, I have always used axis right from my very first experiments I made (the original video of linuxcnc running on pi was made using axis and clicking the buttons to move motors), axis is slow, but not 10 minutes to load slow, it will load in about 25 seconds and does a graphical plot update about once in 0.8 seconds (If anyone can be bothered to try there could be easy methods to add openGL wrapper to the GLES libs to allow hardware accel, not sure if that would cause interupt problems though?). I maybe worth trying the realtime tests in the home directory subfolder to check if there is corruption of the kernel.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #33833 by mungkie
Okay, I will not go into too much detail about the nightmare of madness that has occured trying to create an SD card image, It seems though that there could be problems with the sanity of the filesystem or the way that the rpi kernel handles the mmc card.

I have spent over 10 hours in the last couple of days trying to do something that should take less than an hour, and still not succeeded, basically getting a clean image is rather hard to do, so there are more than 50Mb of cruft on the image.

I have tested it and it seems to run, if anyone with better test equipment could give me some feedback that would be useful.

I am just waiting for the file to upload to the web which should take another couple of hours, then I will update the web page to point to the correct file.

Please Log in or Create an account to join the conversation.

Time to create page: 0.080 seconds
Powered by Kunena Forum