Go to Post It's just a game. - artdutra04 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-09-2007, 19:06
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
How important is Linux?

There have been many discussions over the years about having Linux as a target operating system on the robot controller and I'm just curious if this is really what teams want, or is it just a few vocal members expressing their desire. What about VxWorks? QNX? Some other RTOS?

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #2   Spotlight this post!  
Unread 09-09-2007, 19:20
chris31 chris31 is offline
Team 2021 Captain
AKA: Chris Davidson
FRC #2021 (FA Robotics)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2006
Location: Atlanta, GA/ Fredericksburg,VA
Posts: 949
chris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond repute
Send a message via AIM to chris31
Re: How important is Linux?

To avoid confusion, are you talking about having Linux having am official supported IDE and code loading OR are you talking about the controller running something like uClinux?
  #3   Spotlight this post!  
Unread 09-09-2007, 22:45
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: How important is Linux?

Quote:
Originally Posted by chris31 View Post
To avoid confusion, are you talking about having Linux having am official supported IDE and code loading OR are you talking about the controller running something like uClinux?
Running Linux on the controller, not the development environment.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #4   Spotlight this post!  
Unread 12-02-2008, 23:48
stevethetinker stevethetinker is offline
Registered User
FRC #1288 (RAVEN)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2004
Location: St. Charles, MO
Posts: 35
stevethetinker is an unknown quantity at this point
Re: How important is Linux?

