-
Notifications
You must be signed in to change notification settings - Fork 29
Installing Carmen on Ubuntu 20.04 (English)
NOTE: If you are going to use ROS, first finish the complete installation of CARMEN. When you download ROS, it deletes packages necessary for the compilation of CARMEN, so errors will occur. If you already have ROS downloaded, install CARMEN completely first, then just download the ROS packages that were deleted.¶ ↑
sudo apt-get update
sudo apt-get install git
Download Carmen and MAE via git (download while following the next steps) (To avoid conflicts with the system, execute cd ~ before git clone, DO NOT modify the folder locations):¶ ↑
cd ~ git clone https://github.com/LCAD-UFES/carmen_lcad git clone https://github.com/LCAD-UFES/MAE.git
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 sudo apt-add-repository https://cli.github.com/packages sudo apt update sudo apt install gh gh repo clone LCAD-UFES/carmen_lcad gh repo clone LCAD-UFES/MAE
NOTE: If you’re getting Carmen from a USB drive, run “git pull” before starting the installations.
sudo add-apt-repository ppa:rock-core/qt4 sudo apt update
sudo apt-get install swig \ libgtk2.0-dev \ libimlib2 libimlib2-dev \ imagemagick libmagick++-dev \ libwrap0 libwrap0-dev tcpd \ libncurses5 libncurses5-dev libgsl23 \ libdc1394-22 libdc1394-22-dev libdc1394-utils \ libgtkglext1 libgtkglext1-dev \ libgtkglextmm-x11-1.2-0v5 \ libglade2-0 libglade2-dev \ freeglut3 freeglut3-dev \ libcurl4 libcurl4-nss-dev \ libkml-dev \ liburiparser1 liburiparser-dev \ libusb-1.0-0 libusb-1.0-0-dev libusb-dev \ libxi-dev libxi6 \ libxmu-dev libxmu6 \ build-essential libforms-dev \ byacc flex doxygen libgflags-dev
sudo apt-get install libespeak-dev libfftw3-dev pkg-config \ libavcodec-dev libavformat-dev libswscale-dev libtbb2 libtbb-dev \ libjpeg-dev libpng-dev libpng++-dev libtiff-dev \ libgstreamer-plugins-base1.0-dev gimp meld vim \ python-numpy python-dev python3-numpy python3-dev \ python3-pip python3-wheel \ g++ mpi-default-dev openmpi-bin openmpi-common \ libqhull* libgtest-dev git-core \ libflann1.9 \ libeigen3-dev \ libboost-all-dev libflann-dev libproj-dev libsuitesparse-dev libqt4-dev qt4-qmake \ make libtiff5-dev tcsh wget \ linux-headers-`uname -r` kmod libraw1394-11 libgtkmm-2.4-dev libglademm-2.4-dev \ libgtkglextmm-x11-1.2-dev libudev-dev \ libvtk6* \ qttools5-dev libasound2-dev \ mpg123 portaudio19-dev libjsoncpp-dev \ libglew2.1 libglew-dev \ libgtk-3-dev \ cmake cmake-curses-gui cmake-qt-gui mlocate inkscape gnuplot-qt
Note: libglewmx-dev was removed from the list because it was causing conflicts on Ubuntu 18.04. If someone verifies that it’s necessary, please check the correct version that doesn’t cause conflicts.
Next:
sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main" sudo apt update sudo apt install libjasper1 libjasper-dev sudo updatedb
Next:
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
pip3 install casadi
If your computer has an NVIDIA card, follow the steps listed at github.com/LCAD-UFES/carmen_lcad/wiki/Installing-CUDA-11-[English]¶ ↑
For Eclipse installation, follow the steps listed at github.com/LCAD-UFES/carmen_lcad/wiki/Installing-Eclipse.¶ ↑
IMPORTANT: THE INSTALLATION OF THE PACKAGES BELOW CAN FOLLOW YOUR DIRECTORY ORGANIZATION CRITERIA ON YOUR LINUX SYSTEM! FOR EXAMPLE, THE MOST COMMON LOCATION IS /usr/local/ FOR LIBRARY PACKAGES. HOWEVER, FOR PROGRAMS LIKE ECLIPSE, THE MOST COMMON DIRECTORY IS /opt/, SO THAT THESE PACKAGES WILL BE AVAILABLE FOR ALL MACHINE USERS (TO ACCESS INSTALLATION FOLDERS, AS WHEN THE PACKAGE IS INSTALLED, MOST OF THEM ARE INSTALLED FOR ALL USERS)¶ ↑
IF YOU PREFER, ANOTHER MODEL WE SUGGEST IS TO CREATE A FOLDER IN YOUR HOME DIRECTORY NAMED packages_carmen, TO CENTRALIZE AND SEPARATE THESE PACKAGES.¶ ↑
BELOW EACH INSTALLATION STEP, THERE WILL BE A BLOCK OF “Commands above in one line”. THIS OPTION JOINS ALL THE STEP COMMANDS INTO A SINGLE LINE OF CODE. IF YOU HAVEN’T INSTALLED CARMEN MORE THAN 5 TIMES YET, DO NOT USE THIS OPTION.¶ ↑
THIS INSTALLATION WILL FOLLOW THE INSTALLATION MODEL IN ~/packages_carmen, REMEMBER TO DELETE THE COMPRESSED FOLDERS (tar.gz etc) AFTER FINISHING THE INSTALLATIONS.¶ ↑
Currently, on Ubuntu 20, it is necessary to have both OpenCV 3 and OpenCV 4.
cd ~ mkdir packages_carmen cd ~/packages_carmen wget https://github.com/opencv/opencv/archive/refs/tags/4.5.5.tar.gz -O opencv_4.5.5.tar.gz wget https://github.com/opencv/opencv_contrib/archive/refs/tags/4.5.5.tar.gz -O opencv_contrib-4.5.5_.tar.gz tar xzvf opencv_4.5.5.tar.gz tar xzvf opencv_contrib-4.5.5_.tar.gz cd opencv-4.5.5/ mkdir build cd build/ cmake -D BUILD_TIFF=ON -D WITH_CUDA=OFF -D ENABLE_AVX=OFF -D WITH_OPENGL=OFF -D WITH_OPENCL=OFF -D WITH_IPP=OFF -D WITH_TBB=ON -D WITH_EIGEN=OFF -D WITH_V4L=OFF -D WITH_VTK=OFF -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D INSTALL_C_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.5.5/modules -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX:PATH=/usr/local/carmen_opencv_4_5 .. make -j12 sudo make install sudo ldconfig sudo updatedb cd ../..
cd ~/packages_carmen wget https://github.com/opencv/opencv/archive/3.2.0.tar.gz -O opencv_3.2.0.tar.gz wget https://github.com/opencv/opencv_contrib/archive/3.2.0.tar.gz -O opencv_contrib-3.2.0_.tar.gz tar xvzf opencv_3.2.0.tar.gz tar xzvf opencv_contrib-3.2.0_.tar.gz cd opencv-3.2.0/ perl -i.bak -p -e 's/char\* str = PyString_AsString\(obj\);/const char\* str = PyString_AsString\(obj\);/g;' modules/python/src2/cv2.cpp mkdir build cd build/ cmake -D BUILD_TIFF=ON -D WITH_CUDA=OFF -D ENABLE_AVX=OFF -D WITH_OPENGL=OFF -D WITH_OPENCL=OFF -D WITH_IPP=OFF -D WITH_TBB=ON -D WITH_EIGEN=OFF -D WITH_V4L=OFF -D WITH_VTK=OFF -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D INSTALL_C_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.2.0/modules -D CMAKE_BUILD_TYPE=RELEASE .. make -j12 sudo make install sudo ldconfig sudo updatedb cd ../..
If the make -j12 command presents any error related to ffmpeg, do the following:
gedit ~/packages_carmen/opencv-3.2.0/modules/videoio/src/cap_ffmpeg_impl.hpp
Copy and paste the three lines below into the file (Place them at the beginning of the file):
#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22) #define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER #define AVFMT_RAWPICTURE 0x0020
Commands above in one line:
.
During compilation, you may encounter the “Hdf5 not found” error. To resolve this, edit the common.cmake file (in the directory ../opencv/modules/python), and (right below the line set(PYTHON_SOURCE_DIR “${CMAKE_CURRENT_SOURCE_DIR}/../”), insert the following lines:
find_package(HDF5) include_directories(${HDF5_INCLUDE_DIRS}) recrie a pasta build e compile novamente
During the compilation, you might encounter the error “fatal error: LAPACKE_H_PATH-NOTFOUND when building OpenCV”. To resolve this, you can run sudo apt-get install liblapacke-dev checkinstall and then modify #include “LAPACKE_H_PATH-NOTFOUND/lapacke.h” to #include “lapacke.h”, then run make again.
If cmake presents an error similar to the one below:
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") -- Looking for ccache - found (/usr/local/bin/ccache) CMake Error at cmake/OpenCVCompilerOptions.cmake:21 (else): A duplicate ELSE command was found inside an IF block. Call Stack (most recent call first): CMakeLists.txt:495 (include)
Edit the file cmake/OpenCVCompilerOptions.cmake, and replace the following lines:
endif() else() message(STATUS "Looking for ccache - not found") endif() endif() endif()
For the following ones:
endif() endif() else() message(STATUS "Looking for ccache - not found") endif() endif()
sudo apt-get update sudo apt-get install libbullet-dev wget http://downloads.sourceforge.net/project/fann/fann/2.2.0/FANN-2.2.0-Source.tar.gz wget "https://www.kvaser.com/download/?utm_source=software&utm_ean=7330130980754&utm_status=latest" -O linuxcan.tar.gz
Note: The previous procedure to download the LINUXCAN.TAR.GZ file was to go to the website “www.kvaser.com/downloads-kvaser/”, then select the option “Kvaser LINUX Driver and SDK”.
tar -xvf linuxcan.tar.gz tar -xvf FANN-2.2.0-Source.tar.gz
Commands above in one line:
cd ~/packages_carmen && sudo apt-get update && sudo apt-get install libbullet-dev && wget http://downloads.sourceforge.net/project/fann/fann/2.2.0/FANN-2.2.0-Source.tar.gz && wget "https://www.kvaser.com/download/?utm_source=software&utm_ean=7330130980754&utm_status=latest" -O linuxcan.tar.gz && tar -xvf linuxcan.tar.gz && tar -xvf FANN-2.2.0-Source.tar.gz
Continuing with the installation:
cd linuxcan make sudo make install cd ../FANN-2.2.0-Source mkdir build && cd build cmake .. make sudo make install cd ../..
Commands above in one line:
cd linuxcan && make && sudo make install && cd ../FANN-2.2.0-Source && mkdir build && cd build && cmake .. && make && sudo make install && cd ~/packages_carmen
git clone https://github.com/RhobanDeps/flycapture.git cd flycapture sudo sh install_flycapture.sh cd ..
Commands above in one line:
git clone https://github.com/RhobanDeps/flycapture.git && cd flycapture && sudo sh install_flycapture.sh && cd ..
After installing the dependencies, add the following line to the /etc/modules file (IS THIS NECESSARY?):
raw1394
Attention: If this link goes offline, obtain it from another source with the same version. CARMEN currently does NOT work with any other version of Boost on Ubuntu 20.04 (older installation).
Due to the conflict with ROS Noetic on Ubuntu 20.04, the Boost installation will not occur in the /usr/local directory but in /usr/local/carmen_boost.
1- Open the terminal (Ctrl+Alt+T) and delete /usr/local/lib/libboost* and /usr/local/include/boost with the following commands:
sudo rm /usr/local/lib/libboost*
sudo rm -r /usr/local/include/boost
2- Go to the packages_carmen folder and remove Boost there as well:
sudo rm -r ~/packages_carmen/boost_1_61_0
We will reinstall Boost in /usr/local/carmen_boost instead of /usr/local, due to conflicts with the Boost from ROS.
1- With the terminal open, type:
cd ~/packages_carmen
tar -xf ~/carmen_lcad/ubuntu_packages/boost_1_61_0.tar.xz -C .
cd boost_1_61_0
cpuCores=`cat /proc/cpuinfo | grep "cpu cores" | uniq | awk '{print $NF}'`
echo "Available CPU cores: "$cpuCores
sudo mkdir /usr/local/carmen_boost
3- Edit the constant PREFIX (line 14) in the file bootstrap.sh to “PREFIX=/usr/local/carmen_boost” and save (Ctrl+S):
gedit ~/packages_carmen/boost_1_61_0/bootstrap.sh
4- Run the following sh , it will generate the “./b2” executable
./bootstrap.sh
sudo ./b2 --with=all -j $cpuCores install
cd ..
ls /usr/local/carmen_boost/lib
#CARMEN BOOST
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/carmen_boost/lib
sudo ln -s /usr/local/carmen_boost/lib/libboost_thread.a /usr/local/carmen_boost/lib/libboost_thread-mt.a sudo ln -s /usr/local/carmen_boost/lib/libboost_thread.so /usr/local/carmen_boost/lib/libboost_thread-mt.so sudo ln -s /usr/local/carmen_boost/lib/libboost_thread.so.1.61.0 /usr/local/carmen_boost/lib/libboost_thread-mt.so.1.61.0
**Tip: Start the installation at night and go to sleep. ATTENTION: Installation on Ubuntu 20.04 requires some changes to the code before compiling PCL. Execute the commands carefully.
Due to the Boost installation in the new location, we will need to edit some files.
wget https://github.com/PointCloudLibrary/pcl/archive/pcl-1.8.0.tar.gz tar -xf pcl-1.8.0.tar.gz cd pcl-pcl-1.8.0 mkdir build && cd build perl -i.bak -p -e 's/return \(plane_coeff_d_\);/return \(*plane_coeff_d_\);/g;' ../segmentation/include/pcl/segmentation/plane_coefficient_comparator.h cmake .. perl -i.bak -p -e 's/-lm/-lm -llz4/g;' kdtree/CMakeFiles/pcl_kdtree.dir/link.txt # The right approach is to insert this into the PCL cmake file. If someone finds a better way to do this, modify it.
Open the following file:
gedit ~/packages_carmen/pcl-pcl-1.8.0/cmake/pcl_find_boost.cmake
Change the include_directories and link_directories like this:
include_directories(/usr/local/carmen_boost/include SYSTEM ${Boost_INCLUDE_DIRS})
link_directories(/usr/local/carmen_boost/lib ${Boost_LIBRARY_DIRS})
make sudo make install cd ../..
If the following error occurs:
undefined reference to `LZ4_resetStreamHC'
Open the link.txt :
gedit ~/packages_carmen/pcl-pcl-1.8.0/build/kdtree/CMakeFiles/pcl_kdtree.dir/link.txt
And add “-llz4” at the end of the file, then compile again.
sudo apt install libusb-1.0-0 sudo apt-get install -y libfreenect-dev sudo apt install libfreenect-bin
If it doesn’t work..
wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.19/libusb-1.0.19.tar.bz2 tar -xvf libusb-1.0.19.tar.bz2 cd libusb-1.0.19 ./configure make sudo make install cd .. wget https://github.com/OpenKinect/libfreenect/archive/v0.5.7.tar.gz tar -xzvf v0.5.7.tar.gz cd libfreenect-0.5.7 mkdir build && cd build cmake .. cp src/libfreenect.pc ../../ make cp ../src/libfreenect.pc.in src/libfreenect.pc cp ../fakenect/fakenect.sh.in fakenect/fakenect.sh sudo make install sudo ldconfig /usr/local/lib64/ cd ../..
Commands above in one line:
wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.19/libusb-1.0.19.tar.bz2 && tar -xvf libusb-1.0.19.tar.bz2 && cd libusb-1.0.19 && ./configure && make && sudo make install && cd .. && wget https://github.com/OpenKinect/libfreenect/archive/v0.5.7.tar.gz && tar -xzvf v0.5.7.tar.gz && cd libfreenect-0.5.7 && mkdir build && cd build && cmake .. && cp src/libfreenect.pc ../../ && make && cp ../src/libfreenect.pc.in src/libfreenect.pc && cp ../fakenect/fakenect.sh.in fakenect/fakenect.sh && sudo make install && sudo ldconfig /usr/local/lib64/ && cd ../..
To test run:
freenect-glview
Tip: Restart the machine beforehand, it’s a time-consuming installation and may freeze the machine.
If you have an old version of g2o, remove it from where it was downloaded. Ex:
/usr/local/g2o ou ~/packages_carmen/g2o
And the following folders, if they exist:
/usr/local/include/g2o /usr/local/lib/libg2o* Você leu atentamente?!
If there’s a more efficient way, please feel free to contribute! =D
It’s up to you whether to use /usr/local or ~/packages_carmen to install this library. If you use /usr/local, all commands must be sudo.
INSTALLATION MODEL FOR NEW VERSION of g2o:
Tenha certeza de ter lido atentamente o texto anterior até aqui! cd ~/packages_carmen git clone https://github.com/LCAD-UFES/g2o-1.git mv g2o-1 g2o cd g2o mkdir build && cd build cmake .. make -j 12 sudo make install cd ../..
In case there’s any compatibility issue with this library in the future, a fork of the latest working version is available on the LCAD git (here [github.com/LCAD-UFES/g2o-1.git]).
((NOTE!)) The OFFICIAL g2o repository HAS BEEN UPDATED TO g++14, and currently, we are using g++11. If it’s necessary to use the official version, clone the version from: [github.com/RainerKuemmerle/g2o.git] instead of the LCAD version (Install only ONE of the versions).
sudo ln -s /usr/local/carmen_boost/lib/libboost_thread.so /usr/local/carmen_boost/lib/libboost_thread-mt.so
cd ~/packages_carmen git clone https://github.com/davisking/dlib.git cd dlib/ git checkout -b v19.17 git pull origin v19.17 mkdir build && cd build cmake .. make -j 12 sudo make install cd ../..
Commands above in one line:
cd ~/packages_carmen && git clone https://github.com/davisking/dlib.git && cd dlib/ && git checkout -b v19.17 && git pull origin v19.17 && mkdir build && cd build && cmake .. && make -j 8 && sudo make install && cd ../..
git clone http://github.com/filipemtz/libwnn cd libwnn mkdir build && cd build cmake .. make -j 12 sudo make install cd ../..
Commands above in one line:
git clone http://github.com/filipemtz/libwnn && cd libwnn && mkdir build && cd build && cmake .. && make -j 8 && sudo make install && cd ../..
Observation: If the following error occurs:
CMake Warning at /home/mscdo/opencv-3.1.0/cmake/OpenCVConfig.cmake:166 (message): Found OpenCV Windows Pack but it has no binaries compatible with your configuration. You should manually point CMake variable OpenCV_DIR to your build of OpenCV library. Call Stack (most recent call first): example/mnist/CMakeLists.txt:2 (find_package) CMake Error at example/mnist/CMakeLists.txt:2 (find_package): Found package configuration file: /home/mscdo/opencv-3.1.0/cmake/OpenCVConfig.cmake but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be NOT FOUND.
Delete the contents of the build folder to remove the configuration files, and rerun the cmake command adding the path to the OpenCV build folder:
rm -rf libwnn/build/* cd libwnn/build cmake -D OpenCV_DIR=~/packages_carmen/opencv-3.1.0/build/ .. make -j 8 sudo make install cd ../..
Obs: Na verdade foi atualizado para o opencv 3.2, então deve mudar o path do cmake para 3.2.
sudo apt-get install libgsl0-dev
If it doesn’t work…
wget ftp://ftp.gnu.org/gnu/gsl/gsl-2.4.tar.gz tar -zxvf gsl-*.*.tar.gz cd gsl-2.4 ./configure make sudo make install cd ..
Commands above in one line:
wget ftp://ftp.gnu.org/gnu/gsl/gsl-2.4.tar.gz && tar -zxvf gsl-*.*.tar.gz && cd gsl-2.4 && ./configure && make && sudo make install && cd ..
sudo apt-get install libimlib2-dev
If it doesn’t work… Go to the carmen_lcad/ubuntu_packages folder and run the following commands:
sudo dpkg -i imlib_1.9.15-20_amd64.deb sudo dpkg -i imlib-devel_1.9.15-20_amd64.deb
TO DO: Check if the steps below are really necessary (*((Vinicius is testing))*)
sudo ln -s /usr/lib64/libgdk_imlib.so.1.9.15 /usr/lib64/libgdk_imlib.a sudo ln -s /usr/src/linux-headers-3.8.0-30/ /usr/src/linux
Download SDK 0.4.1:
https://drive.google.com/file/d/1L5wQ-yqk9REpW62EWWOS1pmnvYHFsHPE/view?usp=sharing
Install the dependencies:
sudo apt install build-essential cmake libjsoncpp-dev libeigen3-dev libcurl4-openssl-dev \
libtins-dev libpcap-dev libglfw3-dev libglew-dev
unzip ~/Downloads/ouster_example-master.zip mv ouster_example-master ~/packages_carmen/ouster_example-master cd ~/packages_carmen/ouster_example-master mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_VIZ=ON -DBUILD_PCAP=ON -DBUILD_EXAMPLES=ON .. make sudo make install
This step is deactivated. The Porcupine GitHub has been updated, and the installation method described is no longer available.
cd packages_carmen
git clone https://github.com/Picovoice/Porcupine.git
cd Porcupine
tools/optimizer/linux/x86_64/pv_porcupine_optimizer -r resources/ -p linux -o . -w "ok e ara"
export SYSTEM=linux
export MACHINE=x86_64
cd demo/alsa
g++ -O3 -o alsademo -I../../include -L../../lib/${SYSTEM}/$MACHINE -Wl,-rpath ../../lib/${SYSTEM}/$MACHINE main.cpp -lpv_porcupine -lasound
cp ../../ok\ e\ ara_linux.ppn ../../resources/keyword_files/pineapple_linux.ppn
./alsademo
*If you wish to use the voice interface, follow the installation link at: github.com/LCAD-UFES/carmen_lcad/wiki/Installing-Voice-Interface-[English]
**A Google Cloud Console account with the credit option enabled will be required.
Edit the .bashrc (gedit ~/.bashrc) and add at the end
#CARMEN export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig export CARMEN_HOME=~/carmen_lcad export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu/:/usr/lib/libkml:$CARMEN_HOME/lib export PATH=$PATH:$CARMEN_HOME/bin #OpenJaus export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CARMEN_HOME/sharedlib/OpenJAUS/libopenJaus/lib:$CARMEN_HOME/sharedlib/OpenJAUS/libjaus/lib:$CARMEN_HOME/sharedlib/OpenJAUS/ojTorc/lib:$CARMEN_HOME/sharedlib/OpenJAUS/ojIARASim/lib #MAE export MAEHOME=~/MAE export PATH=$PATH:$MAEHOME/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MAEHOME/lib #Darknet export DARKNET_HOME=$CARMEN_HOME/sharedlib/darknet export LD_LIBRARY_PATH=$DARKNET_HOME/lib:$LD_LIBRARY_PATH #Darknet2 export DARKNET2_HOME=$CARMEN_HOME/sharedlib/darknet2 export LD_LIBRARY_PATH=$DARKNET2_HOME/lib:$LD_LIBRARY_PATH #CUDA export PATH=$PATH:/usr/local/cuda/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64 export CUDA_LIBS=/usr/local/cuda/lib64 #Voice Interface export GOOGLE_APPLICATION_CREDENTIALS=~/credentials/voice_interface_credentials.json export PYTHONPATH=$PYTHONPATH:$CARMEN_HOME/src/voice_interface export SYSTEM=linux export MACHINE=x86_64 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CARMEN_HOME/packages_carmen/Porcupine/lib/linux/x86_64 #offroad_planner export CASADI_DIR=$(/usr/bin/env python3 -c "import casadi; print(casadi.__path__[0])") export LD_LIBRARY_PATH=$CASADI_DIR:$LD_LIBRARY_PATH #NOD_Tracker - always at the end export PYTHONPATH=$CARMEN_HOME/src/neural_object_detector3/pedestrian_tracker:$PYTHONPATH
Update the environment variables in all terminals by running the command “bash”.
(Perform this step ONLY if you are going to work with the road_mapper, otherwise, you can ignore it, as this step may break the Carmen installation) If you use Caffe, follow the installation steps listed at [github.com/LCAD-UFES/carmen_lcad/wiki/Installing-Caffe-[English].¶ ↑
Make sure that bash has been updated so that the environment variables are loaded.
cd $MAEHOME make
Check if the MAE library libnet_conn.a was generated in MAEHOME/lib and if the MAE compiler netcomp was generated in MAEHOME/bin.
IMPORTANT: (1) If your computer does not have an NVIDIA graphics card, Edit the Makefile with ‘gedit ../src/Makefile &’ and comment out the packages ‘tracker’, ‘neural_object_detector’, and ‘traffic_light’.
cd $CARMEN_HOME/src ./configure --nojava --nozlib --nocuda Should the C++ tools be installed for CARMEN: [Y/n] Y Should Python Bindings be installed: [y/N] N Searching for Python2.4... Should the old laser server be used instead of the new one: [y/N] N enter nessa linha -> Install path [/usr/local/]: Robot numbers [*]: 1,2
To compile, use the make_all script. It cleans the files generated in the previous make (make clean) and executes the installation of all Carmen packages. *Congratulations to Rafael for writing this script! =D* Rafael’s script has two steps. In the first one, it may display some errors on the screen, but it’s okay. In the second step, the actual compilation occurs. In this phase, the script should proceed to the end without errors. Anyone who prefers can use the ‘make’ command in the carmen_lcad/src folder (see notes below).
cd .. cd bin ./make_all (See below before proceeding)
IMPORTANT 0: It’s not necessary to use the script. Just go to “/src” and use make. You’ll encounter some errors related to headers or module libraries. To resolve these problems, simply use the terminal inside “/src” and run “find . -name ”module_name“, find the module folder, and run ”make“ inside it. Return to ”/src“ and run ”make“ again to resume compilation. Do not execute ”./make_all“ located in ”/bin“, as it cleans the binaries and removes all the changes you’ve made.
IMPORTANT 1: If there’s a compilation error due to the lack of the lippicv library (modules Road_finding, moving_objects..), locate the libippicv library (find /usr/local/ -name “libippicv*” ) and add the folder where it’s located to the path, or simply copy it to the /usr/local/lib folder.
IMPORTANT 2: Due to the compilation order of Carmen, errors like “carmen/web_cam_interface.h: No such file or directory” may appear during the compilation of some modules. When this happens, enter the directory of the module (e.g., “web_cam”) that had the error, compile it, and try again. This can also happen with libraries during the linking phase. In this case, the error will be something like “cannot find -llane_detector_interface”. The solution is the same as in the previous case, enter the “lane_detector” directory, compile the module, and try again.
IMPORTANT 3: If you get the error “bash: ./configure: Permission denied”. Run the command chmod +x configure.
IMPORTANT 4: If there’s an error during compilation due to the traffic_lights module, navigate to the ~/carmen_lcad/src/traffic_light directory, run make, then go back to the ~/carmen_lcad/src directory, and run make. DO NOT run ./make_all afterward.
Mapa Volta Da Ufes Atualizado
Unzip to the carmen_lcad/data folder
git config credential.helper store
Git will store your credentials in clear text in a local file (.git-credentials) under your project directory (see below for the “home” directory)
sudo mkdir /dados sudo chmod -R 777 /dados
To test if the installation was successful, run Carmen following the steps in the video. First execution of Carmen software.
If installing Carmen on the IARA computer, access Additional steps for installation on the IARA computer.