sshのX11 Forwarding経由でGazeboを起動する際の注意点


背景

ssh経由でGazeboを起動しようとしたら以下のエラーに遭遇。

(抜粋)
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0

対策

X11のIndirect renderingをonにする。

$ sudo vi /usr/share/X11/xorg.conf.d/10-xxxx.conf 
# xxxxは任意
# 以下を記載する。

Section "ServerFlags"  
    Option "AllowIndirectGLX" "on"  
    Option "IndirectGLX" "on"  
EndSection