Using A PS3 With The cRio

Whos down? :yikes: Think of all the power you have in your hands. Boot up linux and take charge of the SPUs on the PS3, will be the bomb. Why would you need it you ask? :rolleyes: Autonomous, See the DARPA Cars, they have like 10-20 PC in the trunk. Its $300 so its under the $400 rule and a lot more potential than Arduino or other tiny things. You see where I am going with this? You will have a bad boy of a robot next year if you fully utilize the autonomous perception, logic and have it run on a PS3. Yes sure the PS3 can not control motors itself (Its illegal too BTW) so it communicates with the cRio using an ethernet cable and the sensors with USB bridged by Arduino and cameras just directly connected by USB. Its genius, My goal would be to utilize a PS3 with Fully Autonomous control next year. My dreams get bigger and bigger…

Resources:
http://www.ibm.com/developerworks/power/cell/docs_articles.html
http://www.ibm.com/developerworks/views/power/libraryview.jsp?type_by=Tutorials
http://www.ibm.com/developerworks/power/library/pa-ps3lab1/index.html
http://www.ibm.com/developerworks/power/library/l-linux-ps3-1/index.html
http://www.ibm.com/developerworks/power/library/pa-linuxps3-1/index.html
http://www.ibm.com/developerworks/power/library/pa-linuxps3-2/index.html

http://www.ibm.com/developerworks/views/power/libraryview.jsp?sort_by=&show_abstract=true&show_all=&search_flag=&topic_by=-1&type_by=Articles&search_by=ps3&Go.x=0&Go.y=0

I made this thread because this forum seems to die off after the competition… Keep the fire burning

Sorry to rain on your parade but Sony just disabled the Other OS option for the PS3.

:smiley: Still running linux on my baby:rolleyes: They said we don’t have to update our ps3 if we still wanted Linux
Also I have 4 USB ports and emotion engine chip but its the Japanese launch PS3, so never updating it…

What about the motor that is used for the bluray drive?
There are 2 reasons why that would be illegal
1 - Motor not in the KOP
2 - Motor not controlled by the cRIO, victor, jaguar, or spike

and if there is a hard drive (not solid state), then that is illegal for the same reasons

:rolleyes: Take out the Blu Ray, the PS3 can run fine without it, just no games… I had a problem with that for a while… And we can always get a SS drive

I really am annoyed by the super strict rules that FIRST has… It annoys and pisses me off little by little every day…

You could also update and still have the option. I remember reading the warning message telling me that I would no longer be able to select that option. The message also gave instructions on how to keep the option and get the latest update.

I Updated anyways thinking I would never use that option anyways…

Wait seriously? I thought once you update there is no turning back. Now I got to research this.

Using the PS3 is an interesting concept. I wonder if this could work out.

It’d take a lot of modification, far more than the usefulness it would provide.

Stuff it has:
Hard drive
Blu-Ray drive (biggest plus)
Large number of processor and graphics cores

Stuff you would have to take out
Blu-Ray Drive
Hard Drive
Cooling fans on CPU/GPU’s (although these can be replaced with KOP fans)

What you would get in software if you did all of this:
A ridiculous amount of processing power. There is legitimately no way to use all of this on a robot, even with several camera’s worth of vision processing. Plus the nVidia GPU cores would do hardly anything. You could use the GPU cores to generate a virtual model of your bot (in real time) with the sensor data vs actual (ghost model vs real model), and even probably a virtual playing field, even with no optimization at all, and not come close to running out of power (but this would take you forever to code)

What can you use on your robot, realistically?
Vision. That’s about it. You can already do just about everything else on the cRio.

A PS3 would be way-overkill for the problem (vision). Look at the problem and find the simplest solution. Don’t look at a solution and try to find a problem to solve with it. The simplest solution used to be the CMUcam. It worked well. The simplest solution still involves a co-processor (there’s just not enough power in the cRio to reliably process vision data), just not one as big as the PS3.

About the FIRST rules: They are there for a reason.
PWM/Spike outputs from cRio: This is for safety. They can always disable your robot if it is out of control.
No wireless: They don’t want a spectator in the stands driving the robot.
Motors: Exact same power per robot. You can’t have more mechanical power then the other guy.
It is perfectly legal to have a co-processor as long as it does not drive outputs. This is for safety, it’s not FIRST being super-strict. Although one has to wonder how a motor in a Blu-Ray drive would cause a safety issue, one also has to wonder why you would ever need a Blu-Ray drive. Same for the hard drive, the vibrations/impacts sustained during play probably wouldn’t be good for it anyway.

