18. Misc
18.1. x2go
18.1.1. Fix GLX Issues with rviz2
Install dependencies
$ sudo apt install libxcb-randr0-dev meson ninja-build byacc flex
Enable source code in Additional Drivers and download with
$ apt-get source mesa
Inside the mesa directory execute
$ mkdir build && cd build && \ meson -D glx=xlib -D gallium-drivers=swrast -D platforms=x11 -D dri3=false -D dri-drivers="" -D vulkan-drivers="" -D buildtype=release -D optimization=3
and run
$ ninja
Copy
libgl-xlib
somewhere, e.g. the home directory$ sudo cp -r src/gallium/targets/libgl-xlib /
To run gazebo
or rviz
, we need a wrapper. The x2go Wiki proposes two different solutions, where only the latter works for gazebo
and rviz
.
#!/bin/sh
LD_LIBRARY_PATH="$HOME/libgl-xlib:${LD_LIBRARY_PATH}" exec "$@"
#!/bin/sh
LD_PRELOAD="$HOME/libgl-xlib/libGL.so.1" exec "$@"
Todo
Check if also the second solution can be added as export
in .zshrc
.
18.2. Forward Gamepad
$ cat /proc/bus/input/devices | awk '/F710/' RS= | grep -E 'Name=|event[0-9]+'
$ EVENT_DEVICE='dev/input/event2'
$ cat /proc/bus/input/devices | grep -E 'Name=|event[0-9]+'
$ EVENT_DEVICE='dev/input/event2'
Note
Replace the hostname/IP address of the remote target.
$ REMOTE_ADDRESS='XXX.XXX.XXX.XXX'
$ REMOTE_USER='remote_user_name'
$ python -u ~/input-over-ssh/input_over_ssh/client.py -p ${EVENT_DEVICE} | ssh ${REMOTE_USER}@${REMOTE_ADDRESS} -t 'bash -c "python3 -u ~/input-over-ssh/input_over_ssh/server.py"'
On the remote target you can start the joy node.
$ ros2 run joy joy_node --ros-args -p device_name:='Logitech Gamepad F710 (via input-over-ssh)'
Note
For some reason it takes very long (up to a minute) for the joy node to detect the joystick device.
We can expect the node to publish messages as soon as it ouputs the following line:
[INFO] [...] [joy_node]: Opened joystick: Logitech Gamepad F710 (via input-over-ssh). deadzone: 0.050000