Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   A work around for Linux users (http://www.chiefdelphi.com/forums/showthread.php?t=104984)

alberth 28-03-2012 21:52

Re: A work around for Linux users
 
The biggest hurdle for Linux users is the FRC Driver Station. Sure, you can definitely program on any OS, but to control the robot itself... I faintly recall someone working on a portable, Python version of the driver station (barebones).

As for IDE, I'm still a GUI fan (I have an interesting aversion to vim). Nevertheless, I like my IDEs light - I use Geany for the majority of my code editing. (For Windows users, this is an amazing counterpart to Notepad++!)

I'm not sure how C/C++ can be compiled on Linux, simply because what you compile might not be compatible with the cRIO. When you compile something, you are usually compiling it for the current system. Most compilers compile for x86, which I'm 99% sure isn't the cRIO's processor! :P

If you want to, you can find the cRIO's processor target, and then build the GCC cross compiler for that particular processor target. (I have a few BASH scripts to do that - if you're interested in attempting this, free free to ask) Even then, you will also need the FRC specific headers to make things work.

It's hard, but it's possible!

EDIT: Based on the screenshot found here (my team programs in Java, not C/C++), it looks like the processor is a MPC5200 processor or similar. (This one is based on a PowerPC CPU core.) Happy hacking! :)

andreboos 28-03-2012 22:41

Re: A work around for Linux users
 
I'm surprised nobody has brought this up yet: UCPP by nikitakit is a decent way to build on Linux or Mac.

Last year I used a custom makefile to compile C++ code for the robot, but it was incompatible with this year's version of WPILib, so I switched to UCPP. Now I can program, compile, and deploy from emacs.

StevenB 28-03-2012 23:37

Re: A work around for Linux users
 
Quote:

Originally Posted by theNerd (Post 1150884)
Wow! I like it! Would you guys happen to know where the wpilib is installed on a unix based system? ..... specifically Ubuntu

I don't have Netbeans installed right now, but my best guess is ~/.netbeans/plugins or something like that. You don't need root to install the plugin, so it's got to be somewhere in your home directory. If you just need the files, you can download them from FIRSTForge and unzip the archive yourself.

PS, locate is your friend.

Kevin Wang 03-04-2012 21:46

Re: A work around for Linux users
 
Quote:

Originally Posted by theNerd (Post 1150884)
Wow! I like it! Would you guys happen to know where the wpilib is installed on a unix based system? ..... specifically Ubuntu

I believe it's somewhere in ~/sunspotfrcsdk.

Slix 06-04-2012 00:36

Re: A work around for Linux users
 
It'd be nice to be able to do all FRC programming tasks in Linux. Unfortunately, the LabVIEW-based Driver's Station, cRio Imaging Tool, and others make that difficult.

I know someone was working on a Driver's Station without these restrictions. What about the others? Could the imaging tool's functionality be reimplemented in some cross-platform way?

Earnesterin 14-04-2012 02:07

Re: A work around for Linux users
 
Earlier this week, we reported how the Free Agent range had difficulty using the Linux operating system due to the power management system.
A Seagate diskspinner called Nathan Papadopulos said that all Seagate and Maxtor branded external storage drives feature a power management that places the drive into a sleep mode after 15 minutes of inactivity.
::ouch::

techhelpbb 14-04-2012 06:37

Re: A work around for Linux users
 
Quote:

Originally Posted by Earnesterin (Post 1157781)
Earlier this week, we reported how the Free Agent range had difficulty using the Linux operating system due to the power management system.
A Seagate diskspinner called Nathan Papadopulos said that all Seagate and Maxtor branded external storage drives feature a power management that places the drive into a sleep mode after 15 minutes of inactivity.
::ouch::

With the Seagate utilities you can change the relevant settings.

Otherwise Vixie cron up a job to write or touch a file on the mounted volume.

You can also change the threshold of the write cache to flush more frequently or less frequently (in Linux you can delay the writes for 24 hours I do it all the time, just remember if you don't flush before you loose power your data is gone). Flush more frequently you keep your data and keep the drive awake (especially if you use a journaling partition). Flush less frequently you don't care if the drive sleeps, but you might loose your data.

Also, the problem is not confined to Linux. The power management on the Seagate Free Agents is especially aggressive and can shorten the drive life even in Windows. I'd recommened tinkering with it if you leave the drive connected for long periods of time.

If you need more assistance on how to do this please let me know.

techhelpbb 14-04-2012 06:45

Re: A work around for Linux users
 
Quote:

Originally Posted by Slix (Post 1154819)
It'd be nice to be able to do all FRC programming tasks in Linux. Unfortunately, the LabVIEW-based Driver's Station, cRio Imaging Tool, and others make that difficult.

I know someone was working on a Driver's Station without these restrictions. What about the others? Could the imaging tool's functionality be reimplemented in some cross-platform way?

For just the build environment you could create a build environment in Windows you RDP to and drop your source on through a network share.

All you need is a real license of Windows XP Professional, if you use XP Home you can use VNC.

You could also put the whole thing in a VMWare, Xen or KVM virtual machine and then don't even need more harware (haven't tried this in a while but it should work).

I know my team does most of it's development in Eclipse with Java on Linux and Mac OSX. They tried to port the driver's station with some success. However, even if you create that code I'm not convinced it's entirely legal for competition use without specific approval.

linuxboy 14-04-2012 10:55

Quote:

Originally Posted by techhelpbb (Post 1157795)
I know my team does most of it's development in Eclipse with Java on Linux and Mac OSX. They tried to port the driver's station with some success. However, even if you create that code I'm not convinced it's entirely legal for competition use without specific approval.

I can guarentee it isn't legal for competition use, I'm not sure where the rule is, but, on the inspection checklist they check whether or not the voltage shows up in the driver station. If you are using something other than the driverstation, they will definitely have a problem with it, not to mention if the FTA has to troubleshoot your connection on the field. That said, I'm trying to recreate a Driver Station from looking at packet captures, and might test it at an offseason.
- Oliver


All times are GMT -5. The time now is 07:59.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi