1
$\begingroup$

Rosanswers logo

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.


Originally posted by wenchao on ROS Answers with karma: 1 on 2023-02-09

Post score: 0

$\endgroup$

2 Answers 2

1
$\begingroup$

Rosanswers logo

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.


Originally posted by rreignier with karma: 544 on 2023-02-16

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2023-02-16:
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.

Comment by rreignier on 2023-02-16:
Sure, but to build ROS from source, one needs to install a lot of dependencies with apt.

Comment by rreignier on 2023-02-16:
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.

Comment by wenchao on 2023-02-16:
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.

Comment by rreignier on 2023-02-16:
Then make sure to use an SSD because using an HDD on USB as system disk is very slow.

Comment by wenchao on 2023-02-16:
Thanks for the comments. I was not able to find much about how important root access is for Linux.

Comment by gvdhoorn on 2023-02-16:\

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.

Comment by wenchao on 2023-02-20:
I agree with gvdhoorn.

Comment by wenchao on 2023-03-01:
A few comments discourage installing from source without much explanation: https://answers.ros.org/question/234948/unable-to-locate-ros-packages/. I'd curious to know why.

Comment by gvdhoorn on 2023-03-05:
I'm not sure what your question is. The Q&A linked does not seem to have any comments like you describe.

Also:

For the labs, we wanted to provide the students with a standard-looking ROS install.

are you a student, or a teacher?

If the latter: if the PCs you have available do have Linux, but no root access -- nor would that be a possibility -- you could look into using Singularity. It's like Docker, but is always "rootless". We've used it successfully to distribute a full Noetic ROS 1 release to students for a course.

$\endgroup$
0
$\begingroup$

Rosanswers logo

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/aro/tutorials/ros .


Originally posted by peci1 with karma: 1366 on 2023-02-17

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by wenchao on 2023-02-17:
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?

Comment by peci1 on 2023-03-05:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.