Why does ROS require Ubuntu to be logged in?

asked 2022-02-01 16:45:47 -0600

evan.kotara gravatar image

updated 2022-02-13 11:58:40 -0600

Mike Scheutzow gravatar image

I've got a custom hardware controller on Galactic launching as a user systemd service. I'm trying to get it to start on an RPi, headless.

The service starts fine before login, but the bot only starts responding to my teleop_joy once the user has logged into the Unity DE. It still works if you log out. There is no RViz nor gui.

I hadn't imagined it should depend on Xorg. The ROS logs are exactly the same in both instances (starting before/after login).

What am I missing? Should I just have Ubuntu log in automatically? My apologies if this is not the correct place/way to ask this.

edit retag flag offensive close merge delete

Comments

I am not super familiar with this issue but the .bashrc comes to mind. I understand that effect only takes place when you would start a bash session, but have you tried moving all your ros specific env variables to the rc.local?

Akhil Kurup gravatar image Akhil Kurup  ( 2022-02-02 10:13:48 -0600 )edit

Thanks! I'm still learning systemd, but I'm pretty sure the bash env is isolated, as a system level systemd wouldn't work. It had to be run as the user, my bringup script setting HOME.

The only real difference I'd seen is GDE3 (login window) is running on Xwayland then Ubuntu switches to Xorg afterwards.

I'd been testing the service by ssh, before the login. I don't think ROS modifies any files upon login, but I don't know.

I guess for now the bot will just auto login and be open to anyone with an hdmi cable lol. It just seems weird if this is typical in a system both with/without a DE.

evan.kotara gravatar image evan.kotara  ( 2022-02-02 11:00:37 -0600 )edit

Is this hardware connected to the RPI using usb?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-02-13 11:57:40 -0600 )edit