Problems running rviz while using ssh

I have been trying to follow the directions on Untethered Operation and got an error that seems to be related with OpenGL and OGRE.

After I succesfully ssh into the robot I tried the command:

roslaunch stretch_funmap mapping.launch

I’m going to paste the entire command line output later, but the bottom line is I get a warning with an exception:
[ WARN] [1598989836.193298359]: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)

I looked a bit online and found this in ROS Answers (although that answer is from 2012) so I typed into my own computer’s terminal glxinfo | grep version and this was the output:
issue_glxinfo

This warning becomes an error after 100 tries
[ERROR] [1598990791.632950490]: Unable to create the rendering window after 100 tries. [ INFO] [1598990791.632966605]: Stereo is NOT SUPPORTED terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid [ INFO] [1598990791.671393091]: current scan mode: Boost, max_distance: 12.0 m, Point number: 8.0K , angle_compensate: 2 [rviz-16] process has died [pid 11132, exit code -6, cmd /opt/ros/melodic/lib/rviz/rviz -d /home/hello-robot/catkin_ws/src/stretch_ros/stretch_funmap/rviz/stretch_mapping.rviz __name:=rviz __log:=/home/hello-robot/.ros/log/9e8b418c-ec8e-11ea-bb16-38002587e8f3/rviz-16.log]. log file: /home/hello-robot/.ros/log/9e8b418c-ec8e-11ea-bb16-38002587e8f3/rviz-16*.log

Any help will be greatly appreciated :slight_smile:


And here I’m pasting the entire output of the terminal up until the first warning of the ogre exception:

