RoboRIO as a computer

I’m glad this discussion came up - as one new to the FRC environment. What do people think about he limitations of the RoboRio? In my mind it’s hardly a computer. No local file system. No exposed process management. Out team spent much effort networking in a second computer (think Raspberry PI, or Nvidia Jeston), but this added huge complexity to the design.

_JM

2 Likes

The Rio runs on a Linux distribution, you can SSH/SFTP into it and read the filesystem and everything. When you deploy, all your code lands in the /home/lvuser directory. It’s more or less fully functional.

24 Likes

Good, Thanks! What credentials do you use for lvuser? Does lvuser have superuser privileges? _JM

I don’t think it has SU privileges, but there’s no password for lvuser or admin, which does have SU.

4 Likes

It sounds like you are approaching the RoboRio as if it was a laptop, desktop or mainframe computer. The RoboRio comes from the industrial control world. Industrial controllers have much less memory and are often designed to respond to external stimuli ( sensor inputs) in a very short and well defined time. If you are the software mentor, it may be beneficial to find someone with a “firmware” background to help you and your team get up to speed faster.

I think there was only one project I worked on over the last 36 years where the firmware programmers chose to use a real time operating system (RTOS). All the other processor boards I designed “just ran the application firmware” without an operating system.

I see your point. I don’t want to replace the RoboRio - or make it run like a conventional computer, but as I mentioned I’d like to offload the compute intensive work (e.g. vision & autonomous planning) to a separate device. It’s ease of integration i’m focused on.

1 Like

For vision, the WPILib Raspberry PI image can get you started very quickly. What do you have in mind for autonomous planning? Most autonomous planning/pathing algorithms I’ve seen used in FRC run perfectly fine on the RIO.

yeah, the RIO works effectively as a computer. We regularly log data to CSVs and save them on a flash drive mounted on the RIO.

In addition to the points that have already been mentioned, remember that for safety reasons portions of the Rio are locked away from us. It has more capability than we use, because some of it is taken by the underlaying software.

1 Like

The next question then is how to communicate between PI and RoboRio. I suppose some use network tables for this. We came up with a lightweight TCP/IP session, but I’m not satisfied that this is the best way.

I want to run TensorFlow to use neural nets to learn a trajectory.

Networktables is the most “out of the box” solution. We have rolled our own socket protocols in the past too but this is easier.

ZeroMQ is a good option if you don’t want to use NT.

What do you mean by “learning a trajectory”?

1 Like

What kind of trajectory are you predicting? Depending on the size of your network, the pi is a good computer- but it’s nit the best for inference of neural networks. I’d suggest something like the nvidia jetson (https://developer.nvidia.com/buy-jetson) or google coral (https://coral.withgoogle.com/).

Trust me. TensorFlow (even the Lite version, designed for low-power ARM processors) will NOT run on the roboRIO in any capacity.

I totally don’t know this because I definitely didn’t try it. :wink:

More seriously. Use a device with an Nvidia card, be it a Jetson, or a 1050 Ti mounted to the side of the robot with a weird power delivery structure for TensorFlow. It will save you a lot of pain.

1050 TI would be nice - though it may drain your battery. My limited experience with the coral makes me think it maybe the way to go. Take a look at the comparison here https://blog.usejournal.com/google-coral-edge-tpu-vs-nvidia-jetson-nano-a-quick-deep-dive-into-edgeai-performance-bc7860b8d87a.

I meant the 1050 Ti thing as a joke, but apparently it has been done: Is there any reason to not allow anything above 4 mbps?

Jetson is definitely the way to go if you can take full advantage of it’s capabilities.

1 Like