clearpathrobotics / robot_upstart

ROS package of helper functions related to bringing up roslaunch on system startup.
BSD 3-Clause "New" or "Revised" License
192 stars 94 forks source link

Rviz Problem #103

Open aliozcan01 opened 3 years ago

aliozcan01 commented 3 years ago

Hello,

Thank you for providing this package as open source. I can run this package standard launch files, but I can't run launch with rviz. How can I use rviz with this package? in log file: rviz process has died

Thanks, best regards.

Ubuntu 18.04 ROS Melodic

Jamesnt commented 2 years ago

I had a similar issue. It was due to the Xorg server not being defined.
I am running Ubuntu 20.04, ROS Noetic

rosrun robot_upstart install --job test .....

I solved it in my installation by adding the following environment variables into the generated test.launch file which robot_upstart placed at /lib/systemd/system/test.service

This may not be best practices.

[Unit] Description="bringup test" After=network.target After=display_manager.service Wants=display_manager.service

[Service] Type=simple Environment="XAUTHORITY=/run/user/1000/gdm/Xauthority" Environment="DISPLAY=:0" Environment="XDG_RUNTIME_DIR=/home///tmp" Environment="HOME=/home/" ExecStart=/usr/sbin/test-start

[Install] WantedBy=multi-user.target