I would say that Linux on the controller is not important unless the robot controller system can also have disk files, a much wider telemetry link to/from the OI, etc. I suspect using Linux would make the "level playing field" problem worse rather than better. I agree with one of the other posters to this thread - writing Linux drivers is no picnic. The system we come up with needs to be much easier to use than that. Maybe one of the real-time variants of Linux would work. (I'm not familiar with any.)

No doubt there are a number of good RTOS designs that we could borrow from to implement these or similar ideas once we have a processor that can support them.

What we need is a basic RTOS that can provide one background "process" and provide an API that allows the programmer to hook up interrupt handlers. The one background process lets the programmer do compute-intensive tasks like navigation in a process that is not tied to the OI cycle. With the current framework such a process needs to be split into stages with such awkward constructs as switch statements. The worst part is writing the functions so that they can be called from the top each cycle. A background process in a RTOS does not need to be staged, or if coroutines are desired, a simple call to a RTOS function can be made to suspend the current coroutine so that another coroutine can be activated. The first coroutine then picks up at the spot where it left off next time it is activated through the coroutine interface. Coroutines don't require much API support (setjmp and longjmp are almost enough).

One key is that the 26.2 ms OI cycle needs to be driven from an interrupt, and there needs to be more than one priority of interrupts, so that things like gear tooth sensors can interrupt the 26.2 ms OI cycle interrupt (to be counted) and return to it. I think a system like this would help with the level playing field problem by providing support for interrupts (takes most of the arcane mumbo-jumbo out of it, though your new framework does a pretty good job).

Such an RTOS would not be complex (it could probably be written in less than 1000 lines of C code), but supporting it on our current processor would stretch it to the outer limits. I investigated the idea a couple of years ago and while I think it could be done, it is not practical.
  #5   Spotlight this post!  
Unread 13-02-2008, 21:50
Bigcheese Bigcheese is offline
C++0x FTW!
AKA: Michael Spencer
FRC #1771
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2008
Location: GA
Posts: 36
Bigcheese is a jewel in the roughBigcheese is a jewel in the roughBigcheese is a jewel in the roughBigcheese is a jewel in the rough
Re: How important is Linux?

This year we are using Linux via a desktop PC modified to fit within the rules. There is almost no latency if you use the programming port to communicate with the RC, and the only code we have on the RC is code to send input updates and receive output updates (only 5 lines of code (and a lookup table (It's dang fast))).

I feel that Linux is very important due to ease of use, support, and no vendor lock in. You can figure out how to do just about anything on Linux with only a good understanding of google, and most of the code you need for anything is already written in just about any language under the sun.
  #6   Spotlight this post!  
Unread 14-02-2008, 11:36
dcbrown dcbrown is offline
Registered User
AKA: Bud
no team
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Hollis,NH
Posts: 236
dcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud of
Re: How important is Linux?

Quote:
and the only code we have on the RC is code to send input updates and receive output updates (only 5 lines of code (and a lookup table (It's dang fast))).
Since there is no code within the user PIC processor - which PCI boards are you using to do data aquisition (analog and digital) on the PC? How expensive were they? Did you find it difficult to write the linux drivers for these boards and for the sonar, gyro, accelerometer, etc. drivers? What was the interrupt latency you measured? Really interested in this last one since latency needs to be down under 20us for things like the GTS sensor. The only unix kernel I know of that has decent real time latency are unix kernels built on top of the MACH OSF/1 microkernel.
  #7   Spotlight this post!  
Unread 14-02-2008, 18:23
Bigcheese Bigcheese is offline
C++0x FTW!
AKA: Michael Spencer
FRC #1771
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2008
Location: GA
Posts: 36
Bigcheese is a jewel in the roughBigcheese is a jewel in the roughBigcheese is a jewel in the roughBigcheese is a jewel in the rough
Re: How important is Linux?

Quote:
Originally Posted by dcbrown View Post
Since there is no code within the user PIC processor - which PCI boards are you using to do data aquisition (analog and digital) on the PC? How expensive were they? Did you find it difficult to write the linux drivers for these boards and for the sonar, gyro, accelerometer, etc. drivers? What was the interrupt latency you measured? Really interested in this last one since latency needs to be down under 20us for things like the GTS sensor. The only unix kernel I know of that has decent real time latency are unix kernels built on top of the MACH OSF/1 microkernel.
None. $0. No. 0μs.

Hope that answers your questions.

And then to explain. We do, as I said before, have a minimal amount of code on the PIC processor to forward input/output data between the robot controller and the Linux machine.

Last edited by Bigcheese : 14-02-2008 at 23:14.
  #8   Spotlight this post!  
Unread 15-02-2008, 12:32
dcbrown dcbrown is offline
Registered User
AKA: Bud
no team
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Hollis,NH
Posts: 236
dcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud of
Re: How important is Linux?

Quote:
Hope that answers your questions
Not really. You stated

Quote:
only 5 lines of code
and I'm wondering if that is true or if you are using the PIC to do all the robot h/w interfacing and only using linux for processing of that data.

It *is* possible to have five lines of code if the robot isn't using ANY controller digital inputs or outputs and has no pnuematics or sensors of any kind attached to the robot controller. In this case you can just pass the data packet from the OI to the linux box and vice versa. If that is the case then such a setup isn't useful for most teams.
  #9   Spotlight this post!  
Unread 15-02-2008, 12:42
Cuog's Avatar
Cuog Cuog is offline
Registered Linux User: 390661
AKA: Alex
FRC #0422
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2004
Location: Richmond, Virginia
Posts: 852
Cuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond repute
Send a message via AIM to Cuog
Re: How important is Linux?

I think he has 5 lines of code that loop through the lookup table and send the data stored there back and forth. That would be pretty low line count and also give useful access to controls.
__________________
KK4KQO
http://voltair.us
Too many projects, too little time.
  #10   Spotlight this post!  
Unread 09-09-2007, 19:35
ebarker's Avatar
ebarker ebarker is online now
Registered User
AKA: Ed Barker
FRC #1311 (Kell Robotics)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Kennesaw GA
Posts: 1,437
ebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond repute
Re: How important is Linux?

Kevin,

That is a great question. No doubt there are some advocates pushing linux because it is linux.

I think the better question is what is the best platform for this target audience?

For many users the code is input->process->output. The input being external I/O or the telemetry stream and vicey versey. That is even true for the camera and such. What I trying to say is the most users don't deal with interrupt driven routines or 'hard real time' requirements.

Momentarily ignoring things like interrupt driven pulse counters the user could write a plain old gnu app that interfaced to the external world via a kernel drive (supplied).

One downside is the development environment just got a whole lot bigger (relative to MPLab) plus it is more difficult for this level of user to hook custom hardware to the software or to configure some I/O pins.

I'm not sure that chasing an RTOS for this audience is a good idea. The linux idea has plus and minus points. I'm not too sure the plus'es outweigh the minuses primarily because of what it takes to get to the hardware.

I write linux kernel drivers to do I/O to the world and it ain't trivial. (Kevin already knows this isn't trivial because he is Kevin).

What say you world out there ?
__________________
Ed Barker
  #11   Spotlight this post!  
Unread 09-09-2007, 19:46
MrForbes's Avatar
MrForbes MrForbes is online now
Registered User
AKA: Jim
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Sierra Vista AZ
Posts: 5,999
MrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond repute
Re: How important is Linux?

Quote:
Originally Posted by ebarker View Post
No doubt there are some advocates pushing linux because it is linux.
either that, or because it is NOT (insert unfavorite OS name here).
  #12   Spotlight this post!  
Unread 09-09-2007, 19:50
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: How important is Linux?

I'm an Assembly/C guy... i feel like you have enough problems debugging your own code let alone the 10's or 100's of people's code you add in to the mix with an RTOS...

Plus, the FIRST controller as it sits doesn't have enough MIPS and memory to run much of an RTOS along with running the user's tasks at the same time... it's more than enough for Assembly/C/EasyC people to run wild but I'm not sure about a full blown RTOS...

Just my 0.81 Rupees...

-q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08
  #13   Spotlight this post!  
Unread 09-09-2007, 20:26
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: How important is Linux?

Does an OS necessarily have to complicate things? I would think some example/default code could be provided that runs in a single thread, follows the input->process->output paradigm and in general behaves in much the same way as the current system. If more advanced users want to explore the extended feature set an RTOS has to offer they may do so. If you look at a PC running windows it is extremely complex, but you can still write a "hello world" program without understanding the many levels of abstraction below you.
__________________
1139 Alumni
  #14   Spotlight this post!  
Unread 09-09-2007, 19:53
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Re: How important is Linux?

There is a small vocal crowd that would like linux as a platform
do develop their RC program, and other things, but running an
OS on the robot controller itself is a bad idea.

Having at least a 16 bit processor for the RC, with a clean
implementation for the I-O, and most importantly, interrupts,
would be great. One does not really need an OS running
on the RC to get these things.

The 8 bit addressing, the interrupt functionality that has suffered
from gremlins since the 8722 was introduced and the arcane
violations of the ANSI C standard to obtain more efficient
execution on an 8 bit processor would most certainly be things to
leave behind.

Eugene
  #15   Spotlight this post!  
Unread 09-09-2007, 20:18
jtdowney jtdowney is offline
Boiler Up
AKA: John Downey
FRC #4302 (Robophins)
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2006
Location: Chicago
Posts: 300
jtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant future
Re: How important is Linux?

Outside of the technical details of actually implementing Linux on the RC the amount of very good and free development tools provided by GNU would be an incentive.

In addition the community and spirit of open source is highly compatible with FIRST and gracious professionalism.
__________________
John Downey
Lead Robot Inspector - Purdue IndianaFIRST District
Whitney Young Magnet High School/Robophins (FRC 4302) - Mentor (2013-current)
Midwest Regional Planning Committee - Member (2012-current)
Boilermaker Regional Planning Committee - Member (2011-2014)
Robot Inspector (2008-current)
Purdue FIRST Programs - Staff Advisor (2008-2011)
Lafayette-Jefferson High School/Precision Guessworks (FRC 1646) - Mentor (2006-2011)
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
All Teams IMPORTANT LEDs Dr.Bot General Forum 8 14-03-2006 16:01
Any teams use Linux? gobeavs IT / Communications 14 03-04-2005 17:58
How important is scouting in 05 FIRST JerseyKid Scouting 16 10-02-2005 23:55
How Important Is Capping? fred Rules/Strategy 32 16-03-2004 10:06
How important is a machine shop? archiver 2001 13 24-06-2002 04:14


All times are GMT -5. The time now is 21:24.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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