Materials for the Sequence and Motion Planning for Robotic Spatial Assembly workshop using COMPAS framework and Choreo as the planning engine.
During this workshop, we will ...
- Operating System: Windows 10 Pro
- Rhinoceros 3D 6.0: Focus on Rhino 6.0 only. See here if you use Rhino 5.0
- Anaconda Python Distribution: 2.7 or 3.x
- Git: official command-line client or visual GUI (e.g. Github Desktop or SourceTree)
(1): Windows 10 Home does not support running Docker.
Rhino 5.0
The focus of the workshop will be on Rhino 6.0 only. While most things will work on Rhino 5.0, it is not recommended as there are several manual steps required to get the software to run.However, if you do use Rhino 5.0, make sure to install the following:
We will install all the required COMPAS packages using Anaconda. Anaconda uses environments to create isolated spaces for projects' depedencies, it is recommendable that you do all the exercises in a newly created environment.
First, clone this repository.
Start your Anaconda Prompt, go to the destination folder where you wish to place all the workshop material and run:
git clone --recursive https://github.com/yijiangh/compas_fab_choreo_workshop.git
If you forget the `--recursive`
Run the following to update submodules:
git submodule update --init --recursive
Now, we can create the environment and install all packages. Start your Anaconda Prompt, go to the repository folder you just cloned, and run:
conda env create -f workshop.yml -n compas_fab-choreo_workshop
conda activate compas_fab-choreo_workshop
Not working?
Make sure you really changed into the repository folder. For example, if you cloned the repository into a folder called Code
in your home directory, you should type:
On Mac
cd ~/Code/compas_fab_choreo_workshop
On Windows
cd %USERPROFILE%\Code\compas_fab_choreo_workshop
If the command fails because you already have an environment with the same name, choose a different one, or remove the old one before creating the new one:
conda remove -n workshop --all
Great! Now type python
in your Anaconda Prompt, and test if the installation went well:
>>> import compas
>>> import compas_fab
If that doesn't fail, you're good to go! Exit the python interpreter (either typing exit()
or pressing CTRL+Z
followed by Enter
).
Now let's make all the installed packages available inside Rhino. Still from the Anaconda Prompt, type the following:
python -m compas_rhino.install -v 6.0 -p compas compas_ghpython compas_rhino compas_fab roslibpy
Congrats! 🎉 You are all set! Open Rhino and try to import compas
to verify everything is working fine.
cd compas_fab.assembly_tests/gh_prototypes/ur_picknplace
Open the ur_picknplace_urdf_export_v0.ghx
in Grasshopper.
cd examples
python 0_choreo_picknplace.py
cd docker/ros-systems/ros-ur5
docker-compose up -d
# after the docker containers are running
cd ../../../examples
# make sure you activate the conda env 'workshop' already
python 0_choreo_picknplace.py -ros
Sometimes things don't go as expected. Here are some of answers to the most common issues you might bump into:
Q:
conda
commands don't work.
Try running them from the Conda Prompt. Depending on how you installed Anaconda, it might not be available by default on the normal Windows command prompt.
Q: When trying to install the framework in Rhino, it fails indicating the lib folder of IronPython does not exist.
Make sure you have opened Rhino 6 and Grasshopper at least once, so that it finishes setting up all its internal folder structure.
Q: error: Microsoft Visual C++ 14.0 is required
Follow the link to install Microsoft Visual C++ 14.0 https://www.scivision.co/python-windows-visual-c++-14-required/