ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How Important is Root Access to Use ROS?

asked 2023-02-09 19:28:48 -0500

wenchao gravatar image

updated 2023-02-16 11:10:09 -0500

The machines at school by default wouldn't give me root access. However, I could get around that by bringing my own drive, but I don't know if it's worth the hassle. (I don't plan to install the drive inside the machine, so the connection would be via USB.) ROS would be an important consideration, but of course I'd appreciate answers on the importance of root access in general for Linux machines. (I have been using school Windows machines without much trouble, but couldn't find on the Internet on whether it'd be more of a headache for Linux.) Thanks.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2023-02-17 12:49:53 -0500

peci1 gravatar image

Robostack allows you to install a subset of ROS inside conda environments, which needs no root access at all (of course, except for device access).

Another option is to use Singularity containers. For these, you need root access to build the image (on any machine), and no root access on the "target" machine (where you want to just run the code). Here's our simplified guide for students: https://cw.fel.cvut.cz/b222/courses/a... .

edit flag offensive delete link more

Comments

RoboStack looks like a good option. Their site says "No root access required - install ROS on shared workstations & high-performance computers." I am not quite familiar with containerization. Why didn't you use RoboStack?

wenchao gravatar image wenchao  ( 2023-02-17 14:29:47 -0500 )edit

The list of packages available in RoboStack is limited (only a subset of desktop-full). For the labs, we wanted to provide the students with a standard-looking ROS install.

peci1 gravatar image peci1  ( 2023-03-05 03:58:32 -0500 )edit
1

answered 2023-02-16 10:06:55 -0500

rreignier gravatar image

You do not need to be root to run ROS nodes.

But to install ROS and its dependencies, you need privileged rights (the rights to run sudo apt install package-name). And to access some hardware interfaces like a serial port (/dev/ttyUSB0), your user needs to be in special group like dialout. To add your user to a new group, you also need superuser privileges.

So, to run ROS, you don't need root access but to install and configure your system, you do need to be root.

edit flag offensive delete link more

Comments

1

It's probably possible to build ROS from source without having any root access.

That would require building a lot of sw from source (as there are quite a few dependencies), but theoretically it could be done. Nothing in ROS requires root when building it.

Using apt does require the needed access, but that's not unique to ROS. That's just a consequence of how Debian (and derivative) systems are configured.

gvdhoorn gravatar image gvdhoorn  ( 2023-02-16 10:10:35 -0500 )edit
1

Sure, but to build ROS from source, one needs to install a lot of dependencies with apt.

rreignier gravatar image rreignier  ( 2023-02-16 10:13:47 -0500 )edit

Nowadays, an alternative would be to use Docker. If Docker is installed and the user is in the docker group, the user can have root access inside the container. ade is a nice tool to develop inside a Docker environment.

rreignier gravatar image rreignier  ( 2023-02-16 10:15:45 -0500 )edit

It seems that it's less of a hassle to use my own drive. This makes sense, as Linux is more lightweight than Windows. (Software installation without root access on Windows hasn't been an issue.) In terms of Docker, I have little experience with it, and I doubt the school machine has it.

wenchao gravatar image wenchao  ( 2023-02-16 11:09:06 -0500 )edit
1

Then make sure to use an SSD because using an HDD on USB as system disk is very slow.

rreignier gravatar image rreignier  ( 2023-02-16 11:13:12 -0500 )edit

Thanks for the comments. I was not able to find much about how important root access is for Linux.

wenchao gravatar image wenchao  ( 2023-02-16 11:19:25 -0500 )edit
1

Sure, but to build ROS from source, one needs to install a lot of dependencies with apt.

No, that's what the normal build-from-source instructions ask you to do.

There's nothing in there which makes that a requirement, and you can also build dependencies from source (in your $HOME fi).

It's more work, it will take longer, but that's the price you pay.

gvdhoorn gravatar image gvdhoorn  ( 2023-02-16 13:04:49 -0500 )edit

I agree with gvdhoorn.

wenchao gravatar image wenchao  ( 2023-02-20 08:21:03 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2023-02-09 19:28:48 -0500

Seen: 238 times

Last updated: Feb 17 '23