Edit: After re-reading your original post, I see that you are still bent on fully autonomous.
Do you know why DARPA robots have 10 computers? Did you also know that many have far fewer (1-2)?
Have you ever heard of IGVC? They run an autonomous ground-vehicle competition in grass fields, with robots roughly the size of ours, and use 1-2 computers per robot. Most of that goes into vision.
The cRio is capable enough to handle the navigation and state-machines if it has the vision data processed separately. On a FIRST field, the navigation is purely 2d, so that simplifies things greatly. Then, its just up to having a co-processor reading the images, and determing data such as the distance forward, horizontal, and angle and feeding it to the cRio to navigate on. I completely agree that you need more processing to work with images, but the PS3 may not be the correct answer.

I wish you can use GPU, but we are restricted to the Cell Processor, which is more than we need, but think, to be as fast as possible, we would use more $ to get a PC with 6 cores (PS3 doesnt have 6 cores, but 6 SPUs that we can access, there are actually 9, but other 3 is not for use in linux) My goal is to minimize the time to process the images so the robot can compete with humans. Like in Chemistry, the Rate Determining Step is always teh slowest one, you are as strong as your weakest link, make your weakness better. Well getting multi core PC might be an alternate to PC, but Honestly PS3 is cooler

I would use a small single-core PC and connect it only to the camera (usb) and Ethernet to the cRio. Nothing else.
Here are its primary tasks:
Get image and find shapes
Relate shapes to objects
Determine angle of shapes and position in space
Filter objects that are invalid (e.g. too far away or whatnot)
Send remaining array of objects to cRio
Many platforms can do that. The cRio can too, but that takes too much power away from everything else.

I guess, but I was going to do the logic on the co processor too. So use several cores to get images from several cameras and use the remaining to regulate and do logic. I think its best to prepare for the future, the every day computer now days are dual core, or even quad, they get bigger and stronger every year, so thinking into the future and get multi threading under your belt because it will be a norm by the time I am in college and in the work force. So always invest in more knowledge. Im not arguing, I just think you should shoot a little further than you need so you gain that much more experience

edit: lets do some math:

R = 8 bit
B = 8 bit
G = 8 bit
Therefore
RGB pixel = 24 bit
Lets use 800 * 600 resolution
480,000 pixels in 1 image
Thats 11,520,000 bits per image
Or 1.37329102 megabytes per image
And lets say we are taking 60 pics per second: 82.3974612 MBs per second
Now image 4 cameras 329.589845 MBs per second usage in the ram. Thats is alot of memory just for imaging. Yes you can argue you should compress it better or have better memory management, I am merely trying to prove a point. You need a lot of juice

I was assuming 320x240 at 10fps, since that is reasonably fast and low power. I was assuming 2 cams max.
You don’t really need 4 cameras. What could you do with all of that?

usual robots are 4 sided, so I just picked 4. You don’t want a blind side

Instead of 4, general cameras i think that 2 would be sufficient.
one of the cameras would be pointing towards the ceiling, with a reflective cone over it.
This would allow for omnidirectional vision.
This camera would be useful for most tasks ie navigation, collision avoidance

the second camera would be on a pan / tilt gimble.
This would be used for finer details that the omni camera couldn’t pick up.
a use for this would be the vision target this year, use this camera to line up the bot exactly

Now, that is a good idea, but think of the rules on motors, if teh servos have to be controlled by the crio and the PC does imaging, they would have to communicate really well then… The cRio sends a request to process image and the position of the servo to the pc, the pc does its job, tells crio what do do. Eh, its possible

Edit:
Major flaw, what class controls the ethernet? I tried looking through the Axis Camera class (the most obvious way to find it) I could not find it…

That is how the cmucam’s gimble was controlled.
There should be enough throughput in whatever medium that you are communicating with the cRio to send two floating point numbers (the pan -1 to 1, and the tilit -1 to 1).

ex: processed data, pan servo val, tilt servo val

this shouldn’t be a problem because you are already communicating with the cRio, right?

Its all on paper, just coding with paper and pencil, Have the image class all made up, got the pseudo code for communication… now I need the actual classes:D :stuck_out_tongue: :rolleyes:

edit: I know how to use the serial, just want to use ethernet, 1gb of info per second? I can just let that go

Well, the compactRIO only has 10/100 mbit/sec ethernet ports, so not quite a gig/sec

and are you going to use axis 206 (and its replacement) cameras on the coprocessor?
if so, look up mjpeg. that is the protocol on which they send the images over ethernet

Not I will be using USB cameras, so I was just looking to send raw data through the ethernet

Do you have a camera in mind?

Most USB cameras that I have seen have been primarily webcams, and don’t have very good resolution, or high framerate.

Edit:

As far as communication over ethernet to the cRio goes, implementation details can be found by looking through the 2CAN driver source. That can be found at Firstforge.
Firstforge 2CAN repository
Login is required