Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
installation [2017/09/18 18:44] gkazhoyainstallation [2023/05/12 18:05] (current) – [Quickstart with Docker] arthur
Line 1: Line 1:
 ====== CRAM installation ====== ====== CRAM installation ======
  
 +===== Quickstart with Docker =====
 +
 +For a quick peek into CRAM, check out [[https://github.com/cram2/cram_teaching|the Docker setup]] and the [[ https://seafile.zfn.uni-bremen.de/f/04e12809b4d347bebf71/| visual setup procedure]].
 ===== Prerequisites ===== ===== Prerequisites =====
  
 == OS and ROS == == OS and ROS ==
  
-The recommended setup is Ubuntu 16.04 LTS with ROS Kinetic. \\+The recommended setup is Ubuntu 20.04 LTS with ROS Noetic. \\
 This is the setup under which the CRAM team is working and it is best supported. This is the setup under which the CRAM team is working and it is best supported.
  
-Most CRAM components should also work on older Ubuntu versions under ROS Indigo etc. but with no guarantee. If you encounter any incompatibilities / bugs, [[/support|please let us know]].+Most CRAM components should also work on older Ubuntu versions under ROS Kinetic etc. but with no guarantee. If you encounter any incompatibilities / bugs, [[/support|please let us know]].
  
 If you don't have the latest version of ROS, [[http://wiki.ros.org/kinetic/Installation/Ubuntu|install it]] (the desktop non-full version should be enough). \\ If you don't have the latest version of ROS, [[http://wiki.ros.org/kinetic/Installation/Ubuntu|install it]] (the desktop non-full version should be enough). \\
Line 26: Line 29:
 </code> </code>
  
-where ''DISTRO'' is your ROS version, e.g., ''indigo'' or ''kinetic''.+where ''DISTRO'' is your ROS version, e.g., ''melodic'' or ''noetic''
  
 For information on how to use the IDE check the [[http://cram-system.org/doc/ide|Setup and IDE page]]. For information on how to use the IDE check the [[http://cram-system.org/doc/ide|Setup and IDE page]].
Line 34: Line 37:
 You will need those for setting up the ROS workspace and checking out code. You will need those for setting up the ROS workspace and checking out code.
  
 +__**18.04 / Melodic:**__
 <code bash> <code bash>
 $ sudo apt-get install python-rosinstall python-wstool $ sudo apt-get install python-rosinstall python-wstool
 </code> </code>
- +__**20:04 / Noetic:**__ 
-===== Installation ROS Kinetic Ubuntu 16.04 =====+<code bash> 
 +$ sudo apt-get install python3-wstool 
 +</code> 
 +===== Installation =====
  
 <html><!-- <html><!--
Line 66: Line 73:
  
 --></html> --></html>
 +
 +
 +
  
 This is a guide for installing the main CRAM packages. It covers installing the packages you need to get the system up and running to the point where you can run and test it in a simulation mode. Setting up the system on a real robot is more complex (mostly involving the usual ROS-based platform setup) and is out of scope of this guide. This is a guide for installing the main CRAM packages. It covers installing the packages you need to get the system up and running to the point where you can run and test it in a simulation mode. Setting up the system on a real robot is more complex (mostly involving the usual ROS-based platform setup) and is out of scope of this guide.
  
-Nevertheless, CRAM is a big system that has some external dependencies. Most of them are automatically installed as Debian packages, some you need to install from source, including the knowledge processing system [[http://knowrob.org/|KnowRob]]+Nevertheless, CRAM is a big system that has some external dependencies. Most of them are automatically installed as Debian packages, some you need to install from source. 
  
 === ROS workspace setup === === ROS workspace setup ===
  
 Skip this part if you already have a ROS workspace. Skip this part if you already have a ROS workspace.
 +
 +
 +
  
 <html><!-- <html><!--
Line 130: Line 143:
 </code> </code>
 --></html> --></html>
 +
 +
  
 If you don't have a ROS workspace, please create one. For example, you can do the following: If you don't have a ROS workspace, please create one. For example, you can do the following:
Line 161: Line 176:
  
  
-=== CRAM and dependencies installation ===+=== CRAM and dependencies installation (ROS Noetic Ubuntu 20.04) === 
 + 
 +Please checkout the [[https://github.com/cram2/cram/blob/devel/README.md|README]] on the devel branch of the [[https://github.com/cram2/cram/tree/devel|CRAM github repository]] for the most recent installation instructions. The noetic support is currently still in development. 
 + 
 +<code bash> 
 +$ sudo apt install ros-noetic-roslisp-repl 
 +$ sudo apt-get install python-rosinstall python-wstool 
 +$ cd ~/workspace/src 
 +$ wstool init 
 +$ wstool merge https://raw.githubusercontent.com/cram2/cram/devel/cram-20.04.rosinstall 
 +$ wstool update 
 +$ cd ~/workspace/ 
 +$ rosdep update 
 +$ rosdep install --ignore-src --from-paths src/ -r 
 +$ catkin_make 
 +</code> 
 + 
 +=== CRAM and dependencies installation (ROS Melodic Ubuntu 18.04) ===
  
 Check out and compile all the necessary repositories: Check out and compile all the necessary repositories:
Line 168: Line 200:
 $ cd ~/workspace/ros/src $ cd ~/workspace/ros/src
 $ wstool init $ wstool init
-$ wstool merge https://raw.githubusercontent.com/cram2/cram/master/cram.rosinstall+$ wstool merge https://raw.githubusercontent.com/cram2/cram/master-melodic/cram-18.04.rosinstall
 $ wstool update $ wstool update
 $ cd ~/workspace/ros $ cd ~/workspace/ros
 $ rosdep update $ rosdep update
-$ rosdep install --ignore-src --from-paths src/+$ rosdep install --ignore-src --from-paths src/ -r
 $ catkin_make $ catkin_make
 </code> </code>
  
-Note that the ''wstool update'' command is the one that downloads the source code of CRAM and its dependencies such as KnowRob.+Note that the ''wstool update'' command is the one that downloads the source code of CRAM and its dependencies
 + 
 +For ROS melodic and the current packages, one thing needs to be fixed. The package ''octomap'' contains a dependency to a ROS2 package, which can be ignored. Open the ''package.xml'' of octomap. 
 +<code bash> 
 +roscd octomap 
 +sudo nano package.xml 
 +</code> 
 + 
 +Now remove the following line within: 
 +<code xml> 
 +<exec_depend condition="$ROS_VERSION == 2">ament_cmake</exec_depend> 
 +</code> 
 + 
 +The installation is finished, please continue to the section **Get ready for development** down below. 
 + 
 +If something went wrong consult the [[/support|Support page]] or feel free to drop an email to the person maintaining this page (check the "Last edited by" part of the footer). 
 + 
 +=== CRAM and dependencies installation (ROS Kinetic Ubuntu 16.04) === 
 + 
 +Check out and compile all the necessary repositories: 
 + 
 +<code bash> 
 +$ cd ~/workspace/ros/src 
 +$ wstool init 
 +$ wstool merge https://raw.githubusercontent.com/cram2/cram/master/cram-16.04.rosinstall 
 +$ wstool update 
 +$ touch iai_maps/iai_dlr_cutting_demo/CATKIN_IGNORE 
 +$ cd ~/workspace/ros 
 +$ rosdep update 
 +$ rosdep install --ignore-src --from-paths src/ -r 
 +$ catkin_make 
 +</code> 
 + 
 +Note that the ''wstool update'' command is the one that downloads the source code of CRAM and its dependencies.
  
 <html><!-- <html><!--
Line 184: Line 249:
 If something went wrong consult the [[/support|Support page]] or feel free to drop an email to the person maintaining this page (check the "Last edited by" part of the footer). If something went wrong consult the [[/support|Support page]] or feel free to drop an email to the person maintaining this page (check the "Last edited by" part of the footer).
  
 +
 +=== CRAM and dependencies installation (ROS Indigo Ubuntu 14.04) ===
 +
 +CRAM uses the newest version of the Lisp compiler which is not available on 14.04.
 +That is not a problem as we can install it ourselves.
 +For that please download the SBCL version 1.3.1 from the [[https://sourceforge.net/projects/sbcl/files/sbcl/1.3.1/|SBCL webpage]]. You will most likely need the [[https://sourceforge.net/projects/sbcl/files/sbcl/1.3.1/|64 bit Linux version]].
 +Then extract the archive (in Nautilus, the file browser, it will be ''right click'' -> ''extract here''). Then go to the place where you extracted the archive in the terminal and execute the install script:
 +
 +<code bash>
 +$ cd ~/Downloads/sbcl-1.3.1-x86-64-linux && sh install.sh
 +</code>
 +
 +<html><!--
 +KnowRob seems to have some issues with Java 7, so if the compilation step below complains about rosjava or gradle, [[https://askubuntu.com/questions/464755/how-to-install-openjdk-8-on-14-04-lts|please install Java 8]].
 +--></html>
 +
 +Next step is to check out and compile all the necessary repositories:
 +
 +<code bash>
 +$ cd ~/workspace/ros/src
 +$ wstool init
 +$ wstool merge https://raw.githubusercontent.com/cram2/cram/master/cram-14.04.rosinstall
 +$ wstool update
 +$ cd ~/workspace/ros
 +$ rosdep update
 +$ rosdep install --ignore-src --from-paths src/
 +$ catkin_make
 +</code>
 +
 +Note that the ''wstool update'' command is the one that downloads the source code of CRAM and its dependencies such as KnowRob.
 +
 +If something went wrong consult the [[/support|Support page]] or feel free to drop an email to the person maintaining this page (check the "Last edited by" part of the footer).
 +
 +==== Windows Install ====
 +  - Enable Hardware Virtualization in your BIOS settings
 +  - [[https://medium.com/javarevisited/using-wsl-2-with-x-server-linux-on-windows-a372263533c3|Install, configure and launch VcXsrv]]
 +  - Enable the WSL 2 feature in ''Turn Windows features on or off'' 
 +  - Set Firewall to allow WSL comunication. Easiest way is by disabling Firewall for public networks, or add a rule for WSL.
 +  - [[https://seafile.zfn.uni-bremen.de/f/8960a515395f4a96b97b/|Download the WSL image]]
 +  - Import the image into WSL from Powershell with <code> wsl --import Ubuntu-20.04-Cram C:\Users\$env:UserName\Documents\Ubuntu-20.04-Cram C:\Users\$env:UserName\Downloads\Ubuntu2004RosCramJupyter.tar </code>
 +  - Set the image as default with <code>wsl --set-default Ubuntu-20.04-Cram</code>
 +  - Launch Ubuntu-20.04 from the windows menu. The username and password is ''cram''
 +  - ''glxgears'' will test the x-forwarding to VcXsrv. If nothing happens, check the VcXsrv setup and Firewall rules.
 +  - ''roslisp_repl &'' will launch Emacs.
 +
 +Happy hacking!
 +
 +=== How to launch the Jupyter Notebook ===
 +
 +  - ''roslaunch cram_pr2_pick_place_demo sandbox.launch &''
 +  - ''jupyter-lab --allow-root --no-browser --port 8888''
 +  - Open the URL in your browser
  
 ===== Get ready for development ===== ===== Get ready for development =====
Line 189: Line 306:
 Before you open emacs you might want to configure it, at least set up the clipboard properly to enable copy/paste from/to other apps. That is described in the [[http://cram-system.org/doc/ide|Setup and IDE]] and [[http://cram-system.org/doc/emacs-config|Emacs Initialization File]] pages and there is also more than enough material available online. Before you open emacs you might want to configure it, at least set up the clipboard properly to enable copy/paste from/to other apps. That is described in the [[http://cram-system.org/doc/ide|Setup and IDE]] and [[http://cram-system.org/doc/emacs-config|Emacs Initialization File]] pages and there is also more than enough material available online.
  
-Open your emacs and enjoy the repl animation ;)+Open your emacs and wait until "ROS welcomes you":
  
 <code bash> <code bash>