How can i open Rviz as ubuntu startup application
Hello,
How can i open Rviz as ubuntu startup application?
Thanks, best regards.
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
The main issue with starting RViz on startup is that it has to have access to, and wait, until the X server is available. This ROS Answers thread describes a systemd file that accomplishes this.
It depends on what ROS version you are using. If you are using ROS2 Foxy, do as follows
Create a file in the following path.
~/.config/autostart/rviz.desktop
Then, copy-paste the following to the file. (reference: link)
[Desktop Entry] Type=Application Exec=/opt/ros/foxy/lib/rviz2/rviz2 Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name[en_US]=Rviz2 Name=/opt/ros/foxy/lib/rviz2/rviz2 Comment[en_US]= Comment=
Reboot
Thank you so much for your support but did not work . I use ros-melodic and ubuntu 18.04 [Desktop Entry] Type=Application Exec=/opt/ros/melodic/lib/rviz/rviz Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name[en_US]=Rviz Name=/opt/ros/melodic/lib/rviz/rviz Comment[en_US]= Comment=
no change happens when i restart my computer. there is no log file, there is no information about the reason. What do you think could be the reason?
Thanks, best regards.
I thought it would work as it is how you run applications on startup but I tested it and it didn't work. What actually made it work was running a terminal window on startup and putting Rviz in the ~/.bashrc file. Then, Rviz was successfully started up by the terminal window.
Hope this helps, Jaehyun
Type below in the terminal window.
$ echo 'rviz' >> ~/.bashrc
If you think you need to learn some more techniques you use with ROS, check out this link and follow the provided tutorial.
Asked: 2021-02-16 15:28:15 -0500
Seen: 575 times
Last updated: Jun 28 '21
Float32MultiArray in pub/sub example
How to make ros3djs respect the frame_locked marker message parameter?
rosserial esp32: unable to sync
How to localize diff drive robot on static map using lidar?
Can't i use pepperl fuchs r2000 sensor in ROS 20.04 noetic?
UR5e with PC Ros + MoveIt Can't accept new action goals Controller is not running
Problem in assigning a callback when it is a method (Rviz Interactive Markers)