Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run demos using a remote display? #172

Closed
gmacario opened this issue Sep 3, 2024 · 2 comments
Closed

How to run demos using a remote display? #172

gmacario opened this issue Sep 3, 2024 · 2 comments

Comments

@gmacario
Copy link

gmacario commented Sep 3, 2024

I would like to be able to run the Space ROS Space Robots Demo Docker on a powerful headless server (hw2482) while displaying the Gazebo GUI on my local machine (delta).

Both hosts are running Ubuntu-desktop 24.04.1 LTS and can communicate via SSH.

Unfortunately I have been unable to accomplish my goal so far.
Here is what I tried:

  1. On my local workstation (HW2228) I first log into the remote server using ssh -Y hw2482

  2. If I run some X client application on the server (for instance, xlogo or xeyes), they are correctly displayed on my local machine:

    image

  3. However, when I execute the following instructions (from https://github.com/space-ros/docker/tree/main/space_robots#running-the-demos) to run the container on the remote server

# Logged in as gmacario@delta
ssh -Y hw2482

# Logged in as gmacario@hw2482
cd ~/github/space-ros/docker/space_robots
xhost +local:docker
./run.sh

# Inside container on hw2482
ros2 launch mars_rover mars_rover.launch.py

I get the X11 connection rejected because of wrong authentication. error as shown below:

gmacario@delta:~$ ssh -Y hw2482
Welcome to Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-41-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

Expanded Security Maintenance for Applications is not enabled.

0 updates can be applied immediately.

8 additional security updates can be applied with ESM Apps.
Learn more about enabling ESM Apps service at https://ubuntu.com/esm

Last login: Tue Sep  3 22:41:57 2024 from 100.69.53.95
gmacario@hw2482:~$ cd ~/github/space-ros/docker/space_robots
gmacario@hw2482:~/github/space-ros/docker/space_robots$ xhost +local:docker
non-network local connections being added to access control list
xhost:  must be on local machine to add or remove hosts.
gmacario@hw2482:~/github/space-ros/docker/space_robots$ ./run.sh
spaceros-user@hw2482:~/demos_ws$ ros2 launch mars_rover mars_rover.launch.py
[INFO] [launch]: All log files can be found below /home/spaceros-user/.ros/log/2024-09-03-20-51-03-883237-hw2482-91
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ign gazebo-1]: process started with pid [92]
[INFO] [robot_state_publisher-2]: process started with pid [94]
[INFO] [create-3]: process started with pid [96]
[INFO] [move_arm-4]: process started with pid [98]
[INFO] [move_mast-5]: process started with pid [100]
[INFO] [move_wheel-6]: process started with pid [102]
[INFO] [run_demo-7]: process started with pid [104]
[INFO] [odom_tf_publisher-8]: process started with pid [106]
[INFO] [parameter_bridge-9]: process started with pid [108]
[INFO] [image_bridge-10]: process started with pid [110]
[create-3] [ros_ign_gazebo] is deprecated! Redirecting to use [ros_gz_sim] instead!
[create-3] 
[robot_state_publisher-2] Warning: link 'lidar_link' material 'black' undefined.
[robot_state_publisher-2]          at line 84 in /home/spaceros-user/spaceros/src/urdfdom/urdf_parser/src/model.cpp
[robot_state_publisher-2] Warning: link 'lidar_link' material 'black' undefined.
[robot_state_publisher-2]          at line 84 in /home/spaceros-user/spaceros/src/urdfdom/urdf_parser/src/model.cpp
[robot_state_publisher-2] [INFO] [1725396664.519034503] [robot_state_publisher]: got segment arm_01
[robot_state_publisher-2] [INFO] [1725396664.519136629] [robot_state_publisher]: got segment arm_01_to_arm_02
[robot_state_publisher-2] [INFO] [1725396664.519155364] [robot_state_publisher]: got segment arm_02
[robot_state_publisher-2] [INFO] [1725396664.519170013] [robot_state_publisher]: got segment arm_02_to_arm_03
[robot_state_publisher-2] [INFO] [1725396664.519184321] [robot_state_publisher]: got segment arm_03
[robot_state_publisher-2] [INFO] [1725396664.519198718] [robot_state_publisher]: got segment arm_03_to_arm_04
[robot_state_publisher-2] [INFO] [1725396664.519215497] [robot_state_publisher]: got segment arm_04
[robot_state_publisher-2] [INFO] [1725396664.519237903] [robot_state_publisher]: got segment arm_04_to_arm_tools
[robot_state_publisher-2] [INFO] [1725396664.519253093] [robot_state_publisher]: got segment arm_tools
[robot_state_publisher-2] [INFO] [1725396664.519267454] [robot_state_publisher]: got segment back_wheel_L
[robot_state_publisher-2] [INFO] [1725396664.519283727] [robot_state_publisher]: got segment back_wheel_R
[robot_state_publisher-2] [INFO] [1725396664.519298952] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-2] [INFO] [1725396664.519313196] [robot_state_publisher]: got segment base_link
[robot_state_publisher-2] [INFO] [1725396664.519327503] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-2] [INFO] [1725396664.519341860] [robot_state_publisher]: got segment chassis
[robot_state_publisher-2] [INFO] [1725396664.519356169] [robot_state_publisher]: got segment chassis_to_arm_01
[robot_state_publisher-2] [INFO] [1725396664.519372212] [robot_state_publisher]: got segment chassis_to_mast_p
[robot_state_publisher-2] [INFO] [1725396664.519386637] [robot_state_publisher]: got segment front_wheel_L
[robot_state_publisher-2] [INFO] [1725396664.519401123] [robot_state_publisher]: got segment front_wheel_R
[robot_state_publisher-2] [INFO] [1725396664.519415539] [robot_state_publisher]: got segment left_axis
[robot_state_publisher-2] [INFO] [1725396664.519429815] [robot_state_publisher]: got segment lidar_link
[robot_state_publisher-2] [INFO] [1725396664.519444218] [robot_state_publisher]: got segment mast_02
[robot_state_publisher-2] [INFO] [1725396664.519458671] [robot_state_publisher]: got segment mast_02_to_mast_cameras
[robot_state_publisher-2] [INFO] [1725396664.519473440] [robot_state_publisher]: got segment mast_cameras
[robot_state_publisher-2] [INFO] [1725396664.519487914] [robot_state_publisher]: got segment mast_p
[robot_state_publisher-2] [INFO] [1725396664.519502457] [robot_state_publisher]: got segment mast_p_to_mast_02
[robot_state_publisher-2] [INFO] [1725396664.519517595] [robot_state_publisher]: got segment middle_wheel_L
[robot_state_publisher-2] [INFO] [1725396664.519533291] [robot_state_publisher]: got segment middle_wheel_R
[robot_state_publisher-2] [INFO] [1725396664.519547675] [robot_state_publisher]: got segment right_axis
[robot_state_publisher-2] [INFO] [1725396664.519561934] [robot_state_publisher]: got segment suspension_arm_B2_L
[robot_state_publisher-2] [INFO] [1725396664.519576240] [robot_state_publisher]: got segment suspension_arm_B2_L_to_middle_wheel_L
[robot_state_publisher-2] [INFO] [1725396664.519591180] [robot_state_publisher]: got segment suspension_arm_B2_L_to_suspension_steer_B_L
[robot_state_publisher-2] [INFO] [1725396664.519607625] [robot_state_publisher]: got segment suspension_arm_B2_R
[robot_state_publisher-2] [INFO] [1725396664.519623099] [robot_state_publisher]: got segment suspension_arm_B2_R_to_middle_wheel_R
[robot_state_publisher-2] [INFO] [1725396664.519647830] [robot_state_publisher]: got segment suspension_arm_B2_R_to_suspension_steer_B_R
[robot_state_publisher-2] [INFO] [1725396664.519662856] [robot_state_publisher]: got segment suspension_arm_B_L
[robot_state_publisher-2] [INFO] [1725396664.519675899] [robot_state_publisher]: got segment suspension_arm_B_L_to_B2_L
[robot_state_publisher-2] [INFO] [1725396664.519688494] [robot_state_publisher]: got segment suspension_arm_B_R
[robot_state_publisher-2] [INFO] [1725396664.519703348] [robot_state_publisher]: got segment suspension_arm_B_R_to_B2_R
[robot_state_publisher-2] [INFO] [1725396664.519716215] [robot_state_publisher]: got segment suspension_arm_F_L
[robot_state_publisher-2] [INFO] [1725396664.519730044] [robot_state_publisher]: got segment suspension_arm_F_L_to_suspension_steer_F_L
[robot_state_publisher-2] [INFO] [1725396664.519743573] [robot_state_publisher]: got segment suspension_arm_F_R
[robot_state_publisher-2] [INFO] [1725396664.519756779] [robot_state_publisher]: got segment suspension_arm_F_R_to_suspension_steer_F_R
[robot_state_publisher-2] [INFO] [1725396664.519771304] [robot_state_publisher]: got segment suspension_steer_B_L
[robot_state_publisher-2] [INFO] [1725396664.519784454] [robot_state_publisher]: got segment suspension_steer_B_L_to_back_wheel_L
[robot_state_publisher-2] [INFO] [1725396664.519799008] [robot_state_publisher]: got segment suspension_steer_B_R
[robot_state_publisher-2] [INFO] [1725396664.519812508] [robot_state_publisher]: got segment suspension_steer_B_R_to_back_wheel_R
[robot_state_publisher-2] [INFO] [1725396664.519826636] [robot_state_publisher]: got segment suspension_steer_F_L
[robot_state_publisher-2] [INFO] [1725396664.519860966] [robot_state_publisher]: got segment suspension_steer_F_L_to_front_wheel_L
[robot_state_publisher-2] [INFO] [1725396664.519875725] [robot_state_publisher]: got segment suspension_steer_F_R
[robot_state_publisher-2] [INFO] [1725396664.519890546] [robot_state_publisher]: got segment suspension_steer_F_R_to_front_wheel_R
[parameter_bridge-9] [INFO] [1725396664.573952123] [ros_gz_bridge]: Creating GZ->ROS Bridge: [/clock (ignition.msgs.Clock) -> /clock (rosgraph_msgs/msg/Clock)] (Lazy 0)
[create-3] [INFO] [1725396664.574773569] [ros_gz_sim]: Requesting list of world names.
[parameter_bridge-9] [INFO] [1725396664.574856333] [ros_gz_bridge]: Creating GZ->ROS Bridge: [/model/curiosity_mars_rover/odometry (ignition.msgs.Odometry) -> /model/curiosity_mars_rover/odometry (nav_msgs/msg/Odometry)] (Lazy 0)
[parameter_bridge-9] [INFO] [1725396664.575758941] [ros_gz_bridge]: Creating ROS->GZ Bridge: [/model/curiosity_mars_rover/odometry (nav_msgs/msg/Odometry) -> /model/curiosity_mars_rover/odometry (ignition.msgs.Odometry)] (Lazy 0)
[parameter_bridge-9] [INFO] [1725396664.576692417] [ros_gz_bridge]: Creating GZ->ROS Bridge: [/scan (ignition.msgs.LaserScan) -> /scan (sensor_msgs/msg/LaserScan)] (Lazy 0)
[parameter_bridge-9] [INFO] [1725396664.577439616] [ros_gz_bridge]: Creating ROS->GZ Bridge: [/scan (sensor_msgs/msg/LaserScan) -> /scan (ignition.msgs.LaserScan)] (Lazy 0)
X11 connection rejected because of wrong authentication.
[ign gazebo-1] qt.qpa.xcb: could not connect to display localhost:10.0
[ign gazebo-1] qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
[ign gazebo-1] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
[ign gazebo-1] 
[ign gazebo-1] Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
[ign gazebo-1] 
[ign gazebo-1] Stack trace (most recent call last):
[ign gazebo-1] #31   Object "ign gazebo gui", at 0x559687d6817e, in 
[ign gazebo-1] #30   Object "/usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x745f79171e19, in ruby_run_node
[ign gazebo-1] #29   Object "/usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x745f7916e317, in 
[ign gazebo-1] #28   Object "/usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x745f7930330c, in rb_vm_exec
[ign gazebo-1] #27   Object "/usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x745f792fdc96, in 
[ign gazebo-1] #26   Object "/usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x745f792fafc5, in 
[ign gazebo-1] #25   Object "/usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x745f792f8c34, in 
[ign gazebo-1] #24   Object "/usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x745f79244a4e, in 
[ign gazebo-1] #23   Object "/usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x745f7916f9ac, in rb_protect
[ign gazebo-1] #22   Object "/usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x745f79307c61, in rb_yield
[ign gazebo-1] #21   Object "/usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x745f7930330c, in rb_vm_exec
[ign gazebo-1] #20   Object "/usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x745f792fdc96, in 
[ign gazebo-1] #19   Object "/usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x745f792fafc5, in 
[ign gazebo-1] #18   Object "/usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x745f792f8c34, in 
[ign gazebo-1] #17   Object "/usr/lib/x86_64-linux-gnu/ruby/3.0.0/fiddle.so", at 0x745f7882344b, in 
[ign gazebo-1] #16   Object "/usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x745f792c6088, in rb_nogvl
[ign gazebo-1] #15   Object "/usr/lib/x86_64-linux-gnu/ruby/3.0.0/fiddle.so", at 0x745f78822d6b, in 
[ign gazebo-1] #14   Object "/usr/lib/x86_64-linux-gnu/libffi.so.8", at 0x745f78814492, in 
[ign gazebo-1] #13   Object "/usr/lib/x86_64-linux-gnu/libffi.so.8", at 0x745f78817e2d, in 
[ign gazebo-1] #12   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo6-ign.so.6.16.0", at 0x745f76743bcc, in runGui
[ign gazebo-1] #11   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo6-gui.so.6", at 0x745f7443ea75, in ignition::gazebo::v6::gui::runGui(int&, char**, char const*, char const*, int, char const*)
[ign gazebo-1] #10   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo6-gui.so.6", at 0x745f7443d3a0, in ignition::gazebo::v6::gui::createGui(int&, char**, char const*, char const*, bool, char const*, int, char const*)
[ign gazebo-1] #9    Object "/usr/lib/x86_64-linux-gnu/libignition-gui6.so.6", at 0x745f74e39068, in ignition::gui::Application::Application(int&, char**, ignition::gui::WindowType)
[ign gazebo-1] #8    Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x745f72cdecec, in QApplicationPrivate::init()
[ign gazebo-1] #7    Object "/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x745f71bc6b6f, in QGuiApplicationPrivate::init()
[ign gazebo-1] #6    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x745f734eeb16, in QCoreApplicationPrivate::init()
[ign gazebo-1] #5    Object "/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x745f71bc3c07, in QGuiApplicationPrivate::createEventDispatcher()
[ign gazebo-1] #4    Object "/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x745f71bc3712, in QGuiApplicationPrivate::createPlatformIntegration()
[ign gazebo-1] #3    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x745f732beba2, in QMessageLogger::fatal(char const*, ...) const
[ign gazebo-1] #2    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x745f78ec87f2, in abort
[ign gazebo-1] #1    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x745f78ee2475, in raise
[ign gazebo-1] #0    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x745f78f369fc, in pthread_kill
[ign gazebo-1] Aborted (Signal sent by tkill() 198 1000)
[create-3] [INFO] [1725396665.205495759] [ros_gz_sim]: Waiting messages on topic [robot_description].
[create-3] [INFO] [1725396665.210348558] [ros_gz_sim]: Requested creation of entity.
[create-3] [INFO] [1725396665.210410008] [ros_gz_sim]: OK creation of entity.
[odom_tf_publisher-8] [INFO] [1725396665.250909230] [odom_tf_publisher]: Starting odometry_tf_publisher node
[INFO] [create-3]: process has finished cleanly [pid 96]
[INFO] [ros2-11]: process started with pid [349]
[INFO] [ign gazebo-1]: process has finished cleanly [pid 92]

The error makes me believe that the xhost +local:docker command was not sufficient.

Anybody has ever tried such use case?
What I am doing wrong?

@gmacario gmacario changed the title How to run demos on a remote display? How to run demos using a remote display? Sep 3, 2024
@EzraBrooks
Copy link
Member

It's possible that xhost +local:docker doesn't work in this case because it's not local since you're using SSH, but I'm not sure.

What happens if you just run xhost +, thereby disabling the ACL entirely? It's not good practice for security reasons to do that on a regular basis, but it will help us diagnose where the issue is with our/your configuration.

@EzraBrooks
Copy link
Member

I've opened issue #173 describing one of the possible causes of this issue. I'm moving this to a discussion since it's more of a question than an issue. I'll keep responding here as we work together to debug this. Thanks!

@space-ros space-ros locked and limited conversation to collaborators Sep 4, 2024
@EzraBrooks EzraBrooks converted this issue into discussion #174 Sep 4, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants