Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
tutorials:installing_ros_melodic_inside_ubuntu_bionic_chroot [2019/09/11 03:04]
admin
tutorials:installing_ros_melodic_inside_ubuntu_bionic_chroot [2019/10/10 00:27]
amora
Line 1: Line 1:
-====== Installing ROS melodic ​inside a Ubuntu Bionic chroot ======+====== Installing ROS Melodic & ROS Dashing ​inside a Ubuntu Bionic chroot ======
  
   * Install Ubuntu inside a chroot. Follow guide from [[tutorials:​ubuntu_bionic_chroot|here]]   * Install Ubuntu inside a chroot. Follow guide from [[tutorials:​ubuntu_bionic_chroot|here]]
Line 6: Line 6:
   nameserver 8.8.8.8   nameserver 8.8.8.8
  
-  * Fix /etc/hosts:+  * Fix /etc/hosts. On the second line put the name of your hostname instead of '​shirka'​.
  
   127.0.0.1 localhost   127.0.0.1 localhost
Line 14: Line 14:
  
   deb http://​mirrors.ucr.ac.cr/​ubuntu bionic main universe restricted multiverse   deb http://​mirrors.ucr.ac.cr/​ubuntu bionic main universe restricted multiverse
 +  deb http://​mirrors.ucr.ac.cr/​ubuntu bionic-updates main universe restricted multiverse
   deb http://​mirrors.ucr.ac.cr/​ubuntu bionic-backports main restricted multiverse   deb http://​mirrors.ucr.ac.cr/​ubuntu bionic-backports main restricted multiverse
  
   * Update repos   * Update repos
  
-  apt-get update+  ​apt-get update
  
   * Install the following packages:   * Install the following packages:
  
-  apt-get install mc emacs curl lsb_release gpgpg2 ​apt-file+  ​apt-get install ​sudo mc nano curl lsb-release gnupg2 ​apt-utils bash-completion locales
  
-  * Follow guide from ROS: [[http://​wiki.ros.org/​melodic/​Installation/​Ubuntu]]+  * Add a new user in the chroot
  
 +  $ adduser user
  
 +  * Add your new user to sudo group
 +
 +  $ adduser user sudo
 +
 +  * Fix sudo error with visudo:
 +
 +  $ visudo
 +
 +  %sudo   ​ALL=(ALL:​ALL) NOPASSWD:​ALL
 +
 +  * From now on, use your new user for the following steps:
 +
 +  $ su user
 +
 +  * Follow guide for ROS Melodic from ROS: [[http://​wiki.ros.org/​melodic/​Installation/​Ubuntu]]
 +  * Follow guide for ROS Dashing from ROS: [[https://​index.ros.org/​doc/​ros2/​Installation/​Dashing/​Linux-Install-Debians/​]]
 +
 +===== Creating ROS Melodic Workspace =====
 +
 +ToDo
 +
 +===== Creating ROS Dashing Workspace =====
 +
 +Since ROS Crystal (ROS 2) to newer versions, ROS use [[https://​colcon.readthedocs.io/​en/​released/​|Colcon]] for building all packages. This guide shows the basic steps for creating a Colcon Workspace.
 +
 +  * Source ROS 2 configuration
 +
 +  $ source /​opt/​ros/​dashing/​setup.bash
 +
 +  * Install colcon
 +
 +  $ sudo apt install python3-colcon-common-extensions
 +
 +  * Create workspace for ROS 2
 +
 +  $ mkdir -p ~/​ros2_ws/​src
 +
 +  * Move to the new workspace and build it
 +
 +  $ cd ~/ros2_ws
 +  $ colcon build
 +
 +  * Source workspace configuration
 +
 +  $ source ~/​ros2_ws/​install/​local_setup.bash && source ~/​ros2_ws/​install/​setup.bash
 +
 +After creating the workspace, lets build some examples packages for ROS 2.
 +
 +  * Clone ROS 2 examples package repository in our workspace
 +
 +  $ cd ~/​ros2_ws/​src
 +  $ git clone git clone https://​github.com/​ros2/​examples
 +  $ git checkout $ROS_DISTRO
 +
 +  * Build examples package
 +
 +  $ cd ~/ros2_ws
 +  $ colcon build --symlink-install
 +
 +  * Test builded package. Remember to run each command on different terminals and source ROS 2 configuration on each terminal.
 +
 +  $ ros2 run examples_rclcpp_minimal_subscriber subscriber_member_function
 +  $ ros2 run examples_rclcpp_minimal_publisher publisher_member_function
 + 
  • tutorials/installing_ros_melodic_inside_ubuntu_bionic_chroot.txt
  • Last modified: 2019/10/10 14:01
  • by amora