`hello-robot@stretch-re1-1008:~$ roslaunch stretch_funmap mapping.launch
… logging to /home/hello-robot/.ros/log/65f0ada0-ec8c-11ea-bb16-38002587e8f3/roslaunch-stretch-re1-1008-10532.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server [our_hostname]:34503/

SUMMARY

CLEAR PARAMETERS

  • /ekf_se/

PARAMETERS

  • /camera/realsense2_camera/accel_fps: 63
  • /camera/realsense2_camera/accel_frame_id: camera_accel_frame
  • /camera/realsense2_camera/accel_optical_frame_id: camera_accel_opti…
  • /camera/realsense2_camera/align_depth: True
  • /camera/realsense2_camera/aligned_depth_to_color_frame_id: camera_aligned_de…
  • /camera/realsense2_camera/aligned_depth_to_fisheye1_frame_id: camera_aligned_de…
  • /camera/realsense2_camera/aligned_depth_to_fisheye2_frame_id: camera_aligned_de…
  • /camera/realsense2_camera/aligned_depth_to_fisheye_frame_id: camera_aligned_de…
  • /camera/realsense2_camera/aligned_depth_to_infra1_frame_id: camera_aligned_de…
  • /camera/realsense2_camera/aligned_depth_to_infra2_frame_id: camera_aligned_de…
  • /camera/realsense2_camera/allow_no_texture_points: True
  • /camera/realsense2_camera/base_frame_id: camera_link
  • /camera/realsense2_camera/calib_odom_file:
  • /camera/realsense2_camera/clip_distance: -2.0
  • /camera/realsense2_camera/color_fps: 15
  • /camera/realsense2_camera/color_frame_id: camera_color_frame
  • /camera/realsense2_camera/color_height: 720
  • /camera/realsense2_camera/color_optical_frame_id: camera_color_opti…
  • /camera/realsense2_camera/color_width: 1280
  • /camera/realsense2_camera/depth_fps: 15
  • /camera/realsense2_camera/depth_frame_id: camera_depth_frame
  • /camera/realsense2_camera/depth_height: 720
  • /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti…
  • /camera/realsense2_camera/depth_width: 1280
  • /camera/realsense2_camera/device_type:
  • /camera/realsense2_camera/enable_accel: False
  • /camera/realsense2_camera/enable_color: True
  • /camera/realsense2_camera/enable_depth: True
  • /camera/realsense2_camera/enable_fisheye1: False
  • /camera/realsense2_camera/enable_fisheye2: False
  • /camera/realsense2_camera/enable_fisheye: False
  • /camera/realsense2_camera/enable_gyro: False
  • /camera/realsense2_camera/enable_infra1: False
  • /camera/realsense2_camera/enable_infra2: False
  • /camera/realsense2_camera/enable_infra: False
  • /camera/realsense2_camera/enable_pointcloud: False
  • /camera/realsense2_camera/enable_pose: False
  • /camera/realsense2_camera/enable_sync: True
  • /camera/realsense2_camera/filters: pointcloud
  • /camera/realsense2_camera/fisheye1_frame_id: camera_fisheye1_f…
  • /camera/realsense2_camera/fisheye1_optical_frame_id: camera_fisheye1_o…
  • /camera/realsense2_camera/fisheye2_frame_id: camera_fisheye2_f…
  • /camera/realsense2_camera/fisheye2_optical_frame_id: camera_fisheye2_o…
  • /camera/realsense2_camera/fisheye_fps: 30
  • /camera/realsense2_camera/fisheye_frame_id: camera_fisheye_frame
  • /camera/realsense2_camera/fisheye_height: 480
  • /camera/realsense2_camera/fisheye_optical_frame_id: camera_fisheye_op…
  • /camera/realsense2_camera/fisheye_width: 640
  • /camera/realsense2_camera/gyro_fps: 200
  • /camera/realsense2_camera/gyro_frame_id: camera_gyro_frame
  • /camera/realsense2_camera/gyro_optical_frame_id: camera_gyro_optic…
  • /camera/realsense2_camera/imu_optical_frame_id: camera_imu_optica…
  • /camera/realsense2_camera/infra1_frame_id: camera_infra1_frame
  • /camera/realsense2_camera/infra1_optical_frame_id: camera_infra1_opt…
  • /camera/realsense2_camera/infra2_frame_id: camera_infra2_frame
  • /camera/realsense2_camera/infra2_optical_frame_id: camera_infra2_opt…
  • /camera/realsense2_camera/infra_fps: 30
  • /camera/realsense2_camera/infra_height: 480
  • /camera/realsense2_camera/infra_width: 640
  • /camera/realsense2_camera/initial_reset: True
  • /camera/realsense2_camera/json_file_path:
  • /camera/realsense2_camera/linear_accel_cov: 0.01
  • /camera/realsense2_camera/odom_frame_id: camera_odom_frame
  • /camera/realsense2_camera/pointcloud_texture_index: 0
  • /camera/realsense2_camera/pointcloud_texture_stream: RS2_STREAM_COLOR
  • /camera/realsense2_camera/pose_frame_id: camera_pose_frame
  • /camera/realsense2_camera/pose_optical_frame_id: camera_pose_optic…
  • /camera/realsense2_camera/publish_odom_tf: True
  • /camera/realsense2_camera/publish_tf: True
  • /camera/realsense2_camera/rosbag_filename:
  • /camera/realsense2_camera/serial_no:
  • /camera/realsense2_camera/tf_publish_rate: 0.0
  • /camera/realsense2_camera/topic_odom_in: odom_in
  • /camera/realsense2_camera/unite_imu_method:
  • /camera/realsense2_camera/usb_port_id:
  • /d435i_configure/initial_mode: High Accuracy
  • /ekf_se/acceleration_gains: [0.8, 0.0, 0.0, 0…
  • /ekf_se/acceleration_limits: [1.3, 0.0, 0.0, 0…
  • /ekf_se/base_link_frame: base_link
  • /ekf_se/control_config: [True, False, Fal…
  • /ekf_se/control_timeout: 0.2
  • /ekf_se/debug: False
  • /ekf_se/debug_out_file: /path/to/debug/fi…
  • /ekf_se/deceleration_gains: [1.0, 0.0, 0.0, 0…
  • /ekf_se/deceleration_limits: [1.3, 0.0, 0.0, 0…
  • /ekf_se/frequency: 15
  • /ekf_se/imu0: /imu/data
  • /ekf_se/imu0_config: [False, False, Fa…
  • /ekf_se/imu0_differential: True
  • /ekf_se/imu0_nodelay: False
  • /ekf_se/imu0_queue_size: 1
  • /ekf_se/imu0_relative: True
  • /ekf_se/imu0_remove_gravitational_acceleration: True
  • /ekf_se/initial_estimate_covariance: [‘1e-9’, 0, 0, 0,…
  • /ekf_se/map_frame: map
  • /ekf_se/odom0: /odom
  • /ekf_se/odom0_config: [True, True, True…
  • /ekf_se/odom0_differential: True
  • /ekf_se/odom0_nodelay: False
  • /ekf_se/odom0_queue_size: 1
  • /ekf_se/odom0_relative: False
  • /ekf_se/odom_frame: odom
  • /ekf_se/print_diagnostics: True
  • /ekf_se/process_noise_covariance: [0.05, 0, 0, 0, 0…
  • /ekf_se/publish_acceleration: False
  • /ekf_se/publish_tf: False
  • /ekf_se/sensor_timeout: 0.2
  • /ekf_se/stamped_control: False
  • /ekf_se/transform_time_offset: 0.0
  • /ekf_se/transform_timeout: 0.0
  • /ekf_se/two_d_mode: True
  • /ekf_se/use_control: False
  • /ekf_se/world_frame: odom
  • /funmap/debug_directory: /home/hello-robot…
  • /imu_filter_node/fixed_frame: map
  • /imu_filter_node/use_mag: False
  • /joint_state_publisher/rate: 15.0
  • /joint_state_publisher/source_list: [’/stretch/joint_…
  • /laser_scan_matcher_node/fixed_frame: odom
  • /laser_scan_matcher_node/max_angular_correction_deg: 20.0
  • /laser_scan_matcher_node/max_iterations: 10
  • /laser_scan_matcher_node/max_linear_correction: 0.2
  • /laser_scan_matcher_node/use_imu: False
  • /lidar_node/angle_compensate: True
  • /lidar_node/frame_id: laser
  • /lidar_node/inverted: False
  • /lidar_node/scan_mode: Boost
  • /lidar_node/serial_baudrate: 115200
  • /lidar_node/serial_port: /dev/hello-lrf
  • /robot_description: <?xml version="1…
  • /robot_state_publisher/publish_frequency: 15.0
  • /rosdistro: melodic
  • /rosversion: 1.14.9
  • /stretch_driver/broadcast_odom_tf: False
  • /stretch_driver/controller_calibration_file: /home/hello-robot…
  • /stretch_driver/rate: 25.0
  • /stretch_driver/timeout: 0.5

NODES
/
d435i_accel_correction (stretch_core/d435i_accel_correction)
d435i_configure (stretch_core/d435i_configure)
d435i_frustum_visualizer (stretch_core/d435i_frustum_visualizer)
ekf_se (robot_localization/ekf_localization_node)
funmap (stretch_funmap/funmap)
imu_filter_node (imu_filter_madgwick/imu_filter_node)
joint_state_publisher (joint_state_publisher/joint_state_publisher)
keyboard_teleop (stretch_core/keyboard_teleop)
laser_scan_matcher_node (laser_scan_matcher/laser_scan_matcher_node)
lidar_node (rplidar_ros/rplidarNode)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
rviz (rviz/rviz)
stretch_driver (stretch_core/stretch_driver)
/camera/
realsense2_camera (nodelet/nodelet)
realsense2_camera_manager (nodelet/nodelet)

auto-starting new master
process[master]: started with pid [10542]
ROS_MASTER_URI= [our IP]
setting /run_id to 65f0ada0-ec8c-11ea-bb16-38002587e8f3
process[rosout-1]: started with pid [10553]
started core service [/rosout]
process[d435i_accel_correction-2]: started with pid [10561]
process[camera/realsense2_camera_manager-3]: started with pid [10562]
process[camera/realsense2_camera-4]: started with pid [10563]
process[d435i_configure-5]: started with pid [10564]
process[d435i_frustum_visualizer-6]: started with pid [10565]
process[joint_state_publisher-7]: started with pid [10571]
[ INFO] [1598989834.458254598]: Initializing nodelet with 8 worker threads.
process[robot_state_publisher-8]: started with pid [10576]
process[stretch_driver-9]: started with pid [10588]
process[funmap-10]: started with pid [10589]
[ WARN] [1598989834.504898268]: The root link base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF.
process[imu_filter_node-11]: started with pid [10595]
process[ekf_se-12]: started with pid [10596]
process[lidar_node-13]: started with pid [10597]
process[laser_scan_matcher_node-14]: started with pid [10601]
[ INFO] [1598989834.567274114]: Starting ImuFilter
process[keyboard_teleop-15]: started with pid [10612]
process[rviz-16]: started with pid [10618]
[ INFO] [1598989834.601399913]: Using dt computed from message headers
[ INFO] [1598989834.601437222]: The gravity vector is kept in the IMU message.
[ INFO] [1598989834.622742910]: Starting LaserScanMatcher
[ INFO] [1598989834.634866389]: RPLIDAR running on ROS package rplidar_ros. SDK Version:1.7.0
[ INFO] [1598989834.644671622]: Imu filter gain set to 0.100000
[ INFO] [1598989834.644706194]: Gyro drift bias set to 0.000000
[ INFO] [1598989834.644721151]: Magnetometer bias values: 0.000000 0.000000 0.000000
[ WARN] [1598989834.695048937]: Both imu0_differential and imu0_relative were set to true. Using differential mode.
[ INFO] [1598989834.695517348]: RealSense ROS v2.2.16
[ INFO] [1598989834.695673987]: Built with LibRealSense v2.37.0
[ INFO] [1598989834.695786847]: Running with LibRealSense v2.37.0
[ INFO] [1598989834.849312959]:
[INFO] [1598989834.913205]: /d435i_accel_correction started
[INFO] [1598989835.109010]: /d435i_frustum_visualizer started
[INFO] [1598989835.244530]: /d435i_configure started
[ INFO] [1598989835.321033517]: Device with serial number 944122073257 was found.

[ INFO] [1598989835.321080394]: Device with physical ID 2-2-10 was found.
[ INFO] [1598989835.321095900]: Device with name Intel RealSense D435I was found.
[ INFO] [1598989835.321709949]: Device with port number 2-2 was found.
[ INFO] [1598989835.321772063]: Resetting device…
[ INFO] [1598989835.346140417]: rviz version 1.13.13
[ INFO] [1598989835.346185725]: compiled against Qt version 5.9.5
[ INFO] [1598989835.346198615]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1598989835.355282617]: Forcing OpenGl version 0.
[INFO] [1598989835.589228]: /keyboard_teleop started
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[INFO] [1598989835.631027]: /stretch_driver started
[INFO] [1598989835.632444]: broadcast_odom_tf = False
[INFO] [1598989835.633059]: Loading controller calibration parameters for the head from YAML file named /home/hello-robot/catkin_ws/src/stretch_ros/stretch_core/config/controller_calibration_head.yaml
/home/hello-robot/catkin_ws/src/stretch_ros/stretch_core/nodes/stretch_driver:1262: YAMLLoadWarning: calling yaml.load() without Loader=… is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
controller_parameters = yaml.load(fid)
[INFO] [1598989835.634963]: controller parameters loaded = {‘tilt_looking_up_offset’: 0.05202406429090555, ‘arm_retracted_offset’: 0.0026643147285247233, ‘tilt_angle_backlash_transition’: -0.4, ‘tilt_angle_offset’: 0.0016183797745203895, ‘pan_angle_offset’: 0.09576371108630456, ‘pan_looked_left_offset’: 0.0009385042517834909}
[INFO] [1598989835.635678]: self.head_tilt_calibrated_offset_rad in degrees = 0.0927263307294
[INFO] [1598989835.636319]: self.head_pan_calibrated_offset_rad in degrees = 5.48685647576
[INFO] [1598989835.636994]: self.head_pan_calibrated_looked_left_offset_rad in degrees = 0.0537723326823
[INFO] [1598989835.637654]: self.head_tilt_backlash_transition_angle_rad in degrees = -22.9183118052
[INFO] [1598989835.638364]: self.head_tilt_calibrated_looking_up_offset_rad in degrees = 2.98075931699
[INFO] [1598989835.639029]: self.wrist_extension_calibrated_retracted_offset_m in meters = 0.00266431472852
[INFO] [1598989835.643986]: /stretch_driver rate = 25.0 Hz
[INFO] [1598989835.644691]: /stretch_driver timeout = 0.5 s
[INFO] [1598989835.645839]: /stretch_driver use_fake_mechaduinos = False
[INFO] [1598989835.646535]: /stretch_driver base_frame_id = base_link
[INFO] [1598989835.647390]: /stretch_driver odom_frame_id = odom
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[INFO] [1598989836.082021]: /funmap started
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[ WARN] [1598989836.193298359]: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
rviz::RenderSystem: error creating render window: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)`

As a work around, I was able to set a remote master in my computer using our hostname and I can run rviz in my own laptop before I launch the funmap launch file. However, this results in rviz not having the same configuration

Hi @csemecu, it’s likely that “Unsuitable GLXContext” error is OpenGL complaining about being unable to start an X Window. The error after a 100 tries (Unable to create the rendering window) support this. It should be a simple fix. Since you’re running on Ubuntu, simple add a -X flag when ssh-ing into the robot. This allows Rviz to instantiate a renderable X window on your desktop through something called “X Forwarding”. So the command looks like:

$ ssh -X username@ip-address

By the way, I’m glad you were able to get around this using ROS remote master. I personally prefer to use remote master over X Forwarding anyways. The forwarded version of Rviz lags when manipulating the viewport since the computation takes place on the robot. In order to get the same Rviz configuration on my dev computer, I’ve set up a local version of the stretch_ros ROS package and stretch_user debug folder. If you’re interested in this setup, I’d be happy to add more information to the Untethered Operation guide.

Hi @bshah, I am interested in “setting up a local version of the stretch_ros ROS package and stretch_user debug folder.” on my dev computer. How can I do that?

Thanks

Hi @burakaksoy, welcome to the forum! I’ve added information on how to do it to the same Untethered Operation, under the Visualizing remotely with RViz section. Let me know if you have any questions.

1 Like