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
tutorials:pycram:setup [2021/07/30 12:37] jdechtutorials:pycram:setup [2022/02/01 15:57] (current) – [PyCRAM on Ubuntu 20.04 (ROS Noetic)] jdech
Line 12: Line 12:
 ===== Installing ROS ===== ===== Installing ROS =====
 PyCRAM uses ROS for a variety of functionality, for this reason you need a working ROS installation on your machine.  PyCRAM uses ROS for a variety of functionality, for this reason you need a working ROS installation on your machine. 
-For information on how to install ROS please referee to the offical documentation [[http://wiki.ros.org/ROS/Installation | here]].  +For information on how to install ROS please referee to the official documentation [[http://wiki.ros.org/ROS/Installation | here]].  
  
-===== Dependencies ===== +===== Installing Dependencies =====  
-To install PyCRAM firstly the required packages must be installed. These are: +The dependencies you will need are:
     * Pip     * Pip
-    * CRAM/kdl_ik_service +    * vcstool 
-    * pybullet +These are available via the Ubuntu apt-repos and can be installed via the terminal
-    * Pathlib +<code bash> 
-    * numpy +sudo apt-get install python3-pip python3-vcstool 
-    * urdfpy +</code>
-    * graphviz +
-    * urdf-parser-py +
- +
-Firstly Pip needs to be installed, on Ubuntu this can be done vie the following command+
-<code>sudo apt-get install python3-pip</code> +
- +
-PyCRAM uses the the KDL Inverse Kinematic service of CRAM, to use the IK service CRAM needs to be installed. For instructions on how to install CRAM click [[../../installation | here]]. +
- +
-The rest can be installed using Pip by typing the following command into a terminal: +
-<code>pip3 install <DEPENDENCY> </code>+
  
 ===== PyCRAM on Ubuntu 20.04 (ROS Noetic) ===== ===== PyCRAM on Ubuntu 20.04 (ROS Noetic) =====
-To get PyCRAM simply clone the repository with the following command into your ROS workspace:+Before installing PyCRAM you need to setup a ROS workspace into which PyCRAM can be cloned.
 <code> <code>
 +mkdir -p ~/workspace/ros/src
 +cd workspace/ros
 +catkin_make
 +source devel/setup.bash
 +</code>
 +
 +If ''catkin_make'' does not work this probably means that you did not source your ROS installation, which is needed for ''catkin_make'':
 +<code bash>
 +source /opt/ros/noetic/setup.bash
 +</code>
 +Now you can install PyCRAM into your ROS workspace. 
 +
 +<code bash>
 cd <Path to your ROS workspace> cd <Path to your ROS workspace>
 cd src/ cd src/
-git clone https://github.com/cram2/pycram.git +vcs import --input https://raw.githubusercontent.com/cram2/pycram/dev-noetic/pycram.rosinstall 
-cd pycram/+</code> 
 + 
 +The cloning and setting up can take several minutes. After the command finishes you should see a number of repositories in your ROS workspace.  
 + 
 +Now the last thing that needs to be done is clone the submodules of the PyCRAM repo, this is done via the following commands: 
 +<code bash> 
 +cd pycram
 git submodule init git submodule init
 git submodule update git submodule update
Line 46: Line 55:
  
 The cloned repository contains the source code for PyCRAM as well as two short demos which demonstrate how to use it.  The cloned repository contains the source code for PyCRAM as well as two short demos which demonstrate how to use it. 
 +
 +
 +===== Python Dependencies =====
 +To install the Python dependencies Pip is used. To install Pip type the following command into a terminal. 
 +<code>
 +sudo apt-get install python3-pip
 +</code> 
 +
 +Now the actual Python packages can be installed, these are summarized in the requirements.txt in the PyCRAM repo. 
 +For this first navigate to your PyCRAM repo. 
 +<code>
 +cd <path-to-your-pycram-repo>
 +</code>
 +Then install the Python packages in the requirements.txt file 
 +<code>
 +sudo pip install -r requirements.txt
 +</code>
  
 ===== Building your ROS workspace =====  ===== Building your ROS workspace ===== 
Line 51: Line 77:
  
 You can build your ROS workspace with the following commands: You can build your ROS workspace with the following commands:
-<code>+<code bash>
 cd <Path to your ROS workspace> cd <Path to your ROS workspace>
 catkin_make catkin_make