Skip to content

Instantly share code, notes, and snippets.

@lucasw
Last active February 7, 2020 00:22
Show Gist options
  • Save lucasw/7fdf50f90279659769999f369768f381 to your computer and use it in GitHub Desktop.
Save lucasw/7fdf50f90279659769999f369768f381 to your computer and use it in GitHub Desktop.
Ubuntu 18.04 Setup
sudo apt update && sudo apt upgrade

Install google chrome

Need gnome.

sudo apt install gimp guvcview gthumb clinfo curl libbullet-dev blender git meshlab vim ocl-icd-opencl-dev opencl-clhpp-headers libv4l-dev libsdl2-dev geeqie python3-numpy python3-opencv python3-matplotlib jupyter-notebook python3-notebook geeqie kazam openssh-server gnome-session-flashback gnome-tweaks python-pip net-tools

Built dependencies that aren't in ros packages go in ~/other:

mkdir ~/other/install -p

ROS2

In parallel with ROS1 but not default.

.bashrc

@lucasw
Copy link
Author

lucasw commented May 12, 2019

ROS

ROS1

http://wiki.ros.org/melodic/Installation/Ubuntu

sudo apt install ros-melodic-desktop ros-melodic-camera-info-manager ros-melodic-tf2-geometry-msgs  ros-melodic-tf2-sensor-msgs ros-melodic-libqt-dev ros-melodic-ddynamic-reconfigure ros-melodic-ddynamic-reconfigure-python ros-melodic-image-proc python-catkin-tools libglm-dev libpcl-dev libpcl-conversions-dev ros-melodic-pcl-conversions ros-melodic-robot-upstart

TODO add other packages needed

github packages

mkdir ~/catkin_ws/src -p
cd ~/catkin_ws/src
git clone [email protected]:lucasw/simple_sim_ros
git clone [email protected]:lucasw/imgui_ros
git clone [email protected]:lucasw/rviz_camera_stream
git clone [email protected]:lucasw/rviz_interactive_tf
git clone [email protected]:lucasw/dynamic_reconfigure_tools
git clone [email protected]:lucasw/rqt_tf_echo
git clone [email protected]:lucasw/image_manip
git clone [email protected]:lucasw/screengrab_ros
git clone [email protected]:lucasw/rviz_textured_quads
git clone [email protected]:lucasw/usb_cam
git clone [email protected]:lucasw/v4l2ucp
git clone [email protected]:lucasw/vimjay
git clone [email protected]:lucasw/lambda_synth
git clone [email protected]:lucasw/spectrogram_paint
git clone [email protected]:lucasw/tao_synth
git clone [email protected]:lucasw/transform_point_cloud
git clone [email protected]:lucasw/rviz_ortho_view_controller
git clone [email protected]:lucasw/rqt_file_dialog
git clone [email protected]:lucasw/rqt_topic_display
git clone [email protected]:mogumbo/rviz_lighting

or

git clone https://github.com/lucasw/simple_sim_ros
git clone https://github.com/lucasw/imgui_ros
git clone https://github.com/lucasw/rviz_camera_stream
git clone https://github.com/lucasw/rviz_interactive_tf
git clone https://github.com/lucasw/dynamic_reconfigure_tools
git clone https://github.com/lucasw/rqt_tf_echo
git clone https://github.com/lucasw/image_manip
git clone https://github.com/lucasw/screengrab_ros
git clone https://github.com/lucasw/rviz_textured_quads
git clone https://github.com/lucasw/usb_cam
git clone https://github.com/lucasw/v4l2ucp
git clone https://github.com/lucasw/vimjay
git clone https://github.com/lucasw/lambda_synth
git clone https://github.com/lucasw/spectrogram_paint
git clone https://github.com/lucasw/tao_synth
git clone https://github.com/lucasw/transform_point_cloud
git clone https://github.com/lucasw/rviz_ortho_view_controller
git clone https://github.com/lucasw/rqt_file_dialog
git clone https://github.com/lucasw/rqt_topic_display
git clone https://github.com/mogumbo/rviz_lighting

@lucasw
Copy link
Author

lucasw commented May 12, 2019

sudo apt install gnome-tweaks

The Keyboard & Mouse, enable touchpad while typing.

@lucasw
Copy link
Author

lucasw commented Jun 3, 2019

One laptop is reporting nothing to update/upgrade, while the other

[sudo] password for lucasw: 
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://repo.steampowered.com/steam precise InRelease                                         
Get:3 http://dl.google.com/linux/chrome/deb stable Release [943 B]                                 
Get:4 http://dl.google.com/linux/chrome/deb stable Release.gpg [819 B]                             
Hit:5 http://us.archive.ubuntu.com/ubuntu bionic InRelease                                         
Hit:6 http://packages.ros.org/ros/ubuntu bionic InRelease                                          
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]         
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]                   
Get:10 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,104 B]               
Get:11 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [621 kB]           
Get:12 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [365 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [520 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [932 kB]   
Get:15 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [945 kB] 
Get:16 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe i386 Packages [3,716 B]
Get:17 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [3,712 B]
Get:18 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages [277 kB]
Get:19 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [130 kB]
Get:20 http://security.ubuntu.com/ubuntu bionic-security/universe i386 Packages [251 kB]
Get:21 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [256 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [144 kB]
Linux hp14laptop 4.18.0-20-generic #21~18.04.1-Ubuntu SMP Wed May 8 08:43:37 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Maybe it is downloading and updating during the night? Look at LivePatch settings

@lucasw
Copy link
Author

lucasw commented Oct 17, 2019

AnsiEsc.vba - convert text files with terminal codes to colors:

https://www.vim.org/scripts/script.php?script_id=302

vimrc:

:highlight ExtraWhitespace ctermbg=red guibg=red
:match ExtraWhitespace /\s\+$/

if has("autocmd")
  filetype plugin indent on
endif

set smarttab
set expandtab

set hlsearch

au BufRead,BufNewFile *.cfg set filetype=python
au BufRead,BufNewFile *.diag set filetype=cpp

au BufNewFile,BufRead CMakeLists.txt set filetype=cmake
autocmd Filetype cmake setlocal ts=2 sw=2 expandtab
autocmd Filetype cpp setlocal ts=2 sw=2 expandtab
autocmd Filetype xml setlocal ts=2 sw=2 expandtab

" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif

" https://screaming-cactus.com/setting-up-vim-to-work-with-swift/
syntax on

autocmd BufRead * AnsiEsc

@lucasw
Copy link
Author

lucasw commented Nov 7, 2019

Night shift

Display settings.

sudo apt install dconf-editor

How to get second monitor to follow night light settings?
https://askubuntu.com/questions/983844/night-light-vs-dual-monitor

Devices | Color menu and toggle color management.
May have to do this every day?

Dark mode

Install gnome-tweak-tool, use adwaita-dark

https://askubuntu.com/questions/1159741/enable-dark-mode-on-chromes-internal-pages

@lucasw
Copy link
Author

lucasw commented Nov 19, 2019

Put your ROS_MASTER_URI into a terminal title, edit .bashrc:

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;\$ROS_MASTER_URI ${debian_chroot:+($debian_chroot)}\u@\h: \w\a\] $PS1"
    ;;
*)
    ;;
esac

Though at a glance it may appear to be the hostname of the computer the terminal is running on.

@lucasw
Copy link
Author

lucasw commented Dec 14, 2019

Re-assign keys

Swap pgup/pgdn and home/end on laptops.

sudo vi /usr/share/X11/xkb/symbols/pc
    key <HOME> {        [  Prior                ]       };
    key <PGUP> {        [  Home                 ]       };
    key <DELE> {        [  Delete                 ]       };
    key  <END> {        [  Next               ]       };
    key <PGDN> {        [  End                  ]       };

Then logout and log back in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment