diff --git a/INSTALL_DEPENDENCIES.md b/INSTALL_DEPENDENCIES.md new file mode 100644 index 0000000000000000000000000000000000000000..fd50cd05c78d814cc89effe90215138602e3ab5a --- /dev/null +++ b/INSTALL_DEPENDENCIES.md @@ -0,0 +1,89 @@ +# Dependencies needed to compile the generated projects +## Note +The generator creates compile scripts for all supported compilers. A project with ROS Middleware contains `compile.sh`, as only Linux is supported by ROS. A project with ROS2 contains `compile.sh` and `compileMsbuild.bat` as Linux and Windows(with Msbuild) are supported. +If you are having problems compiling on Windows because of the path length limit, use `substCompileMsbuild.bat` or `substCompileMingw.bat`. +## All generated projects +CMake, Make, a C++ compiler, and Armadillo are required to compile the generated projects. +## Linux +Gcc is recommended as the C++ compiler. +Example install of all needed packages for ubuntu: +```bash +sudo apt install gcc cmake make +``` +Then download Armadillo from here: [Linux](https://rwth-aachen.sciebo.de/s/igDWzLpdO5zYHBj/download?path=%2Fubuntu%2F18.10.24-armadillo-linux&files=armadillo-8.500.1-linux.zip) and set the environment variable `Armadillo_HOME` to the base dir of your installation. + +To check everything is installed correctly use whereis/ls: +```bash +$ whereis g++ +g++: /usr/bin/g++ +$ whereis cmake +cmake: /usr/bin/cmake +$ whereis make +make: /usr/bin/make +$ ls "$Armadillo_HOME/include" +armadillo_bits armadillo.h +``` + +## Windows +Mingw64 gcc is recommended as the C++ compiler. Download a version with all needed tools from [here](https://rwth-aachen.sciebo.de/s/igDWzLpdO5zYHBj/download?path=%2Fwin64&files=mingw64.zip). + +CMake for Windows: https://cmake.org/download/ + +Make for Windows: http://gnuwin32.sourceforge.net/packages/make.htm + +Add the bin directories of all 3 to your PATH variable. + +Then download Armadillo from here: [Windows](https://rwth-aachen.sciebo.de/s/igDWzLpdO5zYHBj/download?path=%2Fwin64&files=armadillo-8.200.2.zip) and set the environment variable `Armadillo_HOME` to the base dir of your installation. +To check everything is installed correctly use where/dir: +```batch +> where g++ +C:\mingw64\bin\g++.exe +> where cmake +C:\Program Files\CMake\bin\cmake.exe +> where make +C:\Program Files\make-3.81-bin\bin\make.exe +> dir /b "%Armadillo_HOME%\include" +armadillo +armadillo.h +... +``` + +Alternatively Msbuild can be used as a compiler. Download and install Build Tools für Visual Studio 2017 by visiting [this](https://visualstudio.microsoft.com/de/downloads/) site, and navigating to `Tools for Visual Studio 2017`. +Set the environment variable `msbuild_HOME` to the Folder containing `vcvars64.bat`(Standard destination: "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build") + +To check everything is installed correctly use where/dir: +```batch +> where cmake +C:\Program Files\CMake\bin\cmake.exe +> dir /b "%Armadillo_HOME%\include" +armadillo +armadillo.h +... +> dir /b "%msbuild_HOME%" +vcvars32.bat +vcvars64.bat +... +> call "%msbuild_HOME%\vcvars64.bat" +********************************************************************** +** Visual Studio 2017 Developer Command Prompt v15.0 +** Copyright (c) 2017 Microsoft Corporation +********************************************************************** +[vcvarsall.bat] Environment initialized for: 'x64' + +> where msbuild +C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe +``` + + +Please note: It is highly recommended, you stick to the exact versions as stated above. Otherwise you might run into trouble regarding the interplay between cmake/make and the Armadillo library. In particular problems have been reported using Cygwin. + +## Projects with roscpp generator +Only for generated projects that contain a ROS adapter(e.g. "generators":["cpp","roscpp"]). +ROS Kinetic currently only supports Linux and the installation is described [here](http://wiki.ros.org/kinetic/Installation/Ubuntu). +Set the environment varialble `ROS_HOME` to the base of your ROS installation. + +## Projects with ros2cpp/rclcpp generator +Only for generated projects that contain a ROS2 adapter(e.g. "generators":["cpp","rclcpp"]). +Tested under ROS2 Bouncy and Crystal with Windows 10 and Ubuntu 18.04 respectively and the installation is described [here](https://index.ros.org/doc/ros2/Installation/). +ROS2 under Windows can only be compiled with msbuild. +Set the environment varialble `ROS2_HOME` to the base of your ROS2 installation. diff --git a/README.md b/README.md index 0efc69344be6201bcf996884cb78bea0371e6d78..314047932a0ea97f25db717889928b6a1e4697c5 100644 --- a/README.md +++ b/README.md @@ -6,103 +6,17 @@ This generator takes an EMAM or EMADL model and connects it to a middleware libr All communication of these 2 Components will then be tunneled trough the specified middleware: ![MiddlewareAdapter](/uploads/6e9c69e6b56554579551769174df3697/MiddlewareAdapter.png) -## Quickstart +## Other important documents +### Quickstart If you want to use the generator for your project, check out [QUICKSTART_USER.md](QUICKSTART_USER.md). If you want to add features to this generator, check out [QUICKSTART_DEVELOPER.md](QUICKSTART_DEVELOPER.md) -## Writing your own Middleware Generator +### Writing your own Middleware Generator see [TUTORIAL_ADD_MIDDLEWARE.md](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAM2Middleware/blob/master/TUTORIAL_ADD_MIDDLEWARE.md) -## Dependencies needed to compile the generated projects -### Note -The generator creates compile scripts for all supported compilers. A project with ROS Middleware contains `compile.sh`, as only Linux is supported by ROS. A project with ROS2 contains `compile.sh` and `compileMsbuild.bat` as Linux and Windows(with Msbuild) are supported. -If you are having problems compiling on Windows because of the path length limit, use `substCompileMsbuild.bat` or `substCompileMingw.bat`. -### All generated projects -CMake, Make, a C++ compiler, and Armadillo are required to compile the generated projects. -#### Linux -Gcc is recommended as the C++ compiler. -Example install of all needed packages for ubuntu: -```bash -sudo apt install gcc cmake make -``` -Then download Armadillo from here: [Linux](https://rwth-aachen.sciebo.de/s/igDWzLpdO5zYHBj/download?path=%2Fubuntu%2F18.10.24-armadillo-linux&files=armadillo-8.500.1-linux.zip) and set the environment variable `Armadillo_HOME` to the base dir of your installation. - -To check everything is installed correctly use whereis/ls: -```bash -$ whereis g++ -g++: /usr/bin/g++ -$ whereis cmake -cmake: /usr/bin/cmake -$ whereis make -make: /usr/bin/make -$ ls "$Armadillo_HOME/include" -armadillo_bits armadillo.h -``` - -#### Windows -Mingw64 gcc is recommended as the C++ compiler. Download a version with all needed tools from [here](https://rwth-aachen.sciebo.de/s/igDWzLpdO5zYHBj/download?path=%2Fwin64&files=mingw64.zip). - -CMake for Windows: https://cmake.org/download/ - -Make for Windows: http://gnuwin32.sourceforge.net/packages/make.htm - -Add the bin directories of all 3 to your PATH variable. - -Then download Armadillo from here: [Windows](https://rwth-aachen.sciebo.de/s/igDWzLpdO5zYHBj/download?path=%2Fwin64&files=armadillo-8.200.2.zip) and set the environment variable `Armadillo_HOME` to the base dir of your installation. -To check everything is installed correctly use where/dir: -```batch -> where g++ -C:\mingw64\bin\g++.exe -> where cmake -C:\Program Files\CMake\bin\cmake.exe -> where make -C:\Program Files\make-3.81-bin\bin\make.exe -> dir /b "%Armadillo_HOME%\include" -armadillo -armadillo.h -... -``` - -Alternatively Msbuild can be used as a compiler. Download and install Build Tools für Visual Studio 2017 by visiting [this](https://visualstudio.microsoft.com/de/downloads/) site, and navigating to `Tools for Visual Studio 2017`. -Set the environment variable `msbuild_HOME` to the Folder containing `vcvars64.bat`(Standard destination: "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build") - -To check everything is installed correctly use where/dir: -```batch -> where cmake -C:\Program Files\CMake\bin\cmake.exe -> dir /b "%Armadillo_HOME%\include" -armadillo -armadillo.h -... -> dir /b "%msbuild_HOME%" -vcvars32.bat -vcvars64.bat -... -> call "%msbuild_HOME%\vcvars64.bat" -********************************************************************** -** Visual Studio 2017 Developer Command Prompt v15.0 -** Copyright (c) 2017 Microsoft Corporation -********************************************************************** -[vcvarsall.bat] Environment initialized for: 'x64' - -> where msbuild -C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe -``` - - -Please note: It is highly recommended, you stick to the exact versions as stated above. Otherwise you might run into trouble regarding the interplay between cmake/make and the Armadillo library. In particular problems have been reported using Cygwin. - -### Projects with roscpp generator -Only for generated projects that contain a ROS adapter(e.g. "generators":["cpp","roscpp"]). -ROS Kinetic currently only supports Linux and the installation is described [here](http://wiki.ros.org/kinetic/Installation/Ubuntu). -Set the environment varialble `ROS_HOME` to the base of your ROS installation. - -### Projects with ros2cpp/rclcpp generator -Only for generated projects that contain a ROS2 adapter(e.g. "generators":["cpp","rclcpp"]). -Tested under ROS2 Bouncy and Crystal with Windows 10 and Ubuntu 18.04 respectively and the installation is described [here](https://index.ros.org/doc/ros2/Installation/). -ROS2 under Windows can only be compiled with msbuild. -Set the environment varialble `ROS2_HOME` to the base of your ROS2 installation. +### Dependencies needed to compile the generated projects +See [INSTALL_DEPENDENCIES.md](INSTALL_DEPENDENCIES.md) ## Usage ### CLI