<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pt-BR">
		<id>http://www.lcad.inf.ufes.br/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vinicius+Brito</id>
		<title>LCAD - Contribuições do(a) usuário(a) [pt-br]</title>
		<link rel="self" type="application/atom+xml" href="http://www.lcad.inf.ufes.br/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vinicius+Brito"/>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php/Especial:Contribui%C3%A7%C3%B5es/Vinicius_Brito"/>
		<updated>2026-04-06T14:19:47Z</updated>
		<subtitle>Contribuições do(a) usuário(a)</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Como_Cadastrar_o_MAC_na_rede_do_LCAD&amp;diff=81418</id>
		<title>Como Cadastrar o MAC na rede do LCAD</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Como_Cadastrar_o_MAC_na_rede_do_LCAD&amp;diff=81418"/>
				<updated>2021-05-18T21:26:52Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Servidores]]&lt;br /&gt;
&lt;br /&gt;
== Passo para cadastrar um MAC ==&lt;br /&gt;
&lt;br /&gt;
[[Image:gerenciar_mac.png|rigth|thumb|300px|Pagina Suporte]]&lt;br /&gt;
# Com a mudança é necessário:&lt;br /&gt;
#Logar na [http://lar.inf.ufes.br Pagina do LAR] da rede com o login do lcad&lt;br /&gt;
#Clicar no menu SERVIÇOS e escolher DHCP&amp;quot;&lt;br /&gt;
#Procure a o campo 908_LCAD&lt;br /&gt;
# Preencher os campos com o seguinte padrão:&lt;br /&gt;
## Hostname: &amp;quot;nome do usuário&amp;quot; - &amp;quot;interface(WIFI ou CABO)&amp;quot;&lt;br /&gt;
## Endereço MAC: &amp;quot;o endereço MAC da interface com :(dois pontos) para separar os valores &amp;quot;&lt;br /&gt;
## Endereço IP: &amp;quot;Por um valor que não estiver cadastrado&amp;quot; &lt;br /&gt;
### já vem um IP disponível de forma automática, caso queira um IP especifico mude ou clique no primeiro icone azul acima do Hostname para ver todos os IPs cadastrados&lt;br /&gt;
#Clicar no botão &amp;quot;Cadastra&amp;quot; para efetuar o cadastro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ATENÇÃO: Os passos abaixo são antigos, porém vou deixar a descrição caso seja mudado novamente no futuro&lt;br /&gt;
#Logar na [http://suporte.inf.ufes.br Pagina do suporte] da rede com o login do lcad&lt;br /&gt;
#Clicar no link &amp;quot;Gerenciar MAC's&amp;quot;&lt;br /&gt;
# Preencher os campos com o seguinte padrão:&lt;br /&gt;
## Hostname: &amp;quot;nome do usuário&amp;quot; - &amp;quot;interface(WIFI ou CABO)&amp;quot;&lt;br /&gt;
## Endereço MAC: &amp;quot;o endereço MAC da interface com :(dois pontos) para separar os valores &amp;quot;&lt;br /&gt;
## Endereço IP: &amp;quot;Por um valor que não estiver cadastrado&amp;quot;&lt;br /&gt;
#Clicar no botão &amp;quot;Cadastra&amp;quot; para efetuar o cadastro&lt;br /&gt;
&lt;br /&gt;
== Passo para excluir um MAC já cadastrado ==&lt;br /&gt;
[[Image:editar_registro.png|500px|thumb|Onde Clicar]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# - logar na pagina do suporte da rede com o login do lcad&lt;br /&gt;
# - Clicar no link &amp;quot;Gerenciar MAC's&amp;quot;&lt;br /&gt;
# - Clicar no icone de &amp;quot;papel e caneta&amp;quot; ao lado do nome da rede(&amp;quot;908_LCAD&amp;quot;)&lt;br /&gt;
# - Para remover, localize o endereço que deseja remover e clique no icone &amp;quot;X&amp;quot;.&lt;br /&gt;
# - Vá no final da página e clique em Salvar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Passo para alterar um MAC já cadastrado ==&lt;br /&gt;
&lt;br /&gt;
# Logar na pagina do suporte da rede com o login do lcad&lt;br /&gt;
# Clicar no link &amp;quot;Gerenciar MAC's&amp;quot;&lt;br /&gt;
# Clicar no icone de &amp;quot;papel e caneta&amp;quot; ao lado do nome da rede(&amp;quot;908_LCAD&amp;quot;)&lt;br /&gt;
# Localize o endereço que deseja alterar e realize a alteração.&lt;br /&gt;
# Vá no final da página e clique em Salvar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Atuais responsáveis pelo cadastro ==&lt;br /&gt;
**Anderson&lt;br /&gt;
**Matheus&lt;br /&gt;
**Vinicius&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=IARA&amp;diff=81402</id>
		<title>IARA</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=IARA&amp;diff=81402"/>
				<updated>2018-03-17T21:13:19Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* IARA's Specifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;'''Intelligent Autonomous Robotic Automobile - IARA'''&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''Latest News!''' ==&lt;br /&gt;
High-Performance Computing Lab (LCAD) at Federal University of Espirito Santo (UFES) developed an autonomous car called IARA: Intelligent Autonomous Robotic Automobile. On May 12th, 2017 it achieved a 74-kilometer autonomous journey from Vitoria to Guarapari, Brazil, travelling through city avenues and country highways, dealing with semaphores, bumps, tolls, bridges and all the traffic matters. Television and press media widely reported the fact.&lt;br /&gt;
&lt;br /&gt;
{| border=0&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | [[imagem:globo_iara.jpg|border|center|546px|TV Globo: Autonomous car traveled 74 km from Vitoria to Guarapari, ES]]&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | [[imagem:iara_guarapari_plus_drone_view.jpg|border|center|394px|YouTube videos of IARA]]&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | TV Globo: Autonomous car traveled 74 km from Vitoria to Guarapari, ES [http://g1.globo.com/jornal-nacional/videos/t/edicoes/v/carro-autonomo-viaja-74-quilometros-de-vitoria-a-guarapari-no-es/6009111/]&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | YouTube videos of IARA [https://www.youtube.com/user/lcadufes]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''About IARA''' ==&lt;br /&gt;
A team of students and researchers of the Laboratório de Computação de Alto Desempenho (High-Performance Computing Laboratory) of Universidade Federal do Espírito Santo (Federal University of Espírito Santo), leaded by Professor Alberto F. De Souza, designed and built one of the first autonomous cars of Brazil. Christened IARA (Intelligent Autonomous Robotic Automobile), this autonomous car was able to run autonomously for tens of kilometers at speeds of up to of 30 Km/h in urban roads surrounding the main campus of UFES (See video at [http://youtu.be/LBM--2dAvyI?list=UUsQuY9t5ss3jwHBiRaEEFFg]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''IARA's Specifications''' ==&lt;br /&gt;
IARA is an experimental robotic platform, based on a Ford Escape Hybrid (Fig. 5(a)). It has several high-end sensors, including: two Point Grey Bumblebee XB3 stereo cameras and two Point Grey Bumblebee 2 stereo cameras, one Light Detection and Ranging (LIDAR) Velodyne HDL 32-E, and one GPS-aided Attitude and Heading Reference System (AHRS/GPS) Xsens MTiG (Fig. 5(b)). To process the data coming from the sensors, the platform can hold up to four Dell Precision R5500 (2 Intel Xeon 2.13 GHZ, 12 GB RAM, 2 HDs SSD of 120GB on RAID0 and GPU cards Tesla C2050) (two installed in the configuration shown in Fig. 5(b)). We implemented many software modules for IARA that currently allows for its autonomous operation, such as modules for mapping, localization, behavior selection, path following, control, and motion planning. We also implemented a software module for autonomous vehicle simulation to help in the development and testing of all the other IARA’s modules. See video of IARA autonomous operation at [https://www.youtube.com/watch?v=zE7np6tgCHc&amp;amp;list=UUsQuY9t5ss3jwHBiRaEEFFg] and videos about other IARA’s software modules at [http://www.youtube.com/user/lcadufes].&lt;br /&gt;
&lt;br /&gt;
{| border=0&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | [[imagem:iara.jpg|border|center|500px|Intelligent Autonomous Robotic Automobile - IARA]]&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | [[imagem:autonomous_vehicle_iara.jpg|border|center|440px|Inside IARA's cockpit]]&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | Intelligent Autonomous Robotic Automobile - IARA&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | Inside IARA's cockpit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== '''Our team''' ==&lt;br /&gt;
Our team is lead by [http://www.lcad.inf.ufes.br/team/index.php/Dr._Alberto_Ferreira_De_Souza Dr. Alberto Ferreira De Souza] from the High Performance Computing Laboratory [http://www.lcad.inf.ufes.br (LCAD)] of the Federal University of Espirito Santo [http://www.ufes.br (UFES)]. The LCAD/UFES lab is located in the [http://en.wikipedia.org/wiki/Vit%C3%B3ria,_Esp%C3%ADrito_Santo city of Vitoria], Brazil, and congregates several professors and students working on artificial vision, face recognition, autonomous vehicles and humanoid robot researches. To learn more about our team [[Equipe|see '''LCAD/UFES''' member list]])&lt;br /&gt;
&lt;br /&gt;
{| border=0&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | [[imagem:lcad_team.jpg|border|center|950px|LCAD/UFES team and IARA autonomous vehicle]]&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | LCAD/UFES team and IARA autonomous vehicle&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Instala%C3%A7%C3%A3o_Carmen_para_Ubuntu_14.04&amp;diff=81401</id>
		<title>Instalação Carmen para Ubuntu 14.04</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Instala%C3%A7%C3%A3o_Carmen_para_Ubuntu_14.04&amp;diff=81401"/>
				<updated>2018-03-05T20:42:00Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
&lt;br /&gt;
Essa instalação é completa, mas é necessário testar todos os módulos (Se for usar CUDA, a versão atual utilizada é a 7.5). &lt;br /&gt;
&lt;br /&gt;
= Preparação para a instalação do Carmen = &lt;br /&gt;
&lt;br /&gt;
Atualizar o apt:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
&lt;br /&gt;
Instalar o git, gimp, meld e vim:&lt;br /&gt;
 sudo apt-get install gimp meld vim git&lt;br /&gt;
&lt;br /&gt;
Baixar o Carmen pelo git (faça o download enquanto segue os próximos passos):&lt;br /&gt;
 git clone https://github.com/LCAD-UFES/carmen_lcad.git&lt;br /&gt;
&lt;br /&gt;
Baixe a MAE via git:&lt;br /&gt;
 git clone https://github.com/LCAD-UFES/MAE.git&lt;br /&gt;
&lt;br /&gt;
Instalar os pacotes para o carmem no 14.04&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install swig \&lt;br /&gt;
 libgtk2.0-dev \&lt;br /&gt;
 qt-sdk \&lt;br /&gt;
 libimlib2 libimlib2-dev \&lt;br /&gt;
 imagemagick libmagick++-dev \&lt;br /&gt;
 libwrap0 libwrap0-dev tcpd \&lt;br /&gt;
 libncurses5 libncurses5-dev \&lt;br /&gt;
 libgsl0-dev libgsl0ldbl \&lt;br /&gt;
 libdc1394-22 libdc1394-22-dev libdc1394-utils \&lt;br /&gt;
 cmake \&lt;br /&gt;
 libgtkglext1 libgtkglext1-dev \&lt;br /&gt;
 libgtkglextmm-x11-1.2-0 libgtkglextmm-x11-1.2-dev \&lt;br /&gt;
 libglade2-0 libglade2-dev \&lt;br /&gt;
 freeglut3 freeglut3-dev \&lt;br /&gt;
 libcurl3 libcurl3-nss libcurl4-nss-dev \&lt;br /&gt;
 libglew1.5 libglew1.5-dev libglewmx1.5 libglewmx1.5-dev libglew-dev \&lt;br /&gt;
 libkml0 libkml-dev \&lt;br /&gt;
 liburiparser1 liburiparser-dev \&lt;br /&gt;
 libusb-1.0-0 libusb-1.0-0-dev libusb-dev \&lt;br /&gt;
 libxi-dev libxi6 \&lt;br /&gt;
 libxmu-dev libxmu6 \&lt;br /&gt;
 build-essential libforms-dev \&lt;br /&gt;
 byacc \&lt;br /&gt;
 flex \&lt;br /&gt;
 doxygen \&lt;br /&gt;
 libespeak-dev libfftw3-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
caso de erro em libcheese-gtk23 instale os pacotes abaixo antes dos anteriores (Solucão nao confirmada):&lt;br /&gt;
 sudo apt-get install libglew-dev libcheese7 libcheese-gtk23 libclutter-gst-2.0-0 libcogl15 libclutter-gtk-1.0-0 libclutter-1.0-0&lt;br /&gt;
&lt;br /&gt;
Instalar o Java:&lt;br /&gt;
&lt;br /&gt;
 sudo add-apt-repository ppa:webupd8team/java&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install oracle-java8-installer&lt;br /&gt;
 update-alternatives --display java&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/environment:&lt;br /&gt;
 sudo gedit /etc/environment&lt;br /&gt;
&lt;br /&gt;
Adicione no final do arquivo:&lt;br /&gt;
 JAVA_HOME=/usr/lib/jvm/java-8-oracle&lt;br /&gt;
&lt;br /&gt;
Instalar o eclipse:&lt;br /&gt;
 &lt;br /&gt;
Baixe o eclipse de:&lt;br /&gt;
 https://www.eclipse.org/downloads/eclipse-packages/&lt;br /&gt;
&lt;br /&gt;
Descompacte o ecplise&lt;br /&gt;
 cd Downloads/&lt;br /&gt;
 sudo mv eclipse-...tar.gz  /opt&lt;br /&gt;
 cd /opt/&lt;br /&gt;
 sudo tar -xvf eclipse-...tar.gz &lt;br /&gt;
&lt;br /&gt;
Crie um arquivo desktop e edite ele em /usr/share/applications:&lt;br /&gt;
 sudo gedit /usr/share/applications/eclipse.desktop&lt;br /&gt;
&lt;br /&gt;
Coloque o seguinte conteudo:&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=Eclipse&lt;br /&gt;
 Type=Application&lt;br /&gt;
 Exec=/opt/eclipse/eclipse&lt;br /&gt;
 Terminal=false&lt;br /&gt;
 Icon=/opt/eclipse/icon.xpm&lt;br /&gt;
 Comment=Integrated Development Environment&lt;br /&gt;
 NoDisplay=false&lt;br /&gt;
 Categories=Development;IDE&lt;br /&gt;
 Name[en]=Eclipse&lt;br /&gt;
&lt;br /&gt;
Instale as deps da PCL:&lt;br /&gt;
 sudo apt-get install libeigen3-dev libboost-all-dev libflann-dev libvtk5-dev cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
Install OpenCV 3.1:&lt;br /&gt;
&lt;br /&gt;
Start installing the dependencies:&lt;br /&gt;
 sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev \&lt;br /&gt;
 python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev&lt;br /&gt;
&lt;br /&gt;
Download and select the correct version:&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /opt/opencv3.1.0/&lt;br /&gt;
 cd /opt/opencv3.1.0/&lt;br /&gt;
 sudo git clone https://github.com/Itseez/opencv.git&lt;br /&gt;
 sudo git clone https://github.com/Itseez/opencv_contrib.git&lt;br /&gt;
 cd opencv&lt;br /&gt;
 sudo git checkout 3.1.0&lt;br /&gt;
 cd /opt/opencv3.1.0/opencv_contrib&lt;br /&gt;
 sudo git checkout 3.1.0&lt;br /&gt;
 cd /opt/opencv3.1.0/opencv&lt;br /&gt;
&lt;br /&gt;
Build it:&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 sudo cmake -D -DWITH_IPP=ON -D WITH_CUDA=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \&lt;br /&gt;
 -D OPENCV_EXTRA_MODULES_PATH=/opt/opencv3.1.0/opencv_contrib/modules /opt/opencv3.1.0/opencv/ ..&lt;br /&gt;
 sudo make -j8&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
It is common to have problems with -lippicv using this version of OpenCV. To fix it:&lt;br /&gt;
 Edit `/usr/local/lib/pkgconfig/opencv.pc`&lt;br /&gt;
 Add `libdir3rd=${exec_prefix}/share/OpenCV/3rdparty/lib` after libdir&lt;br /&gt;
 Add `-L${libdir3rd}` at Libs  &lt;br /&gt;
&lt;br /&gt;
Baixar os arquivos:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /usr/local/&lt;br /&gt;
 wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/bullet/bullet-2.78-r2387.tgz&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/fann/fann/2.2.0/FANN-2.2.0-Source.tar.gz&lt;br /&gt;
 wget http://www.kvaser.com/software/7330130980754/V5_3_0/linuxcan.tar.gz&lt;br /&gt;
 tar -xvf bullet-2.78-r2387.tgz&lt;br /&gt;
 tar -xvf linuxcan.tar.gz&lt;br /&gt;
 tar -xvf FANN-2.2.0-Source.tar.gz&lt;br /&gt;
 mv bullet-2.78 bullet&lt;br /&gt;
 cd bullet&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 cd linuxcan&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 cd FANN-2.2.0-Source&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/ld.so.conf.d/opencv.conf&lt;br /&gt;
 gedit /etc/ld.so.conf.d/opencv.conf&lt;br /&gt;
&lt;br /&gt;
Adicione ao final dele:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
Execute: &lt;br /&gt;
 ldconfig&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/bash.bashrc:&lt;br /&gt;
 gedit /etc/bash.bashrc&lt;br /&gt;
&lt;br /&gt;
Adicione no final do arquivo:&lt;br /&gt;
 PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig&lt;br /&gt;
 export PKG_CONFIG_PATH&lt;br /&gt;
&lt;br /&gt;
sair do rooot&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Coloque no .bashrc:&lt;br /&gt;
 #CARMEN&lt;br /&gt;
 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig&lt;br /&gt;
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu/:/usr/lib/libkml&lt;br /&gt;
 export CARMEN_HOME=~/carmen_lcad&lt;br /&gt;
 #OpenJaus&lt;br /&gt;
 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&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 #MAE&lt;br /&gt;
 export MAEHOME=~/MAE&lt;br /&gt;
 export PATH=$PATH:$MAEHOME/bin&lt;br /&gt;
&lt;br /&gt;
Instale os pacotes imlib e flycapture:&lt;br /&gt;
 cd $CARMEN_HOME/ubuntu_packages/&lt;br /&gt;
 sudo dpkg -i imlib_1.9.15-20_amd64.deb &lt;br /&gt;
 sudo dpkg -i imlib-devel_1.9.15-20_amd64.deb&lt;br /&gt;
 tar -xvf flycapture2-2.5.3.4-amd64-pkg.tgz&lt;br /&gt;
 cd flycapture2-2.5.3.4-amd64/&lt;br /&gt;
 sudo apt-get install libglademm-2.4-1c2a&lt;br /&gt;
 sudo apt-get install libglademm-2.4-dev&lt;br /&gt;
 sudo apt-get install libgtkmm-2.4-dev&lt;br /&gt;
 sudo sh install_flycapture.sh&lt;br /&gt;
&lt;br /&gt;
Faça os links:&lt;br /&gt;
 sudo ln -s /usr/lib64/libgdk_imlib.so.1.9.15 /usr/lib64/libgdk_imlib.a&lt;br /&gt;
 sudo ln -s /usr/src/linux-headers-3.8.0-30/ /usr/src/linux&lt;br /&gt;
&lt;br /&gt;
Instale a PCL:&lt;br /&gt;
 sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install libpcl-all&lt;br /&gt;
&lt;br /&gt;
Instale a câmera Kinect:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.19/libusb-1.0.19.tar.bz2&lt;br /&gt;
 tar xvf libusb-1.0.19.tar.bz2&lt;br /&gt;
 cd libusb-1.0.19&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
se der erro na instalacao acima tente instalar a udev-dev antes:&lt;br /&gt;
 sudo apt-get install libudev-dev&lt;br /&gt;
&lt;br /&gt;
 mkdir /usr/local/tplib&lt;br /&gt;
 cd /usr/local/tplib&lt;br /&gt;
 git clone git://github.com/OpenKinect/libfreenect.git&lt;br /&gt;
 cd libfreenect&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 cp src/libfreenect.pc /usr/local/tplib/&lt;br /&gt;
 make&lt;br /&gt;
 cp ../src/libfreenect.pc.in src/libfreenect.pc &lt;br /&gt;
 cp ../fakenect/fakenect.sh.in fakenect/fakenect.sh&lt;br /&gt;
 make install&lt;br /&gt;
 ldconfig /usr/local/lib64/&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Execute:&lt;br /&gt;
 glview&lt;br /&gt;
&lt;br /&gt;
Caso dê erro, tente:&lt;br /&gt;
 freenect-glview&lt;br /&gt;
&lt;br /&gt;
Se der erro execute:&lt;br /&gt;
 sudo ldconfig /usr/local/lib64/&lt;br /&gt;
&lt;br /&gt;
Instalação da biblioteca G2O 14.04:&lt;br /&gt;
 sudo apt-get install cmake libsuitesparse-dev libqt4-dev qt4-qmake&lt;br /&gt;
 cd /usr/local/&lt;br /&gt;
 sudo svn co https://svn.openslam.org/data/svn/g2o&lt;br /&gt;
 cd /usr/local/g2o/trunk/build/&lt;br /&gt;
 sudo cmake ../ -DBUILD_CSPARSE=ON -DG2O_BUILD_DEPRECATED_TYPES=ON -DG2O_BUILD_LINKED_APPS=ON&lt;br /&gt;
 sudo make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
'''ATENCAO: Caso esteja usando o UBUNTU 14.04.3 é necessario instalar a zlib:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Para verificar sua versão, veja no campo Description, na saída do comando abaixo:&lt;br /&gt;
  lsb_release -a&lt;br /&gt;
Caso seja o 14.04.3 faca: &lt;br /&gt;
 cd $CARMEN_HOME/ubuntu_packages&lt;br /&gt;
 sudo dpkg -i zlib1g_1.2.3.4.dfsg-3ubuntu4_amd64.deb &lt;br /&gt;
 sudo dpkg -i zlib1g-dev_1.2.3.4.dfsg-3ubuntu4_amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Faça o link da boost:&lt;br /&gt;
 sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_thread.so /usr/lib/x86_64-linux-gnu/libboost_thread-mt.so&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Instale as bibliotecas da MAE:&lt;br /&gt;
 sudo apt-get install make g++ freeglut3-dev byacc libforms-dev libtiff4-dev libXi-dev libXmu-dev doxygen tcsh flex libdc1394-22-dev&lt;br /&gt;
&lt;br /&gt;
# Compilar a MAE:&lt;br /&gt;
## Pré-requisito: as variáveis de ambiente MAEHOME e PATH devem estar ajustadas;&lt;br /&gt;
## Entrar no diretório da MAE: &amp;quot;cd $MAEHOME&amp;quot;;&lt;br /&gt;
## Compilar a MAE: &amp;quot;make&amp;quot;.&lt;br /&gt;
## Verificar se a biblioteca da MAE libnet_conn.a foi gerado em MAEHOME/lib;&lt;br /&gt;
## Verificar se o compilador da MAE netcomp foi gerado em MAEHOME/bin.&lt;br /&gt;
&lt;br /&gt;
Mais informações sobre a MAE: http://www.lcad.inf.ufes.br/wiki/index.php/M%C3%A1quina_Associadora_de_Eventos_-_MAE#Compilando_a_MAE&lt;br /&gt;
&lt;br /&gt;
Instalação da dlib:&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 sudo su&lt;br /&gt;
 git clone https://github.com/davisking/dlib.git&lt;br /&gt;
 cd dlib/&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build/&lt;br /&gt;
 cmake .. {Vai reclamar de coisas CUDA. Mas pode compilar sem suporte a CUDA}&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Instalação da libwnn:&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 git clone http://github.com/filipemtz/libwnn&lt;br /&gt;
 cd libwnn&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 make -j 4&lt;br /&gt;
 sudo make install&lt;br /&gt;
 &lt;br /&gt;
 Atenção: em caso de problema com o opencv, faça:&lt;br /&gt;
 cd build&lt;br /&gt;
 rm -rf *&lt;br /&gt;
 cmake -DOpenCV_DIR=/usr/local/opencv-2.4.9/build/ ..&lt;br /&gt;
 make -j 4&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Se for usar a ZED stereo Câmera:&lt;br /&gt;
Faça o download do SDK ZED 1.0&lt;br /&gt;
  https://www.stereolabs.com/developers/release/1.0.0/&lt;br /&gt;
&lt;br /&gt;
Instale a  ZED (Lembre-se essa versão usa CUDA 7.5! e Opencv3.1)&lt;br /&gt;
  sudo chmod +x ZED....&lt;br /&gt;
  ./ZED....&lt;br /&gt;
Se houver erro com libodbc.so.1: cannot open shared object file: No such file or directory&lt;br /&gt;
  sudo apt-get install libodbc1 &lt;br /&gt;
----	&lt;br /&gt;
&lt;br /&gt;
Feche todos os terminais e faça:&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 ./configure --nojava --nocuda --nozlib&lt;br /&gt;
   Should the C++ tools be installed for CARMEN: [Y/n] Y&lt;br /&gt;
   Should Python Bindings be installed: [y/N] N&lt;br /&gt;
   Searching for Python2.4... Should the old laser server be used instead of the new one: [y/N] N&lt;br /&gt;
   Install path [/usr/local/]: &lt;br /&gt;
   Robot numbers [*]: 1,2&lt;br /&gt;
&lt;br /&gt;
Antes de compilar o CARMEN, precisamos que o módulo tracker seja compilado separadamente para que o navigator_spline funcione:&lt;br /&gt;
 cd $CARMEN_HOME/src/tracker&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Vai dar um erro de compilação, mas está tudo ok.&lt;br /&gt;
&lt;br /&gt;
Para compilar o carmen rode:&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Caso dê erro por causa da libusb.h vá no arquivo:&lt;br /&gt;
  sudo vim /usr/local/include/libfreenect.hpp&lt;br /&gt;
E altere #include &amp;lt;libusb.h&amp;gt; para&lt;br /&gt;
  #include &amp;lt;libusb-1.0/libusb.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Caso dê erro na compilacão no global por causa do z_stream tente&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 make clean&lt;br /&gt;
 ./configure --nojava --nocuda&lt;br /&gt;
   Should the C++ tools be installed for CARMEN: [Y/n] Y&lt;br /&gt;
   Should Python Bindings be installed: [y/N] N&lt;br /&gt;
   Searching for Python2.4... Should the old laser server be used instead of the new one: [y/N] N&lt;br /&gt;
   Install path [/usr/local/]: &lt;br /&gt;
   Robot numbers [*]: 1,2&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
= Ajustes para a IARA = &lt;br /&gt;
'''(seções abaixo apenas para serem feitas na IARA)'''&lt;br /&gt;
&lt;br /&gt;
Para configurar o OpenJAUS siga o tutorial em : &lt;br /&gt;
 &lt;br /&gt;
 $CARMEN_HOME/sharedlib/OpenJAUS/README_ALBERTO.txt&lt;br /&gt;
&lt;br /&gt;
Para que o GPS e o XSENS sejam configurados automaticamente ao serem conectados às portas USB, copie o seguinte arquivo do diretório data do Carmen para sua máquina:&lt;br /&gt;
&lt;br /&gt;
 cd $CARMEN_HOME/data&lt;br /&gt;
 sudo cp 99-usb-serial.rules /etc/udev/rules.d/&lt;br /&gt;
&lt;br /&gt;
== Ajustes na rede para o GPS Trimble ==&lt;br /&gt;
&lt;br /&gt;
Para conectar o novo GPS Trimble é necessário uma conexão com a Internet dentro da IARA. Optamos por usar um iPhone com conexão 3G.&lt;br /&gt;
&lt;br /&gt;
Para o iPhone funcionar no Ubuntu 12.04 é necessário um tanto de coisas... Perdemos o histórico mas dá para achar na Internet (Google iPhone 4S ubuntu 12.04 mount). Precisa instalar uns pacotes (apt-get install ...). Se você tiver sucesso, vai ser possível usar o iPhone como Personal Hotspot, ou seja, usar a Internet de dentro da IARA.&lt;br /&gt;
&lt;br /&gt;
Feito isso, é necessário criar um Gateway da máquina que tem acesso a Internet (car01) para uma subrede da IARA (192.168.0.0 - a subrede de Carro Network). Para isso (ver página de referência em https://help.ubuntu.com/community/Internet/ConnectionSharing (Gateway set up)), considerando o iPhone em eth2 e a subrede da IARA em eth1:&lt;br /&gt;
  sudo iptables -A FORWARD -o eth2 -i eth1 -s 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT&lt;br /&gt;
  sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT&lt;br /&gt;
  sudo iptables -t nat -F POSTROUTING&lt;br /&gt;
  sudo iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE&lt;br /&gt;
  sudo iptables-save | sudo tee /etc/iptables.sav&lt;br /&gt;
&lt;br /&gt;
Os comandos acima criam um NAT do iPhone para a subrede da IARA. Em seguida, é necessário editar o /etc/rc.local e adicionar a linha abaixo antes de &amp;quot;exit 0&amp;quot;:&lt;br /&gt;
  iptables-restore &amp;lt; /etc/iptables.sav&lt;br /&gt;
&lt;br /&gt;
É necessário ainda:&lt;br /&gt;
  sudo sh -c &amp;quot;echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Para tornar isso permanente, inclua as linhas abaixo em /etc/sysctl.conf:&lt;br /&gt;
  net.ipv4.ip_forward=1&lt;br /&gt;
  net.ipv4.conf.default.forwarding=1&lt;br /&gt;
  net.ipv4.conf.all.forwarding=1&lt;br /&gt;
&lt;br /&gt;
No Network Manager, tem que setar &amp;quot;Use this connection only for resources on its network&amp;quot; (Network Manager-&amp;gt;IPv4 Settings-&amp;gt;Routes) em todas as redes cabeadas exceto a do iPhone.&lt;br /&gt;
&lt;br /&gt;
Pronto!&lt;br /&gt;
&lt;br /&gt;
== Ajustes para o Raspberry do volante ==&lt;br /&gt;
&lt;br /&gt;
'''Prevenir que entre em modo de espera, proteção de tela ou desabilite o monitor'''&lt;br /&gt;
 &lt;br /&gt;
Fonte: https://raspberrypi.stackexchange.com/questions/752/how-do-i-prevent-the-screen-from-going-blank&lt;br /&gt;
&lt;br /&gt;
Testado no Raspbian jessey&lt;br /&gt;
&lt;br /&gt;
Only if the files don't exist install (It was not necessary):&lt;br /&gt;
 &lt;br /&gt;
   apt-get install x11-xserver-utils&lt;br /&gt;
&lt;br /&gt;
Edit the files:&lt;br /&gt;
&lt;br /&gt;
 /etc/xdg/lxsession/LXDE/autostart&lt;br /&gt;
 /etc/xdg/lxsession/LXDE-pi/autostart&lt;br /&gt;
 ~/.config/lxprofile/LXDE-pi/autostart&lt;br /&gt;
&lt;br /&gt;
Append these lines:&lt;br /&gt;
&lt;br /&gt;
  @xset s noblank&lt;br /&gt;
  @xset s off&lt;br /&gt;
  @xset -dpms&lt;br /&gt;
&lt;br /&gt;
Possibly also comment out the line that says @xscreensaver -no-splash, so the complete file should look something like this:&lt;br /&gt;
&lt;br /&gt;
  @lxpanel --profile LXDE&lt;br /&gt;
  @pcmanfm --desktop --profile LXDE&lt;br /&gt;
  # @xscreensaver -no-splash&lt;br /&gt;
&lt;br /&gt;
  @xset s noblank&lt;br /&gt;
  @xset s off&lt;br /&gt;
  @xset -dpms&lt;br /&gt;
&lt;br /&gt;
Maybe also exist the line @point-rpi, DONT DELETE and DONT ADD in the others files!&lt;br /&gt;
&lt;br /&gt;
Also edit /etc/kbd/config and make sure these values are set as follows (however I believe this is only for when the lightweight desktop (LXDE) is not running (i.e. the pi is still in text / terminal mode):&lt;br /&gt;
&lt;br /&gt;
  BLANK_TIME=0&lt;br /&gt;
  BLANK_DPMS=off&lt;br /&gt;
  POWERDOWN_TIME=0&lt;br /&gt;
&lt;br /&gt;
I believe that the /etc/xdg/lxsession/LXDE/autostart may be the sort of system-wide version of ~/.xinitrc but someone else probably knows the nuances better.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Instala%C3%A7%C3%A3o_Carmen_para_Ubuntu_14.04&amp;diff=81395</id>
		<title>Instalação Carmen para Ubuntu 14.04</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Instala%C3%A7%C3%A3o_Carmen_para_Ubuntu_14.04&amp;diff=81395"/>
				<updated>2017-12-08T15:44:42Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Preparação para a instalação do Carmen */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
&lt;br /&gt;
Essa instalação é completa, mas é necessário testar todos os módulos. &lt;br /&gt;
&lt;br /&gt;
= Preparação para a instalação do Carmen = &lt;br /&gt;
&lt;br /&gt;
Atualizar o apt:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
&lt;br /&gt;
Instalar o git, gimp, meld e vim:&lt;br /&gt;
 sudo apt-get install gimp meld vim git&lt;br /&gt;
&lt;br /&gt;
Baixar o Carmen pelo git (faça o download enquanto segue os próximos passos):&lt;br /&gt;
 git clone https://github.com/LCAD-UFES/carmen_lcad.git&lt;br /&gt;
&lt;br /&gt;
Baixe a MAE via git:&lt;br /&gt;
 git clone https://github.com/LCAD-UFES/MAE.git&lt;br /&gt;
&lt;br /&gt;
Instalar os pacotes para o carmem no 14.04&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install swig \&lt;br /&gt;
 libgtk2.0-dev \&lt;br /&gt;
 qt-sdk \&lt;br /&gt;
 libimlib2 libimlib2-dev \&lt;br /&gt;
 imagemagick libmagick++-dev \&lt;br /&gt;
 libwrap0 libwrap0-dev tcpd \&lt;br /&gt;
 libncurses5 libncurses5-dev \&lt;br /&gt;
 libgsl0-dev libgsl0ldbl \&lt;br /&gt;
 libdc1394-22 libdc1394-22-dev libdc1394-utils \&lt;br /&gt;
 cmake \&lt;br /&gt;
 libgtkglext1 libgtkglext1-dev \&lt;br /&gt;
 libgtkglextmm-x11-1.2-0 libgtkglextmm-x11-1.2-dev \&lt;br /&gt;
 libglade2-0 libglade2-dev \&lt;br /&gt;
 freeglut3 freeglut3-dev \&lt;br /&gt;
 libcurl3 libcurl3-nss libcurl4-nss-dev \&lt;br /&gt;
 libglew1.5 libglew1.5-dev libglewmx1.5 libglewmx1.5-dev libglew-dev \&lt;br /&gt;
 libkml0 libkml-dev \&lt;br /&gt;
 liburiparser1 liburiparser-dev \&lt;br /&gt;
 libusb-1.0-0 libusb-1.0-0-dev libusb-dev \&lt;br /&gt;
 libxi-dev libxi6 \&lt;br /&gt;
 libxmu-dev libxmu6 \&lt;br /&gt;
 build-essential libforms-dev \&lt;br /&gt;
 byacc \&lt;br /&gt;
 flex \&lt;br /&gt;
 doxygen \&lt;br /&gt;
 libespeak-dev libfftw3-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
caso de erro em libcheese-gtk23 instale os pacotes abaixo antes dos anteriores (Solucão nao confirmada):&lt;br /&gt;
 sudo apt-get install libglew-dev libcheese7 libcheese-gtk23 libclutter-gst-2.0-0 libcogl15 libclutter-gtk-1.0-0 libclutter-1.0-0&lt;br /&gt;
&lt;br /&gt;
Instalar o Java:&lt;br /&gt;
&lt;br /&gt;
 sudo add-apt-repository ppa:webupd8team/java&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install oracle-jdk8-installer&lt;br /&gt;
 update-alternatives --display java&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/environment:&lt;br /&gt;
 sudo gedit /etc/environment&lt;br /&gt;
&lt;br /&gt;
Adicione no final do arquivo:&lt;br /&gt;
 JAVA_HOME=/usr/lib/jvm/java-8-oracle&lt;br /&gt;
&lt;br /&gt;
Instalar o eclipse:&lt;br /&gt;
 &lt;br /&gt;
Baixe o eclipse de:&lt;br /&gt;
 https://www.eclipse.org/downloads/eclipse-packages/&lt;br /&gt;
&lt;br /&gt;
Descompacte o ecplise&lt;br /&gt;
 cd Downloads/&lt;br /&gt;
 sudo mv eclipse-...tar.gz  /opt&lt;br /&gt;
 cd /opt/&lt;br /&gt;
 sudo tar -xvf eclipse-...tar.gz &lt;br /&gt;
&lt;br /&gt;
Crie um arquivo desktop e edite ele em /usr/share/applications:&lt;br /&gt;
 sudo gedit /usr/share/applications/eclipse.desktop&lt;br /&gt;
&lt;br /&gt;
Coloque o seguinte conteudo:&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=Eclipse&lt;br /&gt;
 Type=Application&lt;br /&gt;
 Exec=/opt/eclipse/eclipse&lt;br /&gt;
 Terminal=false&lt;br /&gt;
 Icon=/opt/eclipse/icon.xpm&lt;br /&gt;
 Comment=Integrated Development Environment&lt;br /&gt;
 NoDisplay=false&lt;br /&gt;
 Categories=Development;IDE&lt;br /&gt;
 Name[en]=Eclipse&lt;br /&gt;
&lt;br /&gt;
Instale as deps da PCL:&lt;br /&gt;
 sudo apt-get install libeigen3-dev libboost-all-dev libflann-dev libvtk5-dev cmake-gui&lt;br /&gt;
&lt;br /&gt;
Install OpenCV 3.1:&lt;br /&gt;
&lt;br /&gt;
Start installing the dependencies:&lt;br /&gt;
 sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev \&lt;br /&gt;
 python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev&lt;br /&gt;
&lt;br /&gt;
Download and select the correct version:&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /opt/opencv3.1.0/&lt;br /&gt;
 cd /opt/opencv3.1.0/&lt;br /&gt;
 sudo git clone https://github.com/Itseez/opencv.git&lt;br /&gt;
 sudo git clone https://github.com/Itseez/opencv_contrib.git&lt;br /&gt;
 cd opencv&lt;br /&gt;
 sudo git checkout 3.1.0&lt;br /&gt;
 cd /opt/opencv3.1.0/opencv_contrib&lt;br /&gt;
 sudo git checkout 3.1.0&lt;br /&gt;
 cd /opt/opencv3.1.0/opencv&lt;br /&gt;
&lt;br /&gt;
Build it:&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 sudo cmake -D -DWITH_IPP=ON -D WITH_CUDA=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \&lt;br /&gt;
 -D OPENCV_EXTRA_MODULES_PATH=/opt/opencv3.1.0/opencv_contrib/modules /opt/opencv3.1.0/opencv/ ..&lt;br /&gt;
 sudo make -j8&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
It is common to have problems with -lippicv using this version of OpenCV. To fix it:&lt;br /&gt;
 Edit `/usr/local/lib/pkgconfig/opencv.pc`&lt;br /&gt;
 Add `libdir3rd=${exec_prefix}/share/OpenCV/3rdparty/lib` after libdir&lt;br /&gt;
 Add `-L${libdir3rd}` at Libs  &lt;br /&gt;
&lt;br /&gt;
Baixar os arquivos:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /usr/local/&lt;br /&gt;
 wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/bullet/bullet-2.78-r2387.tgz&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/fann/fann/2.2.0/FANN-2.2.0-Source.tar.gz&lt;br /&gt;
 wget http://www.kvaser.com/software/7330130980754/V5_3_0/linuxcan.tar.gz&lt;br /&gt;
 tar -xvf bullet-2.78-r2387.tgz&lt;br /&gt;
 tar -xvf linuxcan.tar.gz&lt;br /&gt;
 tar -xvf FANN-2.2.0-Source.tar.gz&lt;br /&gt;
 mv bullet-2.78 bullet&lt;br /&gt;
 cd bullet&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 cd linuxcan&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 cd FANN-2.2.0-Source&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/ld.so.conf.d/opencv.conf&lt;br /&gt;
 gedit /etc/ld.so.conf.d/opencv.conf&lt;br /&gt;
&lt;br /&gt;
Adicione ao final dele:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
Execute: &lt;br /&gt;
 ldconfig&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/bash.bashrc:&lt;br /&gt;
 gedit /etc/bash.bashrc&lt;br /&gt;
&lt;br /&gt;
Adicione no final do arquivo:&lt;br /&gt;
 PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig&lt;br /&gt;
 export PKG_CONFIG_PATH&lt;br /&gt;
&lt;br /&gt;
sair do rooot&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Coloque no .bashrc:&lt;br /&gt;
 #CARMEN&lt;br /&gt;
 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig&lt;br /&gt;
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu/:/usr/lib/libkml&lt;br /&gt;
 export CARMEN_HOME=~/carmen_lcad&lt;br /&gt;
 #OpenJaus&lt;br /&gt;
 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&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 #MAE&lt;br /&gt;
 export MAEHOME=~/MAE&lt;br /&gt;
 export PATH=$PATH:$MAEHOME/bin&lt;br /&gt;
&lt;br /&gt;
Instale os pacotes imlib e flycapture:&lt;br /&gt;
 cd $CARMEN_HOME/ubuntu_packages/&lt;br /&gt;
 sudo dpkg -i imlib_1.9.15-20_amd64.deb &lt;br /&gt;
 sudo dpkg -i imlib-devel_1.9.15-20_amd64.deb&lt;br /&gt;
 tar -xvf flycapture2-2.5.3.4-amd64-pkg.tgz&lt;br /&gt;
 cd flycapture2-2.5.3.4-amd64/&lt;br /&gt;
 sudo apt-get install libglademm-2.4-1c2a&lt;br /&gt;
 sudo apt-get install libglademm-2.4-dev&lt;br /&gt;
 sudo apt-get install libgtkmm-2.4-dev&lt;br /&gt;
 sudo sh install_flycapture.sh&lt;br /&gt;
&lt;br /&gt;
Faça os links:&lt;br /&gt;
 sudo ln -s /usr/lib64/libgdk_imlib.so.1.9.15 /usr/lib64/libgdk_imlib.a&lt;br /&gt;
 sudo ln -s /usr/src/linux-headers-3.8.0-30/ /usr/src/linux&lt;br /&gt;
&lt;br /&gt;
Instale a PCL:&lt;br /&gt;
 sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install libpcl-all&lt;br /&gt;
&lt;br /&gt;
Instale a câmera Kinect:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.19/libusb-1.0.19.tar.bz2&lt;br /&gt;
 tar xvf libusb-1.0.19.tar.bz2&lt;br /&gt;
 cd libusb-1.0.19&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
se der erro na instalacao acima tente instalar a udev-dev antes:&lt;br /&gt;
 sudo apt-get install libudev-dev&lt;br /&gt;
&lt;br /&gt;
 mkdir /usr/local/tplib&lt;br /&gt;
 cd /usr/local/tplib&lt;br /&gt;
 git clone git://github.com/OpenKinect/libfreenect.git&lt;br /&gt;
 cd libfreenect&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 cp src/libfreenect.pc /usr/local/tplib/&lt;br /&gt;
 make&lt;br /&gt;
 cp ../src/libfreenect.pc.in src/libfreenect.pc &lt;br /&gt;
 cp ../fakenect/fakenect.sh.in fakenect/fakenect.sh&lt;br /&gt;
 make install&lt;br /&gt;
 ldconfig /usr/local/lib64/&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Execute:&lt;br /&gt;
 glview&lt;br /&gt;
&lt;br /&gt;
Caso dê erro, tente:&lt;br /&gt;
 freenect-glview&lt;br /&gt;
&lt;br /&gt;
Se der erro execute:&lt;br /&gt;
 sudo ldconfig /usr/local/lib64/&lt;br /&gt;
&lt;br /&gt;
Instalação da biblioteca G2O 14.04:&lt;br /&gt;
 sudo apt-get install cmake libsuitesparse-dev libqt4-dev qt4-qmake&lt;br /&gt;
 cd /usr/local/&lt;br /&gt;
 sudo svn co https://svn.openslam.org/data/svn/g2o&lt;br /&gt;
 cd /usr/local/g2o/trunk/build/&lt;br /&gt;
 sudo cmake ../ -DBUILD_CSPARSE=ON -DG2O_BUILD_DEPRECATED_TYPES=ON -DG2O_BUILD_LINKED_APPS=ON&lt;br /&gt;
 sudo make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
'''ATENCAO: Caso esteja usando o UBUNTU 14.04.3 é necessario instalar a zlib:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Para verificar sua versão, veja no campo Description, na saída do comando abaixo:&lt;br /&gt;
  lsb_release -a&lt;br /&gt;
Caso seja o 14.04.3 faca: &lt;br /&gt;
 cd $CARMEN_HOME/ubuntu_packages&lt;br /&gt;
 sudo dpkg -i zlib1g_1.2.3.4.dfsg-3ubuntu4_amd64.deb &lt;br /&gt;
 sudo dpkg -i zlib1g-dev_1.2.3.4.dfsg-3ubuntu4_amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Faça o link da boost:&lt;br /&gt;
 sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_thread.so /usr/lib/x86_64-linux-gnu/libboost_thread-mt.so&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Instale as bibliotecas da MAE:&lt;br /&gt;
 sudo apt-get install make g++ freeglut3-dev byacc libforms-dev libtiff4-dev libXi-dev libXmu-dev doxygen tcsh flex libdc1394-22-dev&lt;br /&gt;
&lt;br /&gt;
# Compilar a MAE:&lt;br /&gt;
## Pré-requisito: as variáveis de ambiente MAEHOME e PATH devem estar ajustadas;&lt;br /&gt;
## Entrar no diretório da MAE: &amp;quot;cd $MAEHOME&amp;quot;;&lt;br /&gt;
## Compilar a MAE: &amp;quot;make&amp;quot;.&lt;br /&gt;
## Verificar se a biblioteca da MAE libnet_conn.a foi gerado em MAEHOME/lib;&lt;br /&gt;
## Verificar se o compilador da MAE netcomp foi gerado em MAEHOME/bin.&lt;br /&gt;
&lt;br /&gt;
Mais informações sobre a MAE: http://www.lcad.inf.ufes.br/wiki/index.php/M%C3%A1quina_Associadora_de_Eventos_-_MAE#Compilando_a_MAE&lt;br /&gt;
&lt;br /&gt;
Instalação da dlib:&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 sudo su&lt;br /&gt;
 git clone https://github.com/davisking/dlib.git&lt;br /&gt;
 cd dlib/&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build/&lt;br /&gt;
 cmake .. {Vai reclamar de coisas CUDA. Mas pode compilar sem suporte a CUDA}&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Instalação da libwnn:&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 git clone http://github.com/filipemtz/libwnn&lt;br /&gt;
 cd libwnn&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 make -j 4&lt;br /&gt;
 sudo make install&lt;br /&gt;
 &lt;br /&gt;
 Atenção: em caso de problema com o opencv, faça:&lt;br /&gt;
 cd build&lt;br /&gt;
 rm -rf *&lt;br /&gt;
 cmake -DOpenCV_DIR=/usr/local/opencv-2.4.9/build/ ..&lt;br /&gt;
 make -j 4&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
Feche todos os terminais e faça:&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 ./configure --nojava --nocuda --nozlib&lt;br /&gt;
   Should the C++ tools be installed for CARMEN: [Y/n] Y&lt;br /&gt;
   Should Python Bindings be installed: [y/N] N&lt;br /&gt;
   Searching for Python2.4... Should the old laser server be used instead of the new one: [y/N] N&lt;br /&gt;
   Install path [/usr/local/]: &lt;br /&gt;
   Robot numbers [*]: 1,2&lt;br /&gt;
&lt;br /&gt;
Antes de compilar o CARMEN, precisamos que o módulo tracker seja compilado separadamente para que o navigator_spline funcione:&lt;br /&gt;
 cd $CARMEN_HOME/src/tracker&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Vai dar um erro de compilação, mas está tudo ok.&lt;br /&gt;
&lt;br /&gt;
Para compilar o carmen rode:&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Caso dê erro por causa da libusb.h vá no arquivo:&lt;br /&gt;
  sudo vim /usr/local/include/libfreenect.hpp&lt;br /&gt;
E altere #include &amp;lt;libusb.h&amp;gt; para&lt;br /&gt;
  #include &amp;lt;libusb-1.0/libusb.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Caso dê erro na compilacão no global por causa do z_stream tente&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 make clean&lt;br /&gt;
 ./configure --nojava --nocuda&lt;br /&gt;
   Should the C++ tools be installed for CARMEN: [Y/n] Y&lt;br /&gt;
   Should Python Bindings be installed: [y/N] N&lt;br /&gt;
   Searching for Python2.4... Should the old laser server be used instead of the new one: [y/N] N&lt;br /&gt;
   Install path [/usr/local/]: &lt;br /&gt;
   Robot numbers [*]: 1,2&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
= Ajustes para a IARA = &lt;br /&gt;
'''(seções abaixo apenas para serem feitas na IARA)'''&lt;br /&gt;
&lt;br /&gt;
Para configurar o OpenJAUS siga o tutorial em : &lt;br /&gt;
 &lt;br /&gt;
 $CARMEN_HOME/sharedlib/OpenJAUS/README_ALBERTO.txt&lt;br /&gt;
&lt;br /&gt;
Para que o GPS e o XSENS sejam configurados automaticamente ao serem conectados às portas USB, copie o seguinte arquivo do diretório data do Carmen para sua máquina:&lt;br /&gt;
&lt;br /&gt;
 cd $CARMEN_HOME/data&lt;br /&gt;
 sudo cp 99-usb-serial.rules /etc/udev/rules.d/&lt;br /&gt;
&lt;br /&gt;
== Ajustes na rede para o GPS Trimble ==&lt;br /&gt;
&lt;br /&gt;
Para conectar o novo GPS Trimble é necessário uma conexão com a Internet dentro da IARA. Optamos por usar um iPhone com conexão 3G.&lt;br /&gt;
&lt;br /&gt;
Para o iPhone funcionar no Ubuntu 12.04 é necessário um tanto de coisas... Perdemos o histórico mas dá para achar na Internet (Google iPhone 4S ubuntu 12.04 mount). Precisa instalar uns pacotes (apt-get install ...). Se você tiver sucesso, vai ser possível usar o iPhone como Personal Hotspot, ou seja, usar a Internet de dentro da IARA.&lt;br /&gt;
&lt;br /&gt;
Feito isso, é necessário criar um Gateway da máquina que tem acesso a Internet (car01) para uma subrede da IARA (192.168.0.0 - a subrede de Carro Network). Para isso (ver página de referência em https://help.ubuntu.com/community/Internet/ConnectionSharing (Gateway set up)), considerando o iPhone em eth2 e a subrede da IARA em eth1:&lt;br /&gt;
  sudo iptables -A FORWARD -o eth2 -i eth1 -s 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT&lt;br /&gt;
  sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT&lt;br /&gt;
  sudo iptables -t nat -F POSTROUTING&lt;br /&gt;
  sudo iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE&lt;br /&gt;
  sudo iptables-save | sudo tee /etc/iptables.sav&lt;br /&gt;
&lt;br /&gt;
Os comandos acima criam um NAT do iPhone para a subrede da IARA. Em seguida, é necessário editar o /etc/rc.local e adicionar a linha abaixo antes de &amp;quot;exit 0&amp;quot;:&lt;br /&gt;
  iptables-restore &amp;lt; /etc/iptables.sav&lt;br /&gt;
&lt;br /&gt;
É necessário ainda:&lt;br /&gt;
  sudo sh -c &amp;quot;echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Para tornar isso permanente, inclua as linhas abaixo em /etc/sysctl.conf:&lt;br /&gt;
  net.ipv4.ip_forward=1&lt;br /&gt;
  net.ipv4.conf.default.forwarding=1&lt;br /&gt;
  net.ipv4.conf.all.forwarding=1&lt;br /&gt;
&lt;br /&gt;
No Network Manager, tem que setar &amp;quot;Use this connection only for resources on its network&amp;quot; (Network Manager-&amp;gt;IPv4 Settings-&amp;gt;Routes) em todas as redes cabeadas exceto a do iPhone.&lt;br /&gt;
&lt;br /&gt;
Pronto!&lt;br /&gt;
&lt;br /&gt;
== Ajustes para o Raspberry do volante ==&lt;br /&gt;
&lt;br /&gt;
'''Prevenir que entre em modo de espera, proteção de tela ou desabilite o monitor'''&lt;br /&gt;
 &lt;br /&gt;
Fonte: https://raspberrypi.stackexchange.com/questions/752/how-do-i-prevent-the-screen-from-going-blank&lt;br /&gt;
&lt;br /&gt;
Testado no Raspbian jessey&lt;br /&gt;
&lt;br /&gt;
Only if the files don't exist install (It was not necessary):&lt;br /&gt;
 &lt;br /&gt;
   apt-get install x11-xserver-utils&lt;br /&gt;
&lt;br /&gt;
Edit the files:&lt;br /&gt;
&lt;br /&gt;
 /etc/xdg/lxsession/LXDE/autostart&lt;br /&gt;
 /etc/xdg/lxsession/LXDE-pi/autostart&lt;br /&gt;
 ~/.config/lxprofile/LXDE-pi/autostart&lt;br /&gt;
&lt;br /&gt;
Append these lines:&lt;br /&gt;
&lt;br /&gt;
  @xset s noblank&lt;br /&gt;
  @xset s off&lt;br /&gt;
  @xset -dpms&lt;br /&gt;
&lt;br /&gt;
Possibly also comment out the line that says @xscreensaver -no-splash, so the complete file should look something like this:&lt;br /&gt;
&lt;br /&gt;
  @lxpanel --profile LXDE&lt;br /&gt;
  @pcmanfm --desktop --profile LXDE&lt;br /&gt;
  # @xscreensaver -no-splash&lt;br /&gt;
&lt;br /&gt;
  @xset s noblank&lt;br /&gt;
  @xset s off&lt;br /&gt;
  @xset -dpms&lt;br /&gt;
&lt;br /&gt;
Maybe also exist the line @point-rpi, DONT DELETE and DONT ADD in the others files!&lt;br /&gt;
&lt;br /&gt;
Also edit /etc/kbd/config and make sure these values are set as follows (however I believe this is only for when the lightweight desktop (LXDE) is not running (i.e. the pi is still in text / terminal mode):&lt;br /&gt;
&lt;br /&gt;
  BLANK_TIME=0&lt;br /&gt;
  BLANK_DPMS=off&lt;br /&gt;
  POWERDOWN_TIME=0&lt;br /&gt;
&lt;br /&gt;
I believe that the /etc/xdg/lxsession/LXDE/autostart may be the sort of system-wide version of ~/.xinitrc but someone else probably knows the nuances better.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Instala%C3%A7%C3%A3o_Carmen_para_Ubuntu_14.04&amp;diff=81394</id>
		<title>Instalação Carmen para Ubuntu 14.04</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Instala%C3%A7%C3%A3o_Carmen_para_Ubuntu_14.04&amp;diff=81394"/>
				<updated>2017-12-08T15:41:55Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
&lt;br /&gt;
Essa instalação é completa, mas é necessário testar todos os módulos. &lt;br /&gt;
&lt;br /&gt;
= Preparação para a instalação do Carmen = &lt;br /&gt;
&lt;br /&gt;
Atualizar o apt:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
&lt;br /&gt;
Instalar o git, gimp, meld e vim:&lt;br /&gt;
 sudo apt-get install gimp meld vim git&lt;br /&gt;
&lt;br /&gt;
Baixar o Carmen pelo git (faça o download enquanto segue os próximos passos):&lt;br /&gt;
 git clone https://github.com/LCAD-UFES/carmen_lcad.git&lt;br /&gt;
&lt;br /&gt;
Baixe a MAE via git:&lt;br /&gt;
 git clone https://github.com/LCAD-UFES/MAE.git&lt;br /&gt;
&lt;br /&gt;
Instalar os pacotes para o carmem no 14.04&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install swig \&lt;br /&gt;
 libgtk2.0-dev \&lt;br /&gt;
 qt-sdk \&lt;br /&gt;
 libimlib2 libimlib2-dev \&lt;br /&gt;
 imagemagick libmagick++-dev \&lt;br /&gt;
 libwrap0 libwrap0-dev tcpd \&lt;br /&gt;
 libncurses5 libncurses5-dev \&lt;br /&gt;
 libgsl0-dev libgsl0ldbl \&lt;br /&gt;
 libdc1394-22 libdc1394-22-dev libdc1394-utils \&lt;br /&gt;
 cmake \&lt;br /&gt;
 libgtkglext1 libgtkglext1-dev \&lt;br /&gt;
 libgtkglextmm-x11-1.2-0 libgtkglextmm-x11-1.2-dev \&lt;br /&gt;
 libglade2-0 libglade2-dev \&lt;br /&gt;
 freeglut3 freeglut3-dev \&lt;br /&gt;
 libcurl3 libcurl3-nss libcurl4-nss-dev \&lt;br /&gt;
 libglew1.5 libglew1.5-dev libglewmx1.5 libglewmx1.5-dev libglew-dev \&lt;br /&gt;
 libkml0 libkml-dev \&lt;br /&gt;
 liburiparser1 liburiparser-dev \&lt;br /&gt;
 libusb-1.0-0 libusb-1.0-0-dev libusb-dev \&lt;br /&gt;
 libxi-dev libxi6 \&lt;br /&gt;
 libxmu-dev libxmu6 \&lt;br /&gt;
 build-essential libforms-dev \&lt;br /&gt;
 byacc \&lt;br /&gt;
 flex \&lt;br /&gt;
 doxygen \&lt;br /&gt;
 libespeak-dev libfftw3-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
caso de erro em libcheese-gtk23 instale os pacotes abaixo antes dos anteriores (Solucão nao confirmada):&lt;br /&gt;
 sudo apt-get install libglew-dev libcheese7 libcheese-gtk23 libclutter-gst-2.0-0 libcogl15 libclutter-gtk-1.0-0 libclutter-1.0-0&lt;br /&gt;
&lt;br /&gt;
Instalar o Java:&lt;br /&gt;
&lt;br /&gt;
 sudo add-apt-repository ppa:webupd8team/java&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install oracle-jdk8-installer&lt;br /&gt;
 update-alternatives --display java&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/environment:&lt;br /&gt;
 sudo gedit /etc/environment&lt;br /&gt;
&lt;br /&gt;
Adicione no final do arquivo:&lt;br /&gt;
 JAVA_HOME=/usr/lib/jvm/java-8-oracle&lt;br /&gt;
&lt;br /&gt;
Instalar o eclipse:&lt;br /&gt;
 &lt;br /&gt;
Baixe o eclipse de:&lt;br /&gt;
 https://www.eclipse.org/downloads/eclipse-packages/&lt;br /&gt;
&lt;br /&gt;
Descompacte o ecplise&lt;br /&gt;
 cd Downloads/&lt;br /&gt;
 sudo mv eclipse-...tar.gz  /opt&lt;br /&gt;
 cd /opt/&lt;br /&gt;
 sudo tar -xvf eclipse-...tar.gz &lt;br /&gt;
&lt;br /&gt;
Crie um arquivo desktop e edite ele em /usr/share/applications:&lt;br /&gt;
 sudo gedit /usr/share/applications/eclipse.desktop&lt;br /&gt;
&lt;br /&gt;
Coloque o seguinte conteudo:&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=Eclipse&lt;br /&gt;
 Type=Application&lt;br /&gt;
 Exec=/opt/eclipse/eclipse&lt;br /&gt;
 Terminal=false&lt;br /&gt;
 Icon=/opt/eclipse/icon.xpm&lt;br /&gt;
 Comment=Integrated Development Environment&lt;br /&gt;
 NoDisplay=false&lt;br /&gt;
 Categories=Development;IDE&lt;br /&gt;
 Name[en]=Eclipse&lt;br /&gt;
&lt;br /&gt;
Instale as deps da PCL:&lt;br /&gt;
 sudo apt-get install libeigen3-dev libboost-all-dev libflann-dev libvtk5-dev cmake-gui&lt;br /&gt;
&lt;br /&gt;
Install OpenCV 3.1:&lt;br /&gt;
&lt;br /&gt;
Start installing the dependencies:&lt;br /&gt;
 sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev \&lt;br /&gt;
 python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev&lt;br /&gt;
&lt;br /&gt;
Download and select the correct version:&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /opt/opencv3.1.0/&lt;br /&gt;
 cd /opt/opencv3.1.0/&lt;br /&gt;
 sudo git clone https://github.com/Itseez/opencv.git&lt;br /&gt;
 sudo git clone https://github.com/Itseez/opencv_contrib.git&lt;br /&gt;
 cd opencv&lt;br /&gt;
 sudo git checkout 3.1.0&lt;br /&gt;
 cd /opt/opencv3.1.0/opencv_contrib&lt;br /&gt;
 sudo git checkout 3.1.0&lt;br /&gt;
 cd /opt/opencv3.1.0/opencv&lt;br /&gt;
&lt;br /&gt;
Build it:&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 sudo cmake -D -DWITH_IPP=ON -D WITH_CUDA=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \&lt;br /&gt;
 -D OPENCV_EXTRA_MODULES_PATH=/opt/opencv3.1.0/opencv_contrib/modules /opt/opencv3.1.0/opencv/ ..&lt;br /&gt;
 sudo make -j8&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
It is common to have problems with -lippicv using this version of OpenCV. To fix it:&lt;br /&gt;
 Edit `/usr/local/lib/pkgconfig/opencv.pc`&lt;br /&gt;
 Add `libdir3rd=${exec_prefix}/share/OpenCV/3rdparty/lib` after libdir&lt;br /&gt;
 Add `-L${libdir3rd}` at Libs  &lt;br /&gt;
&lt;br /&gt;
Baixar os arquivos:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /usr/local/&lt;br /&gt;
 wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/bullet/bullet-2.78-r2387.tgz&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/fann/fann/2.2.0/FANN-2.2.0-Source.tar.gz&lt;br /&gt;
 wget http://www.kvaser.com/software/7330130980754/V5_3_0/linuxcan.tar.gz&lt;br /&gt;
 tar -xvf bullet-2.78-r2387.tgz&lt;br /&gt;
 tar -xvf linuxcan.tar.gz&lt;br /&gt;
 tar -xvf FANN-2.2.0-Source.tar.gz&lt;br /&gt;
 mv bullet-2.78 bullet&lt;br /&gt;
 cd bullet&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 cd linuxcan&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 cd FANN-2.2.0-Source&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/ld.so.conf.d/opencv.conf&lt;br /&gt;
 gedit /etc/ld.so.conf.d/opencv.conf&lt;br /&gt;
&lt;br /&gt;
Adicione ao final dele:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
Execute: &lt;br /&gt;
 ldconfig&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/bash.bashrc:&lt;br /&gt;
 gedit /etc/bash.bashrc&lt;br /&gt;
&lt;br /&gt;
Adicione no final do arquivo:&lt;br /&gt;
 PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig&lt;br /&gt;
 export PKG_CONFIG_PATH&lt;br /&gt;
&lt;br /&gt;
sair do rooot&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Coloque no .bashrc:&lt;br /&gt;
 #CARMEN&lt;br /&gt;
 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig&lt;br /&gt;
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu/:/usr/lib/libkml&lt;br /&gt;
 export CARMEN_HOME=~/carmen_lcad&lt;br /&gt;
 #OpenJaus&lt;br /&gt;
 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&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 #MAE&lt;br /&gt;
 export MAEHOME=~/MAE&lt;br /&gt;
 export PATH=$PATH:$MAEHOME/bin&lt;br /&gt;
&lt;br /&gt;
Instale os pacotes imlib e flycapture:&lt;br /&gt;
 cd $CARMEN_HOME/ubuntu_packages/&lt;br /&gt;
 sudo dpkg -i imlib_1.9.15-20_amd64.deb &lt;br /&gt;
 sudo dpkg -i imlib-devel_1.9.15-20_amd64.deb&lt;br /&gt;
 tar -xvf flycapture2-2.5.3.4-amd64-pkg.tgz&lt;br /&gt;
 cd flycapture2-2.5.3.4-amd64/&lt;br /&gt;
 sudo apt-get install libglademm-2.4-1c2a&lt;br /&gt;
 sudo apt-get install libglademm-2.4-dev&lt;br /&gt;
 sudo apt-get install libgtkmm-2.4-dev&lt;br /&gt;
 sudo sh install_flycapture.sh&lt;br /&gt;
&lt;br /&gt;
Faça os links:&lt;br /&gt;
 sudo ln -s /usr/lib64/libgdk_imlib.so.1.9.15 /usr/lib64/libgdk_imlib.a&lt;br /&gt;
 sudo ln -s /usr/src/linux-headers-3.8.0-30/ /usr/src/linux&lt;br /&gt;
&lt;br /&gt;
Instale a PCL:&lt;br /&gt;
 sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install libpcl-all&lt;br /&gt;
&lt;br /&gt;
Instale a câmera Kinect:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.19/libusb-1.0.19.tar.bz2&lt;br /&gt;
 tar xvf libusb-1.0.19.tar.bz2&lt;br /&gt;
 cd libusb-1.0.19&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
se der erro na instalacao acima tente instalar a udev-dev antes:&lt;br /&gt;
 sudo apt-get install libudev-dev&lt;br /&gt;
&lt;br /&gt;
 mkdir /usr/local/tplib&lt;br /&gt;
 cd /usr/local/tplib&lt;br /&gt;
 git clone git://github.com/OpenKinect/libfreenect.git&lt;br /&gt;
 cd libfreenect&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 cp src/libfreenect.pc /usr/local/tplib/&lt;br /&gt;
 make&lt;br /&gt;
 cp ../src/libfreenect.pc.in src/libfreenect.pc &lt;br /&gt;
 cp ../fakenect/fakenect.sh.in fakenect/fakenect.sh&lt;br /&gt;
 make install&lt;br /&gt;
 ldconfig /usr/local/lib64/&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Execute:&lt;br /&gt;
 glview&lt;br /&gt;
&lt;br /&gt;
Caso dê erro, tente:&lt;br /&gt;
 freenect-glview&lt;br /&gt;
&lt;br /&gt;
Se der erro execute:&lt;br /&gt;
 sudo ldconfig /usr/local/lib64/&lt;br /&gt;
&lt;br /&gt;
Instalação da biblioteca G2O 14.04:&lt;br /&gt;
 sudo apt-get install cmake libsuitesparse-dev libqt4-dev qt4-qmake&lt;br /&gt;
 cd /usr/local/&lt;br /&gt;
 sudo svn co https://svn.openslam.org/data/svn/g2o&lt;br /&gt;
 cd /usr/local/g2o/trunk/build/&lt;br /&gt;
 sudo cmake ../ -DBUILD_CSPARSE=ON -DG2O_BUILD_DEPRECATED_TYPES=ON -DG2O_BUILD_LINKED_APPS=ON&lt;br /&gt;
 sudo make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
'''ATENCAO: Caso esteja usando o UBUNTU 14.04.3 é necessario instalar a zlib:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Para verificar sua versão, veja no campo Description, na saída do comando abaixo:&lt;br /&gt;
  lsb_release -a&lt;br /&gt;
Caso seja o 14.04.3 faca: &lt;br /&gt;
 cd $CARMEN_HOME/ubuntu_packages&lt;br /&gt;
 sudo dpkg -i zlib1g_1.2.3.4.dfsg-3ubuntu4_amd64.deb &lt;br /&gt;
 sudo dpkg -i zlib1g-dev_1.2.3.4.dfsg-3ubuntu4_amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Faça o link da boost:&lt;br /&gt;
 sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_thread.so /usr/lib/x86_64-linux-gnu/libboost_thread-mt.so&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Instale as bibliotecas da MAE:&lt;br /&gt;
 sudo apt-get install make g++ freeglut3-dev byacc libforms-dev libtiff4-dev libXi-dev libXmu-dev doxygen tcsh flex libdc1394-22-dev&lt;br /&gt;
&lt;br /&gt;
# Compilar a MAE:&lt;br /&gt;
## Pré-requisito: as variáveis de ambiente MAEHOME e PATH devem estar ajustadas;&lt;br /&gt;
## Entrar no diretório da MAE: &amp;quot;cd $MAEHOME&amp;quot;;&lt;br /&gt;
## Compilar a MAE: &amp;quot;make&amp;quot;.&lt;br /&gt;
## Verificar se a biblioteca da MAE libnet_conn.a foi gerado em MAEHOME/lib;&lt;br /&gt;
## Verificar se o compilador da MAE netcomp foi gerado em MAEHOME/bin.&lt;br /&gt;
&lt;br /&gt;
Mais informações sobre a MAE: http://www.lcad.inf.ufes.br/wiki/index.php/M%C3%A1quina_Associadora_de_Eventos_-_MAE#Compilando_a_MAE&lt;br /&gt;
&lt;br /&gt;
Instalação da dlib:&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 sudo su&lt;br /&gt;
 git clone https://github.com/davisking/dlib.git&lt;br /&gt;
 cd dlib/&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build/&lt;br /&gt;
 cmake .. {Vai reclamar de coisas CUDA. Mas pode compilar sem suporte a CUDA}&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Instalação da libwnn:&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 git clone http://github.com/filipemtz/libwnn&lt;br /&gt;
 cd libwnn&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 make -j 4&lt;br /&gt;
 sudo make install&lt;br /&gt;
 &lt;br /&gt;
 Atenção: em caso de problema com o opencv, faça:&lt;br /&gt;
 cd build&lt;br /&gt;
 rm -rf *&lt;br /&gt;
 cmake -DOpenCV_DIR=/usr/local/opencv-2.4.9/build/ ..&lt;br /&gt;
 make -j 4&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
Feche todos os terminais e faça:&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 ./configure --nojava --nocuda --nozlib&lt;br /&gt;
   Should the C++ tools be installed for CARMEN: [Y/n] Y&lt;br /&gt;
   Should Python Bindings be installed: [y/N] N&lt;br /&gt;
   Searching for Python2.4... Should the old laser server be used instead of the new one: [y/N] N&lt;br /&gt;
   Install path [/usr/local/]: &lt;br /&gt;
   Robot numbers [*]: 1,2&lt;br /&gt;
&lt;br /&gt;
Antes de compilar o CARMEN, precisamos que o módulo tracker seja compilado separadamente para que o navigator_spline funcione:&lt;br /&gt;
 cd $CARMEN_HOME/src/tracker&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Vai dar um erro de compilação, mas está tudo ok.&lt;br /&gt;
&lt;br /&gt;
Para compilar o carmen rode:&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Caso dê erro por causa da libusb.h vá no arquivo:&lt;br /&gt;
  sudo vim /usr/local/include/libfreenect.hpp&lt;br /&gt;
E altere #include &amp;lt;libusb.h&amp;gt; para&lt;br /&gt;
  #include &amp;lt;libusb-1.0/libusb.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Caso dê erro na compilacão no global por causa do z_stream tente&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 make clean&lt;br /&gt;
 ./configure --nojava --nocuda&lt;br /&gt;
   Should the C++ tools be installed for CARMEN: [Y/n] Y&lt;br /&gt;
   Should Python Bindings be installed: [y/N] N&lt;br /&gt;
   Searching for Python2.4... Should the old laser server be used instead of the new one: [y/N] N&lt;br /&gt;
   Install path [/usr/local/]: &lt;br /&gt;
   Robot numbers [*]: 1,2&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
= Ajustes para a IARA = &lt;br /&gt;
'''(seções abaixo apenas para serem feitas na IARA)'''&lt;br /&gt;
&lt;br /&gt;
Para configurar o OpenJAUS siga o tutorial em : &lt;br /&gt;
 &lt;br /&gt;
 $CARMEN_HOME/sharedlib/OpenJAUS/README_ALBERTO.txt&lt;br /&gt;
&lt;br /&gt;
Para que o GPS e o XSENS sejam configurados automaticamente ao serem conectados às portas USB, copie o seguinte arquivo do diretório data do Carmen para sua máquina:&lt;br /&gt;
&lt;br /&gt;
 cd $CARMEN_HOME/data&lt;br /&gt;
 sudo cp 99-usb-serial.rules /etc/udev/rules.d/&lt;br /&gt;
&lt;br /&gt;
== Ajustes na rede para o GPS Trimble ==&lt;br /&gt;
&lt;br /&gt;
Para conectar o novo GPS Trimble é necessário uma conexão com a Internet dentro da IARA. Optamos por usar um iPhone com conexão 3G.&lt;br /&gt;
&lt;br /&gt;
Para o iPhone funcionar no Ubuntu 12.04 é necessário um tanto de coisas... Perdemos o histórico mas dá para achar na Internet (Google iPhone 4S ubuntu 12.04 mount). Precisa instalar uns pacotes (apt-get install ...). Se você tiver sucesso, vai ser possível usar o iPhone como Personal Hotspot, ou seja, usar a Internet de dentro da IARA.&lt;br /&gt;
&lt;br /&gt;
Feito isso, é necessário criar um Gateway da máquina que tem acesso a Internet (car01) para uma subrede da IARA (192.168.0.0 - a subrede de Carro Network). Para isso (ver página de referência em https://help.ubuntu.com/community/Internet/ConnectionSharing (Gateway set up)), considerando o iPhone em eth2 e a subrede da IARA em eth1:&lt;br /&gt;
  sudo iptables -A FORWARD -o eth2 -i eth1 -s 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT&lt;br /&gt;
  sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT&lt;br /&gt;
  sudo iptables -t nat -F POSTROUTING&lt;br /&gt;
  sudo iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE&lt;br /&gt;
  sudo iptables-save | sudo tee /etc/iptables.sav&lt;br /&gt;
&lt;br /&gt;
Os comandos acima criam um NAT do iPhone para a subrede da IARA. Em seguida, é necessário editar o /etc/rc.local e adicionar a linha abaixo antes de &amp;quot;exit 0&amp;quot;:&lt;br /&gt;
  iptables-restore &amp;lt; /etc/iptables.sav&lt;br /&gt;
&lt;br /&gt;
É necessário ainda:&lt;br /&gt;
  sudo sh -c &amp;quot;echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Para tornar isso permanente, inclua as linhas abaixo em /etc/sysctl.conf:&lt;br /&gt;
  net.ipv4.ip_forward=1&lt;br /&gt;
  net.ipv4.conf.default.forwarding=1&lt;br /&gt;
  net.ipv4.conf.all.forwarding=1&lt;br /&gt;
&lt;br /&gt;
No Network Manager, tem que setar &amp;quot;Use this connection only for resources on its network&amp;quot; (Network Manager-&amp;gt;IPv4 Settings-&amp;gt;Routes) em todas as redes cabeadas exceto a do iPhone.&lt;br /&gt;
&lt;br /&gt;
Pronto!&lt;br /&gt;
&lt;br /&gt;
== Ajustes para o Raspberry do volante ==&lt;br /&gt;
&lt;br /&gt;
'''Prevenir que entre em modo de espera, proteção de tela ou desabilite o monitor'''&lt;br /&gt;
 &lt;br /&gt;
Fonte: https://raspberrypi.stackexchange.com/questions/752/how-do-i-prevent-the-screen-from-going-blank&lt;br /&gt;
&lt;br /&gt;
Testado no Raspbian jessey&lt;br /&gt;
&lt;br /&gt;
Only if the files don't exist install (It was not necessary):&lt;br /&gt;
 &lt;br /&gt;
   apt-get install x11-xserver-utils&lt;br /&gt;
&lt;br /&gt;
Edit the files:&lt;br /&gt;
&lt;br /&gt;
 /etc/xdg/lxsession/LXDE/autostart&lt;br /&gt;
 /etc/xdg/lxsession/LXDE-pi/autostart&lt;br /&gt;
 ~/.config/lxprofile/LXDE-pi/autostart&lt;br /&gt;
&lt;br /&gt;
Append these lines:&lt;br /&gt;
&lt;br /&gt;
  @xset s noblank&lt;br /&gt;
  @xset s off&lt;br /&gt;
  @xset -dpms&lt;br /&gt;
&lt;br /&gt;
Possibly also comment out the line that says @xscreensaver -no-splash, so the complete file should look something like this:&lt;br /&gt;
&lt;br /&gt;
  @lxpanel --profile LXDE&lt;br /&gt;
  @pcmanfm --desktop --profile LXDE&lt;br /&gt;
  # @xscreensaver -no-splash&lt;br /&gt;
&lt;br /&gt;
  @xset s noblank&lt;br /&gt;
  @xset s off&lt;br /&gt;
  @xset -dpms&lt;br /&gt;
&lt;br /&gt;
Maybe also exist the line @point-rpi, DONT DELETE and DONT ADD in the others files!&lt;br /&gt;
&lt;br /&gt;
Also edit /etc/kbd/config and make sure these values are set as follows (however I believe this is only for when the lightweight desktop (LXDE) is not running (i.e. the pi is still in text / terminal mode):&lt;br /&gt;
&lt;br /&gt;
  BLANK_TIME=0&lt;br /&gt;
  BLANK_DPMS=off&lt;br /&gt;
  POWERDOWN_TIME=0&lt;br /&gt;
&lt;br /&gt;
I believe that the /etc/xdg/lxsession/LXDE/autostart may be the sort of system-wide version of ~/.xinitrc but someone else probably knows the nuances better.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Wiki_do_LCAD&amp;diff=81393</id>
		<title>Wiki do LCAD</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Wiki_do_LCAD&amp;diff=81393"/>
				<updated>2017-12-07T13:38:24Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bem-vindo à página de documentação do LCAD.&lt;br /&gt;
&lt;br /&gt;
O objetivo deste Wiki é documentar todas as ferramentas, procedimentos de instalação e de suporte oferecidos no Laboratório de Computação de Alto Desempenho (LCAD).&lt;br /&gt;
&lt;br /&gt;
Abaixo você pode conferir alguns roteiros:&lt;br /&gt;
&lt;br /&gt;
:*[[Lista de Aquisições]]&lt;br /&gt;
:*[[Lista de Ocupação de Endereços IP da Rede LCAD]]&lt;br /&gt;
:*[[Carmen Robot Navigation Toolkit]]&lt;br /&gt;
:*[[Máquina Associadora de Eventos - MAE]]&lt;br /&gt;
:*[[Protocolo de Concessão de Contas no LCAD]]&lt;br /&gt;
:*[[Processo de Criação de Contas no LCAD]]&lt;br /&gt;
:*[[Hardwares e Serviços]]&lt;br /&gt;
:*[[:Media:Tutorial wiki.pdf|Guia de Utilização do Wiki LCAD]]&lt;br /&gt;
:*[[Guia de Utilização do Doxygen]]&lt;br /&gt;
:*[[Micro Manual de Utilização do Cluster]]&lt;br /&gt;
:*[[Processamento Paralelo]]&lt;br /&gt;
:*[[Como Funciona o Backup do LCAD]]&lt;br /&gt;
:*[[Como Utilizar a Rede Wireless no LCAD]]&lt;br /&gt;
:*[[Uso Básico do Subversion]]&lt;br /&gt;
:*[[Instalações Úteis]]&lt;br /&gt;
:*[[Dicas e Configurações]]&lt;br /&gt;
:*[[Construção de pacotes RPM|Como construir pacotes RPM - Exemplo básico]]&lt;br /&gt;
:*[[Telefones Úteis]]&lt;br /&gt;
:*[[Como preparar café]]&lt;br /&gt;
:*[[Planejamento de Atividades]]&lt;br /&gt;
:*[[Apresentações]]&lt;br /&gt;
:*[[Identidade Visual]]&lt;br /&gt;
:*[[Material de Consumo Específico]]&lt;br /&gt;
:*[[Como criar branches no SVN]]&lt;br /&gt;
:*[[Roteiro de Instalação do Fedora nos Blades para o Carro]]&lt;br /&gt;
:*[[Roteiro de como configurar NIS no FEDORA 17]]&lt;br /&gt;
:*[[Roteiro de Instalação do Apache e SVN com autenticação NIS]]&lt;br /&gt;
:*[[Instalar o Confirm Account no Wiki]]&lt;br /&gt;
:*[[Configurar SSH sem a necessidade de usar senha]]&lt;br /&gt;
:*[[Criando um repositório no SVN]]&lt;br /&gt;
:*[[Instalando/Conectando via VNC no Carro]]&lt;br /&gt;
:*[[Criando servidor NTP e atualizando as máquinas pela rede]]&lt;br /&gt;
:*[[Adicionando latência com tc no Linux]]&lt;br /&gt;
:*[[Criando Kernel RT linux]]&lt;br /&gt;
:*[[Criando Kernel RT Ubuntu 14.04]]&lt;br /&gt;
:*[[Clonar e Restaurar HD com Clonezilla]]&lt;br /&gt;
:*[[Como usar os pacotes ROS visual search thin e visual search webcam]]&lt;br /&gt;
:*[[Como usar o pacote ROS cyton]]&lt;br /&gt;
:*[[Criando mapas Carmen]]&lt;br /&gt;
:*[[Repetidor Wireless]]&lt;br /&gt;
:*[[Servidor DHCP]]&lt;br /&gt;
:*[[Servidor DHCP Wireless]]&lt;br /&gt;
:*[[Procedimento para Limpar Mapas do Carmen]]&lt;br /&gt;
:*[[Como obter GUID das câmeras PointGrey]]&lt;br /&gt;
:*[[Estrutura de Rede do LCAD]]&lt;br /&gt;
:*[[Roteiro de Instalação Python/Theano]]&lt;br /&gt;
:*[[ Como Cadastrar o MAC na rede do LCAD]]&lt;br /&gt;
&lt;br /&gt;
Para uma listagem mais completa dos artigos contidos neste Wiki, você pode [[Special:Categories|navegar pelas categorias.]]&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Clonar_e_Restaurar_HD_com_Clonezilla&amp;diff=81392</id>
		<title>Clonar e Restaurar HD com Clonezilla</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Clonar_e_Restaurar_HD_com_Clonezilla&amp;diff=81392"/>
				<updated>2017-12-07T13:37:25Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: Criou página com 'category:Servidores  == Clonar HD usando Clonezilla ==  (Esta página será atualizada com conteudo dos links abaixo para manter caso o post seja apagado)  Fonte:http://br...'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Servidores]]&lt;br /&gt;
&lt;br /&gt;
== Clonar HD usando Clonezilla == &lt;br /&gt;
(Esta página será atualizada com conteudo dos links abaixo para manter caso o post seja apagado)&lt;br /&gt;
&lt;br /&gt;
Fonte:http://br.ccm.net/faq/7705-como-clonar-seu-sistema-configurado-com-o-clonezilla&lt;br /&gt;
Créditos: CCM (br.ccm.net).&lt;br /&gt;
&lt;br /&gt;
== Restaurar Imagem do HD feita com Clonezilla == &lt;br /&gt;
&lt;br /&gt;
Fonte:http://br.ccm.net/faq/7705-como-clonar-seu-sistema-configurado-com-o-clonezilla&lt;br /&gt;
Créditos: CCM (br.ccm.net).&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Instala%C3%A7%C3%A3o_Carmen_para_Ubuntu_14.04&amp;diff=81391</id>
		<title>Instalação Carmen para Ubuntu 14.04</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Instala%C3%A7%C3%A3o_Carmen_para_Ubuntu_14.04&amp;diff=81391"/>
				<updated>2017-11-30T21:10:23Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
&lt;br /&gt;
Essa instalação é completa, mas é necessário testar todos os módulos. &lt;br /&gt;
&lt;br /&gt;
= Preparação para a instalação do Carmen = &lt;br /&gt;
&lt;br /&gt;
Atualizar o apt:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
&lt;br /&gt;
Instalar o git, gimp, meld e vim:&lt;br /&gt;
 sudo apt-get install gimp meld vim git&lt;br /&gt;
&lt;br /&gt;
Baixar o Carmen pelo git (faça o download enquanto segue os próximos passos):&lt;br /&gt;
 git clone https://github.com/LCAD-UFES/carmen_lcad.git&lt;br /&gt;
&lt;br /&gt;
Baixe a MAE via git:&lt;br /&gt;
 git clone https://github.com/LCAD-UFES/MAE.git&lt;br /&gt;
&lt;br /&gt;
Instalar os pacotes para o carmem no 14.04&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install swig \&lt;br /&gt;
 libgtk2.0-dev \&lt;br /&gt;
 qt-sdk \&lt;br /&gt;
 libimlib2 libimlib2-dev \&lt;br /&gt;
 imagemagick libmagick++-dev \&lt;br /&gt;
 libwrap0 libwrap0-dev tcpd \&lt;br /&gt;
 libncurses5 libncurses5-dev \&lt;br /&gt;
 libgsl0-dev libgsl0ldbl \&lt;br /&gt;
 libdc1394-22 libdc1394-22-dev libdc1394-utils \&lt;br /&gt;
 cmake \&lt;br /&gt;
 libgtkglext1 libgtkglext1-dev \&lt;br /&gt;
 libgtkglextmm-x11-1.2-0 libgtkglextmm-x11-1.2-dev \&lt;br /&gt;
 libglade2-0 libglade2-dev \&lt;br /&gt;
 freeglut3 freeglut3-dev \&lt;br /&gt;
 libcurl3 libcurl3-nss libcurl4-nss-dev \&lt;br /&gt;
 libglew1.5 libglew1.5-dev libglewmx1.5 libglewmx1.5-dev libglew-dev \&lt;br /&gt;
 libkml0 libkml-dev \&lt;br /&gt;
 liburiparser1 liburiparser-dev \&lt;br /&gt;
 libusb-1.0-0 libusb-1.0-0-dev libusb-dev \&lt;br /&gt;
 libxi-dev libxi6 \&lt;br /&gt;
 libxmu-dev libxmu6 \&lt;br /&gt;
 build-essential libforms-dev \&lt;br /&gt;
 byacc \&lt;br /&gt;
 flex \&lt;br /&gt;
 doxygen \&lt;br /&gt;
 libespeak-dev libfftw3-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
caso de erro em libcheese-gtk23 instale os pacotes abaixo antes dos anteriores (Solucão nao confirmada):&lt;br /&gt;
 sudo apt-get install libglew-dev libcheese7 libcheese-gtk23 libclutter-gst-2.0-0 libcogl15 libclutter-gtk-1.0-0 libclutter-1.0-0&lt;br /&gt;
&lt;br /&gt;
Instalar o Java:&lt;br /&gt;
&lt;br /&gt;
 sudo add-apt-repository ppa:webupd8team/java&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install oracle-jdk8-installer&lt;br /&gt;
 update-alternatives --display java&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/environment:&lt;br /&gt;
 sudo gedit /etc/environment&lt;br /&gt;
&lt;br /&gt;
Adicione no final do arquivo:&lt;br /&gt;
 JAVA_HOME=/usr/lib/jvm/java-8-oracle&lt;br /&gt;
&lt;br /&gt;
Instalar o eclipse:&lt;br /&gt;
 &lt;br /&gt;
Baixe o eclipse de:&lt;br /&gt;
 https://www.eclipse.org/downloads/eclipse-packages/&lt;br /&gt;
&lt;br /&gt;
Descompacte o ecplise&lt;br /&gt;
 cd Downloads/&lt;br /&gt;
 sudo mv eclipse-...tar.gz  /opt&lt;br /&gt;
 cd /opt/&lt;br /&gt;
 sudo tar -xvf eclipse-...tar.gz &lt;br /&gt;
&lt;br /&gt;
Crie um arquivo desktop e edite ele em /usr/share/applications:&lt;br /&gt;
 sudo gedit /usr/share/applications/eclipse.desktop&lt;br /&gt;
&lt;br /&gt;
Coloque o seguinte conteudo:&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=Eclipse&lt;br /&gt;
 Type=Application&lt;br /&gt;
 Exec=/opt/eclipse/eclipse&lt;br /&gt;
 Terminal=false&lt;br /&gt;
 Icon=/opt/eclipse/icon.xpm&lt;br /&gt;
 Comment=Integrated Development Environment&lt;br /&gt;
 NoDisplay=false&lt;br /&gt;
 Categories=Development;IDE&lt;br /&gt;
 Name[en]=Eclipse&lt;br /&gt;
&lt;br /&gt;
Instale as deps da PCL:&lt;br /&gt;
 sudo apt-get install libeigen3-dev libboost-all-dev libflann-dev libvtk5-dev cmake-gui&lt;br /&gt;
&lt;br /&gt;
Install OpenCV 3.1:&lt;br /&gt;
&lt;br /&gt;
Start installing the dependencies:&lt;br /&gt;
 sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev \&lt;br /&gt;
 python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev&lt;br /&gt;
&lt;br /&gt;
Download and select the correct version:&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /opt/opencv3.1.0/&lt;br /&gt;
 cd /opt/opencv3.1.0/&lt;br /&gt;
 sudo git clone https://github.com/Itseez/opencv.git&lt;br /&gt;
 sudo git clone https://github.com/Itseez/opencv_contrib.git&lt;br /&gt;
 cd opencv&lt;br /&gt;
 sudo git checkout 3.1.0&lt;br /&gt;
 cd /opt/opencv3.1.0/opencv_contrib&lt;br /&gt;
 sudo git checkout 3.1.0&lt;br /&gt;
 cd /opt/opencv3.1.0/opencv&lt;br /&gt;
&lt;br /&gt;
Build it:&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 sudo cmake -D -DWITH_IPP=ON -D WITH_CUDA=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \&lt;br /&gt;
 -D OPENCV_EXTRA_MODULES_PATH=/opt/opencv3.1.0/opencv_contrib/modules /opt/opencv3.1.0/opencv/ ..&lt;br /&gt;
 sudo make -j8&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
It is common to have problems with -lippicv using this version of OpenCV. To fix it:&lt;br /&gt;
 Edit `/usr/local/lib/pkgconfig/opencv.pc`&lt;br /&gt;
 Add `libdir3rd=${exec_prefix}/share/OpenCV/3rdparty/lib` after libdir&lt;br /&gt;
 Add `-L${libdir3rd}` at Libs  &lt;br /&gt;
&lt;br /&gt;
Baixar os arquivos:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /usr/local/&lt;br /&gt;
 wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/bullet/bullet-2.78-r2387.tgz&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/fann/fann/2.2.0/FANN-2.2.0-Source.tar.gz&lt;br /&gt;
 wget http://www.kvaser.com/software/7330130980754/V5_3_0/linuxcan.tar.gz&lt;br /&gt;
 tar -xvf bullet-2.78-r2387.tgz&lt;br /&gt;
 tar -xvf linuxcan.tar.gz&lt;br /&gt;
 tar -xvf FANN-2.2.0-Source.tar.gz&lt;br /&gt;
 mv bullet-2.78 bullet&lt;br /&gt;
 cd bullet&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 cd linuxcan&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 cd FANN-2.2.0-Source&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/ld.so.conf.d/opencv.conf&lt;br /&gt;
 gedit /etc/ld.so.conf.d/opencv.conf&lt;br /&gt;
&lt;br /&gt;
Adicione ao final dele:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
Execute: &lt;br /&gt;
 ldconfig&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/bash.bashrc:&lt;br /&gt;
 gedit /etc/bash.bashrc&lt;br /&gt;
&lt;br /&gt;
Adicione no final do arquivo:&lt;br /&gt;
 PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig&lt;br /&gt;
 export PKG_CONFIG_PATH&lt;br /&gt;
&lt;br /&gt;
sair do rooot&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Coloque no .bashrc:&lt;br /&gt;
 #CARMEN&lt;br /&gt;
 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig&lt;br /&gt;
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu/:/usr/lib/libkml&lt;br /&gt;
 export CARMEN_HOME=~/carmen_lcad&lt;br /&gt;
 #OpenJaus&lt;br /&gt;
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/carmen_lcad/sharedlib/OpenJAUS/libopenJaus/lib:~/carmen_lcad/sharedlib/OpenJAUS/libjaus/lib:~/carmen_lcad/sharedlib/OpenJAUS/ojTorc/lib:~/carmen_lcad/sharedlib/OpenJAUS/ojIARASim/lib&lt;br /&gt;
 &lt;br /&gt;
 #MAE&lt;br /&gt;
 export MAEHOME=~/MAE&lt;br /&gt;
 export PATH=$PATH:$MAEHOME/bin&lt;br /&gt;
&lt;br /&gt;
Instale os pacotes imlib e flycapture:&lt;br /&gt;
 cd $CARMEN_HOME/ubuntu_packages/&lt;br /&gt;
 sudo dpkg -i imlib_1.9.15-20_amd64.deb &lt;br /&gt;
 sudo dpkg -i imlib-devel_1.9.15-20_amd64.deb&lt;br /&gt;
 tar -xvf flycapture2-2.5.3.4-amd64-pkg.tgz&lt;br /&gt;
 cd flycapture2-2.5.3.4-amd64/&lt;br /&gt;
 sudo apt-get install libglademm-2.4-1c2a&lt;br /&gt;
 sudo apt-get install libglademm-2.4-dev&lt;br /&gt;
 sudo apt-get install libgtkmm-2.4-dev&lt;br /&gt;
 sudo sh install_flycapture.sh&lt;br /&gt;
&lt;br /&gt;
Faça os links:&lt;br /&gt;
 sudo ln -s /usr/lib64/libgdk_imlib.so.1.9.15 /usr/lib64/libgdk_imlib.a&lt;br /&gt;
 sudo ln -s /usr/src/linux-headers-3.8.0-30/ /usr/src/linux&lt;br /&gt;
&lt;br /&gt;
Instale a PCL:&lt;br /&gt;
 sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install libpcl-all&lt;br /&gt;
&lt;br /&gt;
Instale a câmera Kinect:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.19/libusb-1.0.19.tar.bz2&lt;br /&gt;
 tar xvf libusb-1.0.19.tar.bz2&lt;br /&gt;
 cd libusb-1.0.19&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
se der erro na instalacao acima tente instalar a udev-dev antes:&lt;br /&gt;
 sudo apt-get install libudev-dev&lt;br /&gt;
&lt;br /&gt;
 mkdir /usr/local/tplib&lt;br /&gt;
 cd /usr/local/tplib&lt;br /&gt;
 git clone git://github.com/OpenKinect/libfreenect.git&lt;br /&gt;
 cd libfreenect&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 cp src/libfreenect.pc /usr/local/tplib/&lt;br /&gt;
 make&lt;br /&gt;
 cp ../src/libfreenect.pc.in src/libfreenect.pc &lt;br /&gt;
 cp ../fakenect/fakenect.sh.in fakenect/fakenect.sh&lt;br /&gt;
 make install&lt;br /&gt;
 ldconfig /usr/local/lib64/&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Execute:&lt;br /&gt;
 glview&lt;br /&gt;
&lt;br /&gt;
Caso dê erro, tente:&lt;br /&gt;
 freenect-glview&lt;br /&gt;
&lt;br /&gt;
Se der erro execute:&lt;br /&gt;
 sudo ldconfig /usr/local/lib64/&lt;br /&gt;
&lt;br /&gt;
Instalação da biblioteca G2O 14.04:&lt;br /&gt;
 sudo apt-get install cmake libsuitesparse-dev libqt4-dev qt4-qmake&lt;br /&gt;
 cd /usr/local/&lt;br /&gt;
 sudo svn co https://svn.openslam.org/data/svn/g2o&lt;br /&gt;
 cd /usr/local/g2o/trunk/build/&lt;br /&gt;
 sudo cmake ../ -DBUILD_CSPARSE=ON -DG2O_BUILD_DEPRECATED_TYPES=ON -DG2O_BUILD_LINKED_APPS=ON&lt;br /&gt;
 sudo make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
'''ATENCAO: Caso esteja usando o UBUNTU 14.04.3 é necessario instalar a zlib:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Para verificar sua versão, veja no campo Description, na saída do comando abaixo:&lt;br /&gt;
  lsb_release -a&lt;br /&gt;
Caso seja o 14.04.3 faca: &lt;br /&gt;
 cd $CARMEN_HOME/ubuntu_packages&lt;br /&gt;
 sudo dpkg -i zlib1g_1.2.3.4.dfsg-3ubuntu4_amd64.deb &lt;br /&gt;
 sudo dpkg -i zlib1g-dev_1.2.3.4.dfsg-3ubuntu4_amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Faça o link da boost:&lt;br /&gt;
 sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_thread.so /usr/lib/x86_64-linux-gnu/libboost_thread-mt.so&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Instale as bibliotecas da MAE:&lt;br /&gt;
 sudo apt-get install make g++ freeglut3-dev byacc libforms-dev libtiff4-dev libXi-dev libXmu-dev doxygen tcsh flex libdc1394-22-dev&lt;br /&gt;
&lt;br /&gt;
# Compilar a MAE:&lt;br /&gt;
## Pré-requisito: as variáveis de ambiente MAEHOME e PATH devem estar ajustadas;&lt;br /&gt;
## Entrar no diretório da MAE: &amp;quot;cd $MAEHOME&amp;quot;;&lt;br /&gt;
## Compilar a MAE: &amp;quot;make&amp;quot;.&lt;br /&gt;
## Verificar se a biblioteca da MAE libnet_conn.a foi gerado em MAEHOME/lib;&lt;br /&gt;
## Verificar se o compilador da MAE netcomp foi gerado em MAEHOME/bin.&lt;br /&gt;
&lt;br /&gt;
Mais informações sobre a MAE: http://www.lcad.inf.ufes.br/wiki/index.php/M%C3%A1quina_Associadora_de_Eventos_-_MAE#Compilando_a_MAE&lt;br /&gt;
&lt;br /&gt;
Instalação da dlib:&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 sudo su&lt;br /&gt;
 git clone https://github.com/davisking/dlib.git&lt;br /&gt;
 cd dlib/&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build/&lt;br /&gt;
 cmake .. {Vai reclamar de coisas CUDA. Mas pode compilar sem suporte a CUDA}&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Instalação da libwnn:&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 git clone http://github.com/filipemtz/libwnn&lt;br /&gt;
 cd libwnn&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 make -j 4&lt;br /&gt;
 sudo make install&lt;br /&gt;
 &lt;br /&gt;
 Atenção: em caso de problema com o opencv, faça:&lt;br /&gt;
 cd build&lt;br /&gt;
 rm -rf *&lt;br /&gt;
 cmake -DOpenCV_DIR=/usr/local/opencv-2.4.9/build/ ..&lt;br /&gt;
 make -j 4&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
Feche todos os terminais e faça:&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 ./configure --nojava --nocuda --nozlib&lt;br /&gt;
   Should the C++ tools be installed for CARMEN: [Y/n] Y&lt;br /&gt;
   Should Python Bindings be installed: [y/N] N&lt;br /&gt;
   Searching for Python2.4... Should the old laser server be used instead of the new one: [y/N] N&lt;br /&gt;
   Install path [/usr/local/]: &lt;br /&gt;
   Robot numbers [*]: 1,2&lt;br /&gt;
&lt;br /&gt;
Antes de compilar o CARMEN, precisamos que o módulo tracker seja compilado separadamente para que o navigator_spline funcione:&lt;br /&gt;
 cd $CARMEN_HOME/src/tracker&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Vai dar um erro de compilação, mas está tudo ok.&lt;br /&gt;
&lt;br /&gt;
Para compilar o carmen rode:&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Caso dê erro por causa da libusb.h vá no arquivo:&lt;br /&gt;
  sudo vim /usr/local/include/libfreenect.hpp&lt;br /&gt;
E altere #include &amp;lt;libusb.h&amp;gt; para&lt;br /&gt;
  #include &amp;lt;libusb-1.0/libusb.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Caso dê erro na compilacão no global por causa do z_stream tente&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 make clean&lt;br /&gt;
 ./configure --nojava --nocuda&lt;br /&gt;
   Should the C++ tools be installed for CARMEN: [Y/n] Y&lt;br /&gt;
   Should Python Bindings be installed: [y/N] N&lt;br /&gt;
   Searching for Python2.4... Should the old laser server be used instead of the new one: [y/N] N&lt;br /&gt;
   Install path [/usr/local/]: &lt;br /&gt;
   Robot numbers [*]: 1,2&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
= Ajustes para a IARA = &lt;br /&gt;
'''(seções abaixo apenas para serem feitas na IARA)'''&lt;br /&gt;
&lt;br /&gt;
Para configurar o OpenJAUS siga o tutorial em : &lt;br /&gt;
 &lt;br /&gt;
 $CARMEN_HOME/sharedlib/OpenJAUS/README_ALBERTO.txt&lt;br /&gt;
&lt;br /&gt;
Para que o GPS e o XSENS sejam configurados automaticamente ao serem conectados às portas USB, copie o seguinte arquivo do diretório data do Carmen para sua máquina:&lt;br /&gt;
&lt;br /&gt;
 cd $CARMEN_HOME/data&lt;br /&gt;
 sudo cp 99-usb-serial.rules /etc/udev/rules.d/&lt;br /&gt;
&lt;br /&gt;
== Ajustes na rede para o GPS Trimble ==&lt;br /&gt;
&lt;br /&gt;
Para conectar o novo GPS Trimble é necessário uma conexão com a Internet dentro da IARA. Optamos por usar um iPhone com conexão 3G.&lt;br /&gt;
&lt;br /&gt;
Para o iPhone funcionar no Ubuntu 12.04 é necessário um tanto de coisas... Perdemos o histórico mas dá para achar na Internet (Google iPhone 4S ubuntu 12.04 mount). Precisa instalar uns pacotes (apt-get install ...). Se você tiver sucesso, vai ser possível usar o iPhone como Personal Hotspot, ou seja, usar a Internet de dentro da IARA.&lt;br /&gt;
&lt;br /&gt;
Feito isso, é necessário criar um Gateway da máquina que tem acesso a Internet (car01) para uma subrede da IARA (192.168.0.0 - a subrede de Carro Network). Para isso (ver página de referência em https://help.ubuntu.com/community/Internet/ConnectionSharing (Gateway set up)), considerando o iPhone em eth2 e a subrede da IARA em eth1:&lt;br /&gt;
  sudo iptables -A FORWARD -o eth2 -i eth1 -s 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT&lt;br /&gt;
  sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT&lt;br /&gt;
  sudo iptables -t nat -F POSTROUTING&lt;br /&gt;
  sudo iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE&lt;br /&gt;
  sudo iptables-save | sudo tee /etc/iptables.sav&lt;br /&gt;
&lt;br /&gt;
Os comandos acima criam um NAT do iPhone para a subrede da IARA. Em seguida, é necessário editar o /etc/rc.local e adicionar a linha abaixo antes de &amp;quot;exit 0&amp;quot;:&lt;br /&gt;
  iptables-restore &amp;lt; /etc/iptables.sav&lt;br /&gt;
&lt;br /&gt;
É necessário ainda:&lt;br /&gt;
  sudo sh -c &amp;quot;echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Para tornar isso permanente, inclua as linhas abaixo em /etc/sysctl.conf:&lt;br /&gt;
  net.ipv4.ip_forward=1&lt;br /&gt;
  net.ipv4.conf.default.forwarding=1&lt;br /&gt;
  net.ipv4.conf.all.forwarding=1&lt;br /&gt;
&lt;br /&gt;
No Network Manager, tem que setar &amp;quot;Use this connection only for resources on its network&amp;quot; (Network Manager-&amp;gt;IPv4 Settings-&amp;gt;Routes) em todas as redes cabeadas exceto a do iPhone.&lt;br /&gt;
&lt;br /&gt;
Pronto!&lt;br /&gt;
&lt;br /&gt;
== Ajustes para o Raspberry do volante ==&lt;br /&gt;
&lt;br /&gt;
'''Prevenir que entre em modo de espera, proteção de tela ou desabilite o monitor'''&lt;br /&gt;
 &lt;br /&gt;
Fonte: https://raspberrypi.stackexchange.com/questions/752/how-do-i-prevent-the-screen-from-going-blank&lt;br /&gt;
&lt;br /&gt;
Testado no Raspbian jessey&lt;br /&gt;
&lt;br /&gt;
Only if the files don't exist install (It was not necessary):&lt;br /&gt;
 &lt;br /&gt;
   apt-get install x11-xserver-utils&lt;br /&gt;
&lt;br /&gt;
Edit the files:&lt;br /&gt;
&lt;br /&gt;
 /etc/xdg/lxsession/LXDE/autostart&lt;br /&gt;
 /etc/xdg/lxsession/LXDE-pi/autostart&lt;br /&gt;
 ~/.config/lxprofile/LXDE-pi/autostart&lt;br /&gt;
&lt;br /&gt;
Append these lines:&lt;br /&gt;
&lt;br /&gt;
  @xset s noblank&lt;br /&gt;
  @xset s off&lt;br /&gt;
  @xset -dpms&lt;br /&gt;
&lt;br /&gt;
Possibly also comment out the line that says @xscreensaver -no-splash, so the complete file should look something like this:&lt;br /&gt;
&lt;br /&gt;
  @lxpanel --profile LXDE&lt;br /&gt;
  @pcmanfm --desktop --profile LXDE&lt;br /&gt;
  # @xscreensaver -no-splash&lt;br /&gt;
&lt;br /&gt;
  @xset s noblank&lt;br /&gt;
  @xset s off&lt;br /&gt;
  @xset -dpms&lt;br /&gt;
&lt;br /&gt;
Maybe also exist the line @point-rpi, DONT DELETE and DONT ADD in the others files!&lt;br /&gt;
&lt;br /&gt;
Also edit /etc/kbd/config and make sure these values are set as follows (however I believe this is only for when the lightweight desktop (LXDE) is not running (i.e. the pi is still in text / terminal mode):&lt;br /&gt;
&lt;br /&gt;
  BLANK_TIME=0&lt;br /&gt;
  BLANK_DPMS=off&lt;br /&gt;
  POWERDOWN_TIME=0&lt;br /&gt;
&lt;br /&gt;
I believe that the /etc/xdg/lxsession/LXDE/autostart may be the sort of system-wide version of ~/.xinitrc but someone else probably knows the nuances better.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81390</id>
		<title>Criando Kernel RT Ubuntu 14.04</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81390"/>
				<updated>2017-11-30T17:05:09Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Todas as informacoes aqui foram retiradas de: http://linuxaudioproduction.blogspot.com.br/2015/09/patching-compiling-and-installing.html&lt;br /&gt;
&lt;br /&gt;
'''Testado com o Ubuntu 14.04.1'''&lt;br /&gt;
&lt;br /&gt;
This guide is a condensed reference on how to patch, compile and install the 4.1.5. kernel.&lt;br /&gt;
&lt;br /&gt;
Download kernel, headers and patch:&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.5.tar.xz&lt;br /&gt;
 http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.1.5-unstable/linux-headers-4.1.5-040105_4.1.5-040105.201508101730_all.deb&lt;br /&gt;
 wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.1.5-unstable/linux-headers-4.1.5-040105-generic_4.1.5-040105.201508101730_amd64.deb&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/projects/rt/4.1/older/patch-4.1.5-rt5.patch.gz&lt;br /&gt;
&lt;br /&gt;
use sudo mode:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /home/car01/Downloads&lt;br /&gt;
Extract kernel archive and patch file:&lt;br /&gt;
 tar -Jxf linux-4.1.5.tar.xz&lt;br /&gt;
 gzip -d patch-4.1.5-rt5.patch.gz&lt;br /&gt;
Put the patch file one directory level above the kernel source.&lt;br /&gt;
 mv linux-4.1.5 /usr/src&lt;br /&gt;
 cp patch-4.1.5-rt5.patch /usr/src&lt;br /&gt;
&lt;br /&gt;
Change directory to the newly created kernel source directory&lt;br /&gt;
 cd /usr/src/linux-4.1.5&lt;br /&gt;
&lt;br /&gt;
Apply the patch to the kernel.&lt;br /&gt;
&lt;br /&gt;
 less ../patch-4.1.5-rt5.patch | patch -p1&lt;br /&gt;
&lt;br /&gt;
Get the latest configuration of new kernel&lt;br /&gt;
 make oldconfig&lt;br /&gt;
&lt;br /&gt;
The make will ask some questions, answer with the default option, '''EXCEPT''' the options about real time and debug mode. When asked for:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Preemption Model&amp;quot;&lt;br /&gt;
** Choose &amp;quot;5. Fully Preemptible Kernel (RT) (PREEMPT_RT_FULL) (NEW)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Debug preemptible kernel (DEBUG_PREEMPT)&amp;quot;&lt;br /&gt;
** Choose &amp;quot;n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Open up the kernel configuration tool:&lt;br /&gt;
 make menuconfig&lt;br /&gt;
&lt;br /&gt;
To configure the IP_TABLES NAT support:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
On the Kernel Configuration go to:&lt;br /&gt;
 Networking support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter) &amp;gt; IP: Netfilter Configuration&lt;br /&gt;
 Find the options listed below and mark with &amp;lt;M&amp;gt;&lt;br /&gt;
 	&amp;lt;M&amp;gt; IP tables support (required for filtering/masq/NAT) &lt;br /&gt;
 Other options will apear:&lt;br /&gt;
	&amp;lt;M&amp;gt; MASQUERADE target support&lt;br /&gt;
	&amp;lt;M&amp;gt; NETMAP tarrget support&lt;br /&gt;
	&amp;lt;M&amp;gt; REDIRECT target support&lt;br /&gt;
 save and exit&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
Build and install the kernel:&lt;br /&gt;
&lt;br /&gt;
 make -j 24&lt;br /&gt;
 make -j 24 modules&lt;br /&gt;
 make -j 24 INSTALL_MOD_STRIP=1 modules_install&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
Update the bootloader (probably grub) if not done automatically.&lt;br /&gt;
&lt;br /&gt;
Install the new headers:&lt;br /&gt;
 sudo dpkg -i /home/car01/Downloads/linux-headers-4.1.5*.deb&lt;br /&gt;
&lt;br /&gt;
restart the computer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check if the iptables_nat is working:&lt;br /&gt;
&lt;br /&gt;
 iptables -t nat -L&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 If shows the following error:&lt;br /&gt;
   iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)&lt;br /&gt;
   Perhaps iptables or your kernel needs to be upgraded.&lt;br /&gt;
Back to the step of menu configuration tool:make menuconfig and check the iptables options. If is ok, try the solution:&lt;br /&gt;
     cd /usr/src/linux-4.1.5&lt;br /&gt;
     sudo make menuconfig&lt;br /&gt;
  Go to menu Networking Support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter)&lt;br /&gt;
  and press spacebar to mark with star&lt;br /&gt;
  Entry in this menu and go to Core Netfilter Configuration. Fill all options with M EXCEPT the options &lt;br /&gt;
  below that should be filled with star :&lt;br /&gt;
	&amp;quot;Netfilter connection tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking flow accounting&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection mark tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking security mark support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking events&amp;quot; and &lt;br /&gt;
	&amp;quot;Netfilter Xtables support (required for ip_tables)&amp;quot;&lt;br /&gt;
   And the option &amp;quot;Enable obsolete /proc/net/ipt_recent&amp;quot; doesn't should be filled.&lt;br /&gt;
   Save changes and exit. &lt;br /&gt;
  BACK TO THE '''Build and install the kernel''' STEP in this tutorial.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using RAID and partition isn't recognized, install the package and reboot:&lt;br /&gt;
 sudo apt-get install dmraid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Nvidia Graphics Driver (352.41) for the Realtime Kernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;After installing the realtime kernel as described above, Nvidia graphics card owners will probably want&lt;br /&gt;
 to install the official graphics driver from Nvidia (if you're using Ardour you're going to need this driver &lt;br /&gt;
 to get smooth GUI performance). Unfortunately, the installer will just complain about the realtime kernel and&lt;br /&gt;
 quit. With some tweaks it is possible to install it nevertheless. This article describes the installation of the&lt;br /&gt;
 Nvidia driver version 352.41. For different versions you will need a different patch file or perform the patch manually.&lt;br /&gt;
&lt;br /&gt;
 Warning: I found that the driver sometimes locks itself up on my system, leading to a frozen image.&lt;br /&gt;
 If 100% stability is a requirement for you, you should not install it. During the installation you will &lt;br /&gt;
 need to stop your desktop session so consider printing this guide or open it up on a different device.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead if you're ready:&lt;br /&gt;
&lt;br /&gt;
Remove the old nvidia instalation&lt;br /&gt;
 sudo apt-get remove nvidia*&lt;br /&gt;
 sudo apt-get autoremove&lt;br /&gt;
&lt;br /&gt;
Update and download a few tools that we will need:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install dkms build-essential&lt;br /&gt;
&lt;br /&gt;
Now its time to blacklist the nouveau driver.&lt;br /&gt;
 sudo gedit /etc/modprobe.d/blacklist-nouveau.conf&lt;br /&gt;
&lt;br /&gt;
And add the following lines:&lt;br /&gt;
 blacklist nouveau&lt;br /&gt;
 blacklist lbm-nouveau&lt;br /&gt;
 options nouveau modeset=0&lt;br /&gt;
 alias nouveau off&lt;br /&gt;
 alias lbm-nouveau off&lt;br /&gt;
&lt;br /&gt;
Disable the Kernel nouveau by typing the following commands:&lt;br /&gt;
 echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf&lt;br /&gt;
 sudo update-initramfs -u&lt;br /&gt;
&lt;br /&gt;
Download the driver package from your local nvidia page:&lt;br /&gt;
 http://www.nvidia.com/Download/index.aspx&lt;br /&gt;
Make a patch file as follows: &lt;br /&gt;
 [[nvidia-352.41-rt.patch]]&lt;br /&gt;
&lt;br /&gt;
Open a console and change directory to the folder where you downloaded the driver package to.&lt;br /&gt;
Make the driver package executable:&lt;br /&gt;
 chmod +x NVIDIA-Linux-x86_64-352.41.run&lt;br /&gt;
&lt;br /&gt;
Extract the driver source:&lt;br /&gt;
 ./NVIDIA-Linux-x86_64-352.41.run --extract-only&lt;br /&gt;
&lt;br /&gt;
Apply the patch file:&lt;br /&gt;
 less nvidia-352.41-rt.patch | patch NVIDIA-Linux-x86_64-352.41/kernel/nv-linux.h&lt;br /&gt;
&lt;br /&gt;
Press Ctrl+Alt+F1 to open up a terminal session and login as root to stop your X Sever. If you're using XFCE (UbuntuStudio) this is LightDM. Beware that this kills all programs running in the GUI session, including the browser you might be reading this article in:&lt;br /&gt;
 /etc/init.d/lightdm stop&lt;br /&gt;
&lt;br /&gt;
Set this environment variable to disable the a check for the realtime kernel patch in the installer:&lt;br /&gt;
 export IGNORE_PREEMPT_RT_PRESENCE=1&lt;br /&gt;
&lt;br /&gt;
Change directory to the folder where the nvidia driver source was extracted to. &lt;br /&gt;
Run the installer just like you normally would:&lt;br /&gt;
 ./nvidia-installer&lt;br /&gt;
Restart your desktop manager:&lt;br /&gt;
 /etc/init.d/lightdm start&lt;br /&gt;
&lt;br /&gt;
Check if the driver was install correctly,  deve mostrar as informações da placa de video&lt;br /&gt;
 $ nvidia-settings&lt;br /&gt;
&lt;br /&gt;
Your system should now use the freshly installed driver!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;If you want to adapt this process for a different driver version, you will need to take a look what the patch actually&lt;br /&gt;
 does and make those changes to the nv-linux.h file manually. If you do so, it would be very nice of you to create a new patch &lt;br /&gt;
 file and post it here in the comments. Of course, there's no guarantee that this will work for newer driver versions.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para instalar o cuda siga as instruções do Getting_Started: http://developer.download.nvidia.com/compute/cuda/6_5/rel/docs/CUDA_Getting_Started_Linux.pdf&lt;br /&gt;
&lt;br /&gt;
Use o instador .run&lt;br /&gt;
&lt;br /&gt;
Na instalação vai aparecer algumas perguntas, Siga essas respostas.&lt;br /&gt;
&lt;br /&gt;
 Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.29? ((y)es/(n)o/(q)uit): n&lt;br /&gt;
 Install the CUDA 6.5 Toolkit? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter Toolkit Location [ default is /usr/local/cuda-6.5 ]: &lt;br /&gt;
 Do you want to install a symbolic link at /usr/local/cuda? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Install the CUDA 6.5 Samples? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter CUDA Samples Location [ default is /home/car01 ]: &lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
http://linuxaudioproduction.blogspot.com.br/2015/09/how-to-patching-and-compiling-nvidia.html&lt;br /&gt;
&lt;br /&gt;
https://devtalk.nvidia.com/default/topic/572468/nvidia-325-15-linux-rt-old-amp-amp-new-nvidia-rt-patch-methods-questions-about-nvidia-installer/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Possíveis problemas ==&lt;br /&gt;
&lt;br /&gt;
Error NVRM/VGA com o driver da nvidia:&lt;br /&gt;
&lt;br /&gt;
use o comando:&lt;br /&gt;
sudo dmesg | tail&lt;br /&gt;
Se ocorrer os seguintes erros:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[   15.458823] NVRM: Your system is not currently configured to drive a VGA console&lt;br /&gt;
[   15.458830] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver&lt;br /&gt;
[   15.458834] NVRM: requires the use of a text-mode VGA console. Use of other console&lt;br /&gt;
[   15.458838] NVRM: drivers including, but not limited to, vesafb, may result in&lt;br /&gt;
[   15.458841] NVRM: corruption and stability problems, and is not supported.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adicione a seguinte linha no arquivo  /boot/grub/grub.cfg ao fim da linha do kernel&lt;br /&gt;
 &lt;br /&gt;
video=vesa:off vga=normal&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
menuentry 'Ubuntu' --class ubuntu...&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
linux    /boot/vmlinuz-4.1.5-rt5 root=UUID=f5a99a1a-15a4-4a83-a3fb-2adbee7f8311 ro quiet splash $vt_handoff '''video=vesa:off vga=normal'''&lt;br /&gt;
&lt;br /&gt;
(..)&lt;br /&gt;
&lt;br /&gt;
verificar nesse link&lt;br /&gt;
 https://bbs.archlinux.org/viewtopic.php?id=143569&lt;br /&gt;
&lt;br /&gt;
Erro na resolução do monitor.&lt;br /&gt;
Entre na configurações da nvidia como super usuário&lt;br /&gt;
 &lt;br /&gt;
 $ sudo nvidia-settings &lt;br /&gt;
&lt;br /&gt;
Em X Server Display Configuration, restaure a configuração do X server clicando no botão de &amp;quot;Reset&amp;quot;. Após isso reinicie a maquina.&lt;br /&gt;
&lt;br /&gt;
Feito isso, volte na mesma aba da nvidia-settings. Verifique no campo &amp;quot;Selection&amp;quot; se o aparece o seu monitor. Depois mude a resolução do monitor para uma configuração maior e salve a configuração em &amp;quot;Save to X Configuration File&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81389</id>
		<title>Criando Kernel RT Ubuntu 14.04</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81389"/>
				<updated>2017-11-30T16:34:23Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Todas as informacoes aqui foram retiradas de: http://linuxaudioproduction.blogspot.com.br/2015/09/patching-compiling-and-installing.html&lt;br /&gt;
&lt;br /&gt;
'''Testado com o Ubuntu 14.04.1'''&lt;br /&gt;
&lt;br /&gt;
This guide is a condensed reference on how to patch, compile and install the 4.1.5. kernel.&lt;br /&gt;
&lt;br /&gt;
Download kernel and patch:&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.5.tar.xz&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/projects/rt/4.1/older/patch-4.1.5-rt5.patch.gz&lt;br /&gt;
&lt;br /&gt;
use sudo mode:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /home/car01/Downloads&lt;br /&gt;
Extract kernel archive and patch file:&lt;br /&gt;
 tar -Jxf linux-4.1.5.tar.xz&lt;br /&gt;
 gzip -d patch-4.1.5-rt5.patch.gz&lt;br /&gt;
Put the patch file one directory level above the kernel source.&lt;br /&gt;
 mv linux-4.1.5 /usr/src&lt;br /&gt;
 cp patch-4.1.5-rt5.patch /usr/src&lt;br /&gt;
&lt;br /&gt;
Change directory to the newly created kernel source directory&lt;br /&gt;
 cd /usr/src/linux-4.1.5&lt;br /&gt;
&lt;br /&gt;
Apply the patch to the kernel.&lt;br /&gt;
&lt;br /&gt;
 less ../patch-4.1.5-rt5.patch | patch -p1&lt;br /&gt;
&lt;br /&gt;
Get the latest configuration of new kernel&lt;br /&gt;
 make oldconfig&lt;br /&gt;
&lt;br /&gt;
The make will ask some questions, answer with the default option, '''EXCEPT''' the options about real time and debug mode. When asked for:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Preemption Model&amp;quot;&lt;br /&gt;
** Choose &amp;quot;5. Fully Preemptible Kernel (RT) (PREEMPT_RT_FULL) (NEW)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Debug preemptible kernel (DEBUG_PREEMPT)&amp;quot;&lt;br /&gt;
** Choose &amp;quot;n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Open up the kernel configuration tool:&lt;br /&gt;
 make menuconfig&lt;br /&gt;
&lt;br /&gt;
To configure the IP_TABLES NAT support:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
On the Kernel Configuration go to:&lt;br /&gt;
 Networking support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter) &amp;gt; IP: Netfilter Configuration&lt;br /&gt;
 Find the options listed below and mark with &amp;lt;M&amp;gt;&lt;br /&gt;
 	&amp;lt;M&amp;gt; IP tables support (required for filtering/masq/NAT) &lt;br /&gt;
 Other options will apear:&lt;br /&gt;
	&amp;lt;M&amp;gt; MASQUERADE target support&lt;br /&gt;
	&amp;lt;M&amp;gt; NETMAP tarrget support&lt;br /&gt;
	&amp;lt;M&amp;gt; REDIRECT target support&lt;br /&gt;
 save and exit&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
Build and install the kernel:&lt;br /&gt;
&lt;br /&gt;
 make -j 24&lt;br /&gt;
 make -j 24 modules&lt;br /&gt;
 make -j 24 INSTALL_MOD_STRIP=1 modules_install&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
Update the bootloader (probably grub) if not done automatically.&lt;br /&gt;
&lt;br /&gt;
restart the computer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check if the iptables_nat is working:&lt;br /&gt;
&lt;br /&gt;
 iptables -t nat -L&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 If shows the following error:&lt;br /&gt;
   iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)&lt;br /&gt;
   Perhaps iptables or your kernel needs to be upgraded.&lt;br /&gt;
Back to the step of menu configuration tool:make menuconfig and check the iptables options. If is ok, try the solution:&lt;br /&gt;
     cd /usr/src/linux-4.1.5&lt;br /&gt;
     sudo make menuconfig&lt;br /&gt;
  Go to menu Networking Support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter)&lt;br /&gt;
  and press spacebar to mark with star&lt;br /&gt;
  Entry in this menu and go to Core Netfilter Configuration. Fill all options with M EXCEPT the options &lt;br /&gt;
  below that should be filled with star :&lt;br /&gt;
	&amp;quot;Netfilter connection tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking flow accounting&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection mark tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking security mark support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking events&amp;quot; and &lt;br /&gt;
	&amp;quot;Netfilter Xtables support (required for ip_tables)&amp;quot;&lt;br /&gt;
   And the option &amp;quot;Enable obsolete /proc/net/ipt_recent&amp;quot; doesn't should be filled.&lt;br /&gt;
   Save changes and exit. &lt;br /&gt;
  BACK TO THE '''Build and install the kernel''' STEP in this tutorial.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using RAID and partition isn't recognized, install the package and reboot:&lt;br /&gt;
 sudo apt-get install dmraid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Nvidia Graphics Driver (352.41) for the Realtime Kernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;After installing the realtime kernel as described above, Nvidia graphics card owners will probably want&lt;br /&gt;
 to install the official graphics driver from Nvidia (if you're using Ardour you're going to need this driver &lt;br /&gt;
 to get smooth GUI performance). Unfortunately, the installer will just complain about the realtime kernel and&lt;br /&gt;
 quit. With some tweaks it is possible to install it nevertheless. This article describes the installation of the&lt;br /&gt;
 Nvidia driver version 352.41. For different versions you will need a different patch file or perform the patch manually.&lt;br /&gt;
&lt;br /&gt;
 Warning: I found that the driver sometimes locks itself up on my system, leading to a frozen image.&lt;br /&gt;
 If 100% stability is a requirement for you, you should not install it. During the installation you will &lt;br /&gt;
 need to stop your desktop session so consider printing this guide or open it up on a different device.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead if you're ready:&lt;br /&gt;
&lt;br /&gt;
Download the driver package from your local nvidia page:&lt;br /&gt;
 http://www.nvidia.com/Download/index.aspx&lt;br /&gt;
Make a patch file as follows: &lt;br /&gt;
 [[nvidia-352.41-rt.patch]]&lt;br /&gt;
Open a console and change directory to the folder where you downloaded the driver package to.&lt;br /&gt;
&lt;br /&gt;
Make the driver package executable:&lt;br /&gt;
 chmod +x NVIDIA-Linux-x86_64-352.41.run&lt;br /&gt;
&lt;br /&gt;
Extract the driver source:&lt;br /&gt;
 ./NVIDIA-Linux-x86_64-352.41.run --extract-only&lt;br /&gt;
&lt;br /&gt;
Apply the patch file:&lt;br /&gt;
 less nvidia-352.41-rt.patch | patch NVIDIA-Linux-x86_64-352.41/kernel/nv-linux.h&lt;br /&gt;
&lt;br /&gt;
Press Ctrl+Alt+F1 to open up a terminal session and login as root to stop your X Sever. If you're using XFCE (UbuntuStudio) this is LightDM. Beware that this kills all programs running in the GUI session, including the browser you might be reading this article in:&lt;br /&gt;
 /etc/init.d/lightdm stop&lt;br /&gt;
&lt;br /&gt;
Set this environment variable to disable the a check for the realtime kernel patch in the installer:&lt;br /&gt;
 export IGNORE_PREEMPT_RT_PRESENCE=1&lt;br /&gt;
&lt;br /&gt;
Change directory to the folder where the nvidia driver source was extracted to. &lt;br /&gt;
Run the installer just like you normally would:&lt;br /&gt;
 ./nvidia-installer&lt;br /&gt;
Restart your desktop manager:&lt;br /&gt;
 /etc/init.d/lightdm start&lt;br /&gt;
&lt;br /&gt;
Check if the driver was install correctly,  deve mostrar as informações da placa de video&lt;br /&gt;
 $ nvidia-settings&lt;br /&gt;
&lt;br /&gt;
Your system should now use the freshly installed driver!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;If you want to adapt this process for a different driver version, you will need to take a look what the patch actually&lt;br /&gt;
 does and make those changes to the nv-linux.h file manually. If you do so, it would be very nice of you to create a new patch &lt;br /&gt;
 file and post it here in the comments. Of course, there's no guarantee that this will work for newer driver versions.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para instalar o cuda siga as instruções do Getting_Started: http://developer.download.nvidia.com/compute/cuda/6_5/rel/docs/CUDA_Getting_Started_Linux.pdf&lt;br /&gt;
&lt;br /&gt;
Use o instador .run&lt;br /&gt;
&lt;br /&gt;
Na instalação vai aparecer algumas perguntas, Siga essas respostas.&lt;br /&gt;
&lt;br /&gt;
 Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.29? ((y)es/(n)o/(q)uit): n&lt;br /&gt;
 Install the CUDA 6.5 Toolkit? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter Toolkit Location [ default is /usr/local/cuda-6.5 ]: &lt;br /&gt;
 Do you want to install a symbolic link at /usr/local/cuda? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Install the CUDA 6.5 Samples? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter CUDA Samples Location [ default is /home/car01 ]: &lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
http://linuxaudioproduction.blogspot.com.br/2015/09/how-to-patching-and-compiling-nvidia.html&lt;br /&gt;
&lt;br /&gt;
https://devtalk.nvidia.com/default/topic/572468/nvidia-325-15-linux-rt-old-amp-amp-new-nvidia-rt-patch-methods-questions-about-nvidia-installer/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Possíveis problemas ==&lt;br /&gt;
&lt;br /&gt;
Error NVRM/VGA com o driver da nvidia:&lt;br /&gt;
&lt;br /&gt;
use o comando:&lt;br /&gt;
sudo dmesg | tail&lt;br /&gt;
Se ocorrer os seguintes erros:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[   15.458823] NVRM: Your system is not currently configured to drive a VGA console&lt;br /&gt;
[   15.458830] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver&lt;br /&gt;
[   15.458834] NVRM: requires the use of a text-mode VGA console. Use of other console&lt;br /&gt;
[   15.458838] NVRM: drivers including, but not limited to, vesafb, may result in&lt;br /&gt;
[   15.458841] NVRM: corruption and stability problems, and is not supported.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adicione a seguinte linha no arquivo  /boot/grub/grub.cfg ao fim da linha do kernel&lt;br /&gt;
 &lt;br /&gt;
video=vesa:off vga=normal&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
menuentry 'Ubuntu' --class ubuntu...&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
linux    /boot/vmlinuz-4.1.5-rt5 root=UUID=f5a99a1a-15a4-4a83-a3fb-2adbee7f8311 ro quiet splash $vt_handoff '''video=vesa:off vga=normal'''&lt;br /&gt;
&lt;br /&gt;
(..)&lt;br /&gt;
&lt;br /&gt;
verificar nesse link&lt;br /&gt;
 https://bbs.archlinux.org/viewtopic.php?id=143569&lt;br /&gt;
&lt;br /&gt;
Erro na resolução do monitor.&lt;br /&gt;
Entre na configurações da nvidia como super usuário&lt;br /&gt;
 &lt;br /&gt;
 $ sudo nvidia-settings &lt;br /&gt;
&lt;br /&gt;
Em X Server Display Configuration, restaure a configuração do X server clicando no botão de &amp;quot;Reset&amp;quot;. Após isso reinicie a maquina.&lt;br /&gt;
&lt;br /&gt;
Feito isso, volte na mesma aba da nvidia-settings. Verifique no campo &amp;quot;Selection&amp;quot; se o aparece o seu monitor. Depois mude a resolução do monitor para uma configuração maior e salve a configuração em &amp;quot;Save to X Configuration File&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81388</id>
		<title>Criando Kernel RT Ubuntu 14.04</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81388"/>
				<updated>2017-11-30T16:33:25Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Todas as informacoes aqui foram retiradas de: http://linuxaudioproduction.blogspot.com.br/2015/09/patching-compiling-and-installing.html&lt;br /&gt;
&lt;br /&gt;
'''Testado com o Ubuntu 14.04.1'''&lt;br /&gt;
&lt;br /&gt;
This guide is a condensed reference on how to patch, compile and install the 4.1.5. kernel.&lt;br /&gt;
&lt;br /&gt;
Download kernel and patch:&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.5.tar.xz&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/projects/rt/4.1/older/patch-4.1.5-rt5.patch.gz&lt;br /&gt;
&lt;br /&gt;
use sudo mode:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /home/car01/Downloads&lt;br /&gt;
Extract kernel archive and patch file:&lt;br /&gt;
 tar -Jxf linux-4.1.5.tar.xz&lt;br /&gt;
 gzip -d patch-4.1.5-rt5.patch.gz&lt;br /&gt;
Put the patch file one directory level above the kernel source.&lt;br /&gt;
 mv linux-4.1.5 /usr/src&lt;br /&gt;
 cp patch-4.1.5-rt5.patch /usr/src&lt;br /&gt;
&lt;br /&gt;
Change directory to the newly created kernel source directory&lt;br /&gt;
 cd /usr/src/linux-4.1.5&lt;br /&gt;
&lt;br /&gt;
Apply the patch to the kernel.&lt;br /&gt;
&lt;br /&gt;
 less ../patch-4.1.5-rt5.patch | patch -p1&lt;br /&gt;
&lt;br /&gt;
Get the latest configuration of new kernel&lt;br /&gt;
 make oldconfig&lt;br /&gt;
&lt;br /&gt;
The make will ask some questions, answer with the default option, '''EXCEPT''' the options about real time and debug mode. When asked for:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Preemption Model&amp;quot;&lt;br /&gt;
** Choose &amp;quot;5. Fully Preemptible Kernel (RT) (PREEMPT_RT_FULL) (NEW)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Debug preemptible kernel (DEBUG_PREEMPT)&amp;quot;&lt;br /&gt;
** Choose &amp;quot;n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Open up the kernel configuration tool:&lt;br /&gt;
 make menuconfig&lt;br /&gt;
&lt;br /&gt;
To configure the IP_TABLES NAT support:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
On the Kernel Configuration go to:&lt;br /&gt;
 Networking support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter) &amp;gt; IP: Netfilter Configuration&lt;br /&gt;
 Find the options listed below and mark with &amp;lt;M&amp;gt;&lt;br /&gt;
 	&amp;lt;M&amp;gt; IP tables support (required for filtering/masq/NAT) &lt;br /&gt;
 Other options will apear:&lt;br /&gt;
	&amp;lt;M&amp;gt; MASQUERADE target support&lt;br /&gt;
	&amp;lt;M&amp;gt; NETMAP tarrget support&lt;br /&gt;
	&amp;lt;M&amp;gt; REDIRECT target support&lt;br /&gt;
 save and exit&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
Build and install the kernel:&lt;br /&gt;
&lt;br /&gt;
 make -j 24&lt;br /&gt;
 make -j 24 modules&lt;br /&gt;
 make -j 24 INSTALL_MOD_STRIP=1 modules_install&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -s linux-4.1.5 linux&lt;br /&gt;
&lt;br /&gt;
Update the bootloader (probably grub) if not done automatically.&lt;br /&gt;
&lt;br /&gt;
restart the computer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check if the iptables_nat is working:&lt;br /&gt;
&lt;br /&gt;
 iptables -t nat -L&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 If shows the following error:&lt;br /&gt;
   iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)&lt;br /&gt;
   Perhaps iptables or your kernel needs to be upgraded.&lt;br /&gt;
Back to the step of menu configuration tool:make menuconfig and check the iptables options. If is ok, try the solution:&lt;br /&gt;
     cd /usr/src/linux-4.1.5&lt;br /&gt;
     sudo make menuconfig&lt;br /&gt;
  Go to menu Networking Support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter)&lt;br /&gt;
  and press spacebar to mark with star&lt;br /&gt;
  Entry in this menu and go to Core Netfilter Configuration. Fill all options with M EXCEPT the options &lt;br /&gt;
  below that should be filled with star :&lt;br /&gt;
	&amp;quot;Netfilter connection tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking flow accounting&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection mark tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking security mark support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking events&amp;quot; and &lt;br /&gt;
	&amp;quot;Netfilter Xtables support (required for ip_tables)&amp;quot;&lt;br /&gt;
   And the option &amp;quot;Enable obsolete /proc/net/ipt_recent&amp;quot; doesn't should be filled.&lt;br /&gt;
   Save changes and exit. &lt;br /&gt;
  BACK TO THE '''Build and install the kernel''' STEP in this tutorial.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using RAID and partition isn't recognized, install the package and reboot:&lt;br /&gt;
 sudo apt-get install dmraid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Nvidia Graphics Driver (352.41) for the Realtime Kernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;After installing the realtime kernel as described above, Nvidia graphics card owners will probably want&lt;br /&gt;
 to install the official graphics driver from Nvidia (if you're using Ardour you're going to need this driver &lt;br /&gt;
 to get smooth GUI performance). Unfortunately, the installer will just complain about the realtime kernel and&lt;br /&gt;
 quit. With some tweaks it is possible to install it nevertheless. This article describes the installation of the&lt;br /&gt;
 Nvidia driver version 352.41. For different versions you will need a different patch file or perform the patch manually.&lt;br /&gt;
&lt;br /&gt;
 Warning: I found that the driver sometimes locks itself up on my system, leading to a frozen image.&lt;br /&gt;
 If 100% stability is a requirement for you, you should not install it. During the installation you will &lt;br /&gt;
 need to stop your desktop session so consider printing this guide or open it up on a different device.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead if you're ready:&lt;br /&gt;
&lt;br /&gt;
Download the driver package from your local nvidia page:&lt;br /&gt;
 http://www.nvidia.com/Download/index.aspx&lt;br /&gt;
Make a patch file as follows: &lt;br /&gt;
 [[nvidia-352.41-rt.patch]]&lt;br /&gt;
Open a console and change directory to the folder where you downloaded the driver package to.&lt;br /&gt;
&lt;br /&gt;
Make the driver package executable:&lt;br /&gt;
 chmod +x NVIDIA-Linux-x86_64-352.41.run&lt;br /&gt;
&lt;br /&gt;
Extract the driver source:&lt;br /&gt;
 ./NVIDIA-Linux-x86_64-352.41.run --extract-only&lt;br /&gt;
&lt;br /&gt;
Apply the patch file:&lt;br /&gt;
 less nvidia-352.41-rt.patch | patch NVIDIA-Linux-x86_64-352.41/kernel/nv-linux.h&lt;br /&gt;
&lt;br /&gt;
Press Ctrl+Alt+F1 to open up a terminal session and login as root to stop your X Sever. If you're using XFCE (UbuntuStudio) this is LightDM. Beware that this kills all programs running in the GUI session, including the browser you might be reading this article in:&lt;br /&gt;
 /etc/init.d/lightdm stop&lt;br /&gt;
&lt;br /&gt;
Set this environment variable to disable the a check for the realtime kernel patch in the installer:&lt;br /&gt;
 export IGNORE_PREEMPT_RT_PRESENCE=1&lt;br /&gt;
&lt;br /&gt;
Change directory to the folder where the nvidia driver source was extracted to. &lt;br /&gt;
Run the installer just like you normally would:&lt;br /&gt;
 ./nvidia-installer&lt;br /&gt;
Restart your desktop manager:&lt;br /&gt;
 /etc/init.d/lightdm start&lt;br /&gt;
&lt;br /&gt;
Check if the driver was install correctly,  deve mostrar as informações da placa de video&lt;br /&gt;
 $ nvidia-settings&lt;br /&gt;
&lt;br /&gt;
Your system should now use the freshly installed driver!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;If you want to adapt this process for a different driver version, you will need to take a look what the patch actually&lt;br /&gt;
 does and make those changes to the nv-linux.h file manually. If you do so, it would be very nice of you to create a new patch &lt;br /&gt;
 file and post it here in the comments. Of course, there's no guarantee that this will work for newer driver versions.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para instalar o cuda siga as instruções do Getting_Started: http://developer.download.nvidia.com/compute/cuda/6_5/rel/docs/CUDA_Getting_Started_Linux.pdf&lt;br /&gt;
&lt;br /&gt;
Use o instador .run&lt;br /&gt;
&lt;br /&gt;
Na instalação vai aparecer algumas perguntas, Siga essas respostas.&lt;br /&gt;
&lt;br /&gt;
 Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.29? ((y)es/(n)o/(q)uit): n&lt;br /&gt;
 Install the CUDA 6.5 Toolkit? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter Toolkit Location [ default is /usr/local/cuda-6.5 ]: &lt;br /&gt;
 Do you want to install a symbolic link at /usr/local/cuda? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Install the CUDA 6.5 Samples? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter CUDA Samples Location [ default is /home/car01 ]: &lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
http://linuxaudioproduction.blogspot.com.br/2015/09/how-to-patching-and-compiling-nvidia.html&lt;br /&gt;
&lt;br /&gt;
https://devtalk.nvidia.com/default/topic/572468/nvidia-325-15-linux-rt-old-amp-amp-new-nvidia-rt-patch-methods-questions-about-nvidia-installer/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Possíveis problemas ==&lt;br /&gt;
&lt;br /&gt;
Error NVRM/VGA com o driver da nvidia:&lt;br /&gt;
&lt;br /&gt;
use o comando:&lt;br /&gt;
sudo dmesg | tail&lt;br /&gt;
Se ocorrer os seguintes erros:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[   15.458823] NVRM: Your system is not currently configured to drive a VGA console&lt;br /&gt;
[   15.458830] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver&lt;br /&gt;
[   15.458834] NVRM: requires the use of a text-mode VGA console. Use of other console&lt;br /&gt;
[   15.458838] NVRM: drivers including, but not limited to, vesafb, may result in&lt;br /&gt;
[   15.458841] NVRM: corruption and stability problems, and is not supported.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adicione a seguinte linha no arquivo  /boot/grub/grub.cfg ao fim da linha do kernel&lt;br /&gt;
 &lt;br /&gt;
video=vesa:off vga=normal&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
menuentry 'Ubuntu' --class ubuntu...&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
linux    /boot/vmlinuz-4.1.5-rt5 root=UUID=f5a99a1a-15a4-4a83-a3fb-2adbee7f8311 ro quiet splash $vt_handoff '''video=vesa:off vga=normal'''&lt;br /&gt;
&lt;br /&gt;
(..)&lt;br /&gt;
&lt;br /&gt;
verificar nesse link&lt;br /&gt;
 https://bbs.archlinux.org/viewtopic.php?id=143569&lt;br /&gt;
&lt;br /&gt;
Erro na resolução do monitor.&lt;br /&gt;
Entre na configurações da nvidia como super usuário&lt;br /&gt;
 &lt;br /&gt;
 $ sudo nvidia-settings &lt;br /&gt;
&lt;br /&gt;
Em X Server Display Configuration, restaure a configuração do X server clicando no botão de &amp;quot;Reset&amp;quot;. Após isso reinicie a maquina.&lt;br /&gt;
&lt;br /&gt;
Feito isso, volte na mesma aba da nvidia-settings. Verifique no campo &amp;quot;Selection&amp;quot; se o aparece o seu monitor. Depois mude a resolução do monitor para uma configuração maior e salve a configuração em &amp;quot;Save to X Configuration File&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81387</id>
		<title>Criando Kernel RT Ubuntu 14.04</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81387"/>
				<updated>2017-11-30T15:47:46Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Todas as informacoes aqui foram retiradas de: http://linuxaudioproduction.blogspot.com.br/2015/09/patching-compiling-and-installing.html&lt;br /&gt;
&lt;br /&gt;
'''Testado com o Ubuntu 14.04.1'''&lt;br /&gt;
&lt;br /&gt;
This guide is a condensed reference on how to patch, compile and install the 4.1.5. kernel.&lt;br /&gt;
&lt;br /&gt;
Download kernel and patch:&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.5.tar.xz&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/projects/rt/4.1/older/patch-4.1.5-rt5.patch.gz&lt;br /&gt;
&lt;br /&gt;
use sudo mode:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /home/car01/Downloads&lt;br /&gt;
Extract kernel archive and patch file:&lt;br /&gt;
 tar -Jxf linux-4.1.5.tar.xz&lt;br /&gt;
 gzip -d patch-4.1.5-rt5.patch.gz&lt;br /&gt;
Put the patch file one directory level above the kernel source.&lt;br /&gt;
 mv linux-4.1.5 /usr/src&lt;br /&gt;
 cp patch-4.1.5-rt5.patch /usr/src&lt;br /&gt;
&lt;br /&gt;
Change directory to the newly created kernel source directory&lt;br /&gt;
 cd /usr/src/linux-4.1.5&lt;br /&gt;
&lt;br /&gt;
Apply the patch to the kernel.&lt;br /&gt;
&lt;br /&gt;
 less ../patch-4.1.5-rt5.patch | patch -p1&lt;br /&gt;
&lt;br /&gt;
Get the latest configuration of new kernel&lt;br /&gt;
 make oldconfig&lt;br /&gt;
&lt;br /&gt;
The make will ask some questions, answer with the default option, '''EXCEPT''' the options about real time and debug mode. When asked for:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Preemption Model&amp;quot;&lt;br /&gt;
** Choose &amp;quot;5. Fully Preemptible Kernel (RT) (PREEMPT_RT_FULL) (NEW)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Debug preemptible kernel (DEBUG_PREEMPT)&amp;quot;&lt;br /&gt;
** Choose &amp;quot;n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Open up the kernel configuration tool:&lt;br /&gt;
 make menuconfig&lt;br /&gt;
&lt;br /&gt;
To configure the IP_TABLES NAT support:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
On the Kernel Configuration go to:&lt;br /&gt;
 Networking support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter) &amp;gt; IP: Netfilter Configuration&lt;br /&gt;
 Find the options listed below and mark with &amp;lt;M&amp;gt;&lt;br /&gt;
 	&amp;lt;M&amp;gt; IP tables support (required for filtering/masq/NAT) &lt;br /&gt;
 Other options will apear:&lt;br /&gt;
	&amp;lt;M&amp;gt; MASQUERADE target support&lt;br /&gt;
	&amp;lt;M&amp;gt; NETMAP tarrget support&lt;br /&gt;
	&amp;lt;M&amp;gt; REDIRECT target support&lt;br /&gt;
 save and exit&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
Build and install the kernel:&lt;br /&gt;
&lt;br /&gt;
 make -j 24&lt;br /&gt;
 make -j 24 modules&lt;br /&gt;
 make INSTALL_MOD_STRIP=1 modules_install&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -s linux-4.1.5 linux&lt;br /&gt;
&lt;br /&gt;
Update the bootloader (probably grub) if not done automatically.&lt;br /&gt;
&lt;br /&gt;
restart the computer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check if the iptables_nat is working:&lt;br /&gt;
&lt;br /&gt;
 iptables -t nat -L&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 If shows the following error:&lt;br /&gt;
   iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)&lt;br /&gt;
   Perhaps iptables or your kernel needs to be upgraded.&lt;br /&gt;
Back to the step of menu configuration tool:make menuconfig and check the iptables options. If is ok, try the solution:&lt;br /&gt;
     cd /usr/src/linux-4.1.5&lt;br /&gt;
     sudo make menuconfig&lt;br /&gt;
  Go to menu Networking Support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter)&lt;br /&gt;
  and press spacebar to mark with star&lt;br /&gt;
  Entry in this menu and go to Core Netfilter Configuration. Fill all options with M EXCEPT the options &lt;br /&gt;
  below that should be filled with star :&lt;br /&gt;
	&amp;quot;Netfilter connection tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking flow accounting&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection mark tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking security mark support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking events&amp;quot; and &lt;br /&gt;
	&amp;quot;Netfilter Xtables support (required for ip_tables)&amp;quot;&lt;br /&gt;
   And the option &amp;quot;Enable obsolete /proc/net/ipt_recent&amp;quot; doesn't should be filled.&lt;br /&gt;
   Save changes and exit. &lt;br /&gt;
  BACK TO THE '''Build and install the kernel''' STEP in this tutorial.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using RAID and partition isn't recognized, install the package and reboot:&lt;br /&gt;
 sudo apt-get install dmraid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Nvidia Graphics Driver (352.41) for the Realtime Kernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;After installing the realtime kernel as described above, Nvidia graphics card owners will probably want&lt;br /&gt;
 to install the official graphics driver from Nvidia (if you're using Ardour you're going to need this driver &lt;br /&gt;
 to get smooth GUI performance). Unfortunately, the installer will just complain about the realtime kernel and&lt;br /&gt;
 quit. With some tweaks it is possible to install it nevertheless. This article describes the installation of the&lt;br /&gt;
 Nvidia driver version 352.41. For different versions you will need a different patch file or perform the patch manually.&lt;br /&gt;
&lt;br /&gt;
 Warning: I found that the driver sometimes locks itself up on my system, leading to a frozen image.&lt;br /&gt;
 If 100% stability is a requirement for you, you should not install it. During the installation you will &lt;br /&gt;
 need to stop your desktop session so consider printing this guide or open it up on a different device.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead if you're ready:&lt;br /&gt;
&lt;br /&gt;
Download the driver package from your local nvidia page:&lt;br /&gt;
 http://www.nvidia.com/Download/index.aspx&lt;br /&gt;
Make a patch file as follows: &lt;br /&gt;
 [[nvidia-352.41-rt.patch]]&lt;br /&gt;
Open a console and change directory to the folder where you downloaded the driver package to.&lt;br /&gt;
&lt;br /&gt;
Make the driver package executable:&lt;br /&gt;
 chmod +x NVIDIA-Linux-x86_64-352.41.run&lt;br /&gt;
&lt;br /&gt;
Extract the driver source:&lt;br /&gt;
 ./NVIDIA-Linux-x86_64-352.41.run --extract-only&lt;br /&gt;
&lt;br /&gt;
Apply the patch file:&lt;br /&gt;
 less nvidia-352.41-rt.patch | patch NVIDIA-Linux-x86_64-352.41/kernel/nv-linux.h&lt;br /&gt;
&lt;br /&gt;
Press Ctrl+Alt+F1 to open up a terminal session and login as root to stop your X Sever. If you're using XFCE (UbuntuStudio) this is LightDM. Beware that this kills all programs running in the GUI session, including the browser you might be reading this article in:&lt;br /&gt;
 /etc/init.d/lightdm stop&lt;br /&gt;
&lt;br /&gt;
Set this environment variable to disable the a check for the realtime kernel patch in the installer:&lt;br /&gt;
 export IGNORE_PREEMPT_RT_PRESENCE=1&lt;br /&gt;
&lt;br /&gt;
Change directory to the folder where the nvidia driver source was extracted to. &lt;br /&gt;
Run the installer just like you normally would:&lt;br /&gt;
 ./nvidia-installer&lt;br /&gt;
Restart your desktop manager:&lt;br /&gt;
 /etc/init.d/lightdm start&lt;br /&gt;
&lt;br /&gt;
Check if the driver was install correctly,  deve mostrar as informações da placa de video&lt;br /&gt;
 $ nvidia-settings&lt;br /&gt;
&lt;br /&gt;
Your system should now use the freshly installed driver!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;If you want to adapt this process for a different driver version, you will need to take a look what the patch actually&lt;br /&gt;
 does and make those changes to the nv-linux.h file manually. If you do so, it would be very nice of you to create a new patch &lt;br /&gt;
 file and post it here in the comments. Of course, there's no guarantee that this will work for newer driver versions.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para instalar o cuda siga as instruções do Getting_Started: http://developer.download.nvidia.com/compute/cuda/6_5/rel/docs/CUDA_Getting_Started_Linux.pdf&lt;br /&gt;
&lt;br /&gt;
Use o instador .run&lt;br /&gt;
&lt;br /&gt;
Na instalação vai aparecer algumas perguntas, Siga essas respostas.&lt;br /&gt;
&lt;br /&gt;
 Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.29? ((y)es/(n)o/(q)uit): n&lt;br /&gt;
 Install the CUDA 6.5 Toolkit? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter Toolkit Location [ default is /usr/local/cuda-6.5 ]: &lt;br /&gt;
 Do you want to install a symbolic link at /usr/local/cuda? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Install the CUDA 6.5 Samples? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter CUDA Samples Location [ default is /home/car01 ]: &lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
http://linuxaudioproduction.blogspot.com.br/2015/09/how-to-patching-and-compiling-nvidia.html&lt;br /&gt;
&lt;br /&gt;
https://devtalk.nvidia.com/default/topic/572468/nvidia-325-15-linux-rt-old-amp-amp-new-nvidia-rt-patch-methods-questions-about-nvidia-installer/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Possíveis problemas ==&lt;br /&gt;
&lt;br /&gt;
Error NVRM/VGA com o driver da nvidia:&lt;br /&gt;
&lt;br /&gt;
use o comando:&lt;br /&gt;
sudo dmesg | tail&lt;br /&gt;
Se ocorrer os seguintes erros:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[   15.458823] NVRM: Your system is not currently configured to drive a VGA console&lt;br /&gt;
[   15.458830] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver&lt;br /&gt;
[   15.458834] NVRM: requires the use of a text-mode VGA console. Use of other console&lt;br /&gt;
[   15.458838] NVRM: drivers including, but not limited to, vesafb, may result in&lt;br /&gt;
[   15.458841] NVRM: corruption and stability problems, and is not supported.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adicione a seguinte linha no arquivo  /boot/grub/grub.cfg ao fim da linha do kernel&lt;br /&gt;
 &lt;br /&gt;
video=vesa:off vga=normal&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
menuentry 'Ubuntu' --class ubuntu...&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
linux    /boot/vmlinuz-4.1.5-rt5 root=UUID=f5a99a1a-15a4-4a83-a3fb-2adbee7f8311 ro quiet splash $vt_handoff '''video=vesa:off vga=normal'''&lt;br /&gt;
&lt;br /&gt;
(..)&lt;br /&gt;
&lt;br /&gt;
verificar nesse link&lt;br /&gt;
 https://bbs.archlinux.org/viewtopic.php?id=143569&lt;br /&gt;
&lt;br /&gt;
Erro na resolução do monitor.&lt;br /&gt;
Entre na configurações da nvidia como super usuário&lt;br /&gt;
 &lt;br /&gt;
 $ sudo nvidia-settings &lt;br /&gt;
&lt;br /&gt;
Em X Server Display Configuration, restaure a configuração do X server clicando no botão de &amp;quot;Reset&amp;quot;. Após isso reinicie a maquina.&lt;br /&gt;
&lt;br /&gt;
Feito isso, volte na mesma aba da nvidia-settings. Verifique no campo &amp;quot;Selection&amp;quot; se o aparece o seu monitor. Depois mude a resolução do monitor para uma configuração maior e salve a configuração em &amp;quot;Save to X Configuration File&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81386</id>
		<title>Criando Kernel RT Ubuntu 14.04</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81386"/>
				<updated>2017-11-30T15:46:31Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Todas as informacoes aqui foram retiradas de: http://linuxaudioproduction.blogspot.com.br/2015/09/patching-compiling-and-installing.html&lt;br /&gt;
&lt;br /&gt;
'''Testado com o Ubuntu 14.04.1'''&lt;br /&gt;
&lt;br /&gt;
This guide is a condensed reference on how to patch, compile and install the 4.1.5. kernel.&lt;br /&gt;
&lt;br /&gt;
Download kernel and patch:&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.5.tar.xz&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/projects/rt/4.1/older/patch-4.1.5-rt5.patch.gz&lt;br /&gt;
&lt;br /&gt;
use sudo mode:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /home/car01/Downloads&lt;br /&gt;
Extract kernel archive and patch file:&lt;br /&gt;
 tar -Jxf linux-4.1.5.tar.xz&lt;br /&gt;
 gzip -d patch-4.1.5-rt5.patch.gz&lt;br /&gt;
Put the patch file one directory level above the kernel source.&lt;br /&gt;
 mv linux-4.1.5 /usr/src&lt;br /&gt;
 cp patch-4.1.5-rt5.patch /usr/src&lt;br /&gt;
&lt;br /&gt;
Change directory to the newly created kernel source directory&lt;br /&gt;
 cd /usr/src/linux-4.1.5&lt;br /&gt;
&lt;br /&gt;
Apply the patch to the kernel.&lt;br /&gt;
&lt;br /&gt;
 less ../patch-4.1.5-rt5.patch | patch -p1&lt;br /&gt;
&lt;br /&gt;
Get the latest configuration of new kernel&lt;br /&gt;
 make oldconfig&lt;br /&gt;
&lt;br /&gt;
The make will ask some questions, answer with the default option, '''EXCEPT''' the options about real time and debug mode. When asked for:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Preemption Model&amp;quot;&lt;br /&gt;
** Choose &amp;quot;5. Fully Preemptible Kernel (RT) (PREEMPT_RT_FULL) (NEW)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Debug preemptible kernel (DEBUG_PREEMPT)&amp;quot;&lt;br /&gt;
** Choose &amp;quot;n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Open up the kernel configuration tool:&lt;br /&gt;
 make menuconfig&lt;br /&gt;
&lt;br /&gt;
To configure the IP_TABLES NAT support:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
On the Kernel Configuration go to:&lt;br /&gt;
 Networking support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter) &amp;gt; IP: Netfilter Configuration&lt;br /&gt;
 Find the options listed below and mark with &amp;lt;M&amp;gt;&lt;br /&gt;
 	&amp;lt;M&amp;gt; IP tables support (required for filtering/masq/NAT) &lt;br /&gt;
 Other options will apear:&lt;br /&gt;
	&amp;lt;M&amp;gt; MASQUERADE target support&lt;br /&gt;
	&amp;lt;M&amp;gt; NETMAP tarrget support&lt;br /&gt;
	&amp;lt;M&amp;gt; REDIRECT target support&lt;br /&gt;
 save and exit&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
Build and install the kernel:&lt;br /&gt;
&lt;br /&gt;
 make -j 24&lt;br /&gt;
 make -j 24 modules&lt;br /&gt;
 make INSTALL_MOD_STRIP=1 modules_install&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -s linux-4.1.5 linux&lt;br /&gt;
&lt;br /&gt;
Update the bootloader (probably grub) if not done automatically.&lt;br /&gt;
&lt;br /&gt;
restart the computer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check if the iptables_nat is working:&lt;br /&gt;
&lt;br /&gt;
 iptables -t nat -L&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 If shows the following error:&lt;br /&gt;
   iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)&lt;br /&gt;
   Perhaps iptables or your kernel needs to be upgraded.&lt;br /&gt;
Back to the step of menu configuration tool:make menuconfig and check the iptables options. If is ok, try the solution:&lt;br /&gt;
     cd /usr/src/linux-4.1.5&lt;br /&gt;
     sudo make menuconfig&lt;br /&gt;
  Go to menu Networking Support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter)&lt;br /&gt;
  and press spacebar to mark with star&lt;br /&gt;
  Entry in this menu and go to Core Netfilter Configuration. Fill all options with M EXCEPT the options &lt;br /&gt;
  below that should be filled with star :&lt;br /&gt;
	&amp;quot;Netfilter connection tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking flow accounting&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection mark tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking security mark support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking events&amp;quot; and &lt;br /&gt;
	&amp;quot;Netfilter Xtables support (required for ip_tables)&amp;quot;&lt;br /&gt;
   And the option &amp;quot;Enable obsolete /proc/net/ipt_recent&amp;quot; doesn't should be filled.&lt;br /&gt;
   Save changes and exit. &lt;br /&gt;
  BACK TO THE '''Build and install the kernel''' STEP in this tutorial.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using RAID and partition isn't recognized, install the package and reboot:&lt;br /&gt;
 sudo apt-get install dmraid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Nvidia Graphics Driver (352.41) for the Realtime Kernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;After installing the realtime kernel as described above, Nvidia graphics card owners will probably want&lt;br /&gt;
 to install the official graphics driver from Nvidia (if you're using Ardour you're going to need this driver &lt;br /&gt;
 to get smooth GUI performance). Unfortunately, the installer will just complain about the realtime kernel and&lt;br /&gt;
 quit. With some tweaks it is possible to install it nevertheless. This article describes the installation of the&lt;br /&gt;
 Nvidia driver version 352.41. For different versions you will need a different patch file or perform the patch manually.&lt;br /&gt;
&lt;br /&gt;
 Warning: I found that the driver sometimes locks itself up on my system, leading to a frozen image.&lt;br /&gt;
 If 100% stability is a requirement for you, you should not install it. During the installation you will &lt;br /&gt;
 need to stop your desktop session so consider printing this guide or open it up on a different device.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead if you're ready:&lt;br /&gt;
&lt;br /&gt;
Download the driver package from your local nvidia page:&lt;br /&gt;
 http://www.nvidia.com/Download/index.aspx&lt;br /&gt;
Make a patch file as follows: &lt;br /&gt;
 [[nvidia-352.41-rt.patch]]&lt;br /&gt;
Open a console and change directory to the folder where you downloaded the driver package to.&lt;br /&gt;
&lt;br /&gt;
Make the driver package executable:&lt;br /&gt;
 chmod +x NVIDIA-Linux-x86_64-352.41.run&lt;br /&gt;
&lt;br /&gt;
Extract the driver source:&lt;br /&gt;
 ./NVIDIA-Linux-x86_64-352.41.run --extract-only&lt;br /&gt;
&lt;br /&gt;
Apply the patch file:&lt;br /&gt;
 less nvidia-352.41-rt.patch | patch NVIDIA-Linux-x86_64-352.41/kernel/nv-linux.h&lt;br /&gt;
&lt;br /&gt;
Press Ctrl+Alt+F1 to open up a terminal session and login as root.&lt;br /&gt;
Stop your desktop manager. If you're using XFCE (UbuntuStudio) this is LightDM. Beware that this kills all programs running in the GUI session, including the browser you might be reading this article in:&lt;br /&gt;
 /etc/init.d/lightdm stop&lt;br /&gt;
&lt;br /&gt;
Set this environment variable to disable the a check for the realtime kernel patch in the installer:&lt;br /&gt;
 export IGNORE_PREEMPT_RT_PRESENCE=1&lt;br /&gt;
&lt;br /&gt;
Change directory to the folder where the nvidia driver source was extracted to. &lt;br /&gt;
Run the installer just like you normally would:&lt;br /&gt;
 ./nvidia-installer&lt;br /&gt;
Restart your desktop manager:&lt;br /&gt;
 /etc/init.d/lightdm start&lt;br /&gt;
&lt;br /&gt;
Check if the driver was install correctly,  deve mostrar as informações da placa de video&lt;br /&gt;
 $ nvidia-settings&lt;br /&gt;
&lt;br /&gt;
Your system should now use the freshly installed driver!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;If you want to adapt this process for a different driver version, you will need to take a look what the patch actually&lt;br /&gt;
 does and make those changes to the nv-linux.h file manually. If you do so, it would be very nice of you to create a new patch &lt;br /&gt;
 file and post it here in the comments. Of course, there's no guarantee that this will work for newer driver versions.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para instalar o cuda siga as instruções do Getting_Started: http://developer.download.nvidia.com/compute/cuda/6_5/rel/docs/CUDA_Getting_Started_Linux.pdf&lt;br /&gt;
&lt;br /&gt;
Use o instador .run&lt;br /&gt;
&lt;br /&gt;
Na instalação vai aparecer algumas perguntas, Siga essas respostas.&lt;br /&gt;
&lt;br /&gt;
 Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.29? ((y)es/(n)o/(q)uit): n&lt;br /&gt;
 Install the CUDA 6.5 Toolkit? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter Toolkit Location [ default is /usr/local/cuda-6.5 ]: &lt;br /&gt;
 Do you want to install a symbolic link at /usr/local/cuda? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Install the CUDA 6.5 Samples? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter CUDA Samples Location [ default is /home/car01 ]: &lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
http://linuxaudioproduction.blogspot.com.br/2015/09/how-to-patching-and-compiling-nvidia.html&lt;br /&gt;
&lt;br /&gt;
https://devtalk.nvidia.com/default/topic/572468/nvidia-325-15-linux-rt-old-amp-amp-new-nvidia-rt-patch-methods-questions-about-nvidia-installer/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Possíveis problemas ==&lt;br /&gt;
&lt;br /&gt;
Error NVRM/VGA com o driver da nvidia:&lt;br /&gt;
&lt;br /&gt;
use o comando:&lt;br /&gt;
sudo dmesg | tail&lt;br /&gt;
Se ocorrer os seguintes erros:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[   15.458823] NVRM: Your system is not currently configured to drive a VGA console&lt;br /&gt;
[   15.458830] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver&lt;br /&gt;
[   15.458834] NVRM: requires the use of a text-mode VGA console. Use of other console&lt;br /&gt;
[   15.458838] NVRM: drivers including, but not limited to, vesafb, may result in&lt;br /&gt;
[   15.458841] NVRM: corruption and stability problems, and is not supported.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adicione a seguinte linha no arquivo  /boot/grub/grub.cfg ao fim da linha do kernel&lt;br /&gt;
 &lt;br /&gt;
video=vesa:off vga=normal&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
menuentry 'Ubuntu' --class ubuntu...&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
linux    /boot/vmlinuz-4.1.5-rt5 root=UUID=f5a99a1a-15a4-4a83-a3fb-2adbee7f8311 ro quiet splash $vt_handoff '''video=vesa:off vga=normal'''&lt;br /&gt;
&lt;br /&gt;
(..)&lt;br /&gt;
&lt;br /&gt;
verificar nesse link&lt;br /&gt;
 https://bbs.archlinux.org/viewtopic.php?id=143569&lt;br /&gt;
&lt;br /&gt;
Erro na resolução do monitor.&lt;br /&gt;
Entre na configurações da nvidia como super usuário&lt;br /&gt;
 &lt;br /&gt;
 $ sudo nvidia-settings &lt;br /&gt;
&lt;br /&gt;
Em X Server Display Configuration, restaure a configuração do X server clicando no botão de &amp;quot;Reset&amp;quot;. Após isso reinicie a maquina.&lt;br /&gt;
&lt;br /&gt;
Feito isso, volte na mesma aba da nvidia-settings. Verifique no campo &amp;quot;Selection&amp;quot; se o aparece o seu monitor. Depois mude a resolução do monitor para uma configuração maior e salve a configuração em &amp;quot;Save to X Configuration File&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81385</id>
		<title>Criando Kernel RT Ubuntu 14.04</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81385"/>
				<updated>2017-11-30T15:40:43Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Todas as informacoes aqui foram retiradas de: http://linuxaudioproduction.blogspot.com.br/2015/09/patching-compiling-and-installing.html&lt;br /&gt;
&lt;br /&gt;
'''Testado com o Ubuntu 14.04.1'''&lt;br /&gt;
&lt;br /&gt;
This guide is a condensed reference on how to patch, compile and install the 4.1.5. kernel.&lt;br /&gt;
&lt;br /&gt;
Download kernel and patch:&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.5.tar.xz&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/projects/rt/4.1/older/patch-4.1.5-rt5.patch.gz&lt;br /&gt;
&lt;br /&gt;
use sudo mode:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /home/car01/Downloads&lt;br /&gt;
Extract kernel archive and patch file:&lt;br /&gt;
 tar -Jxf linux-4.1.5.tar.xz&lt;br /&gt;
 gzip -d patch-4.1.5-rt5.patch.gz&lt;br /&gt;
Put the patch file one directory level above the kernel source.&lt;br /&gt;
 mv linux-4.1.5 /usr/src&lt;br /&gt;
 cp patch-4.1.5-rt5.patch /usr/src&lt;br /&gt;
&lt;br /&gt;
Change directory to the newly created kernel source directory&lt;br /&gt;
 cd /usr/src/linux-4.1.5&lt;br /&gt;
&lt;br /&gt;
Apply the patch to the kernel.&lt;br /&gt;
&lt;br /&gt;
 less ../patch-4.1.5-rt5.patch | patch -p1&lt;br /&gt;
&lt;br /&gt;
Get the latest configuration of new kernel&lt;br /&gt;
 make oldconfig&lt;br /&gt;
&lt;br /&gt;
The make will ask some questions, answer with the default option, '''EXCEPT''' the options about real time and debug mode. When asked for:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Preemption Model&amp;quot;&lt;br /&gt;
** Choose &amp;quot;5. Fully Preemptible Kernel (RT) (PREEMPT_RT_FULL) (NEW)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Debug preemptible kernel (DEBUG_PREEMPT)&amp;quot;&lt;br /&gt;
** Choose &amp;quot;n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Open up the kernel configuration tool:&lt;br /&gt;
 make menuconfig&lt;br /&gt;
&lt;br /&gt;
To configure the IP_TABLES NAT support:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
On the Kernel Configuration go to:&lt;br /&gt;
 Networking support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter) &amp;gt; IP: Netfilter Configuration&lt;br /&gt;
 Find the options listed below and mark with &amp;lt;M&amp;gt;&lt;br /&gt;
 	&amp;lt;M&amp;gt; IP tables support (required for filtering/masq/NAT) &lt;br /&gt;
 Other options will apear:&lt;br /&gt;
	&amp;lt;M&amp;gt; MASQUERADE target support&lt;br /&gt;
	&amp;lt;M&amp;gt; NETMAP tarrget support&lt;br /&gt;
	&amp;lt;M&amp;gt; REDIRECT target support&lt;br /&gt;
 save and exit&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
Build and install the kernel:&lt;br /&gt;
&lt;br /&gt;
 make -j 24&lt;br /&gt;
 make -j 24 modules&lt;br /&gt;
 make INSTALL_MOD_STRIP=1 modules_install&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -s linux-4.1.5 linux&lt;br /&gt;
&lt;br /&gt;
Update the bootloader (probably grub) if not done automatically.&lt;br /&gt;
&lt;br /&gt;
restart the computer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check if the iptables_nat is working:&lt;br /&gt;
&lt;br /&gt;
 iptables -t nat -L&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 If shows the following error:&lt;br /&gt;
   iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)&lt;br /&gt;
   Perhaps iptables or your kernel needs to be upgraded.&lt;br /&gt;
Back to the step of menu configuration tool:make menuconfig and check the iptables options. If is ok, try the solution:&lt;br /&gt;
     cd /usr/src/linux-4.1.5&lt;br /&gt;
     sudo make menuconfig&lt;br /&gt;
  Go to menu Networking Support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter)&lt;br /&gt;
  and press spacebar to mark with star&lt;br /&gt;
  Entry in this menu and go to Core Netfilter Configuration. Fill all options with M EXCEPT the options &lt;br /&gt;
  below that should be filled with star :&lt;br /&gt;
	&amp;quot;Netfilter connection tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking flow accounting&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection mark tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking security mark support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking events&amp;quot; and &lt;br /&gt;
	&amp;quot;Netfilter Xtables support (required for ip_tables)&amp;quot;&lt;br /&gt;
   And the option &amp;quot;Enable obsolete /proc/net/ipt_recent&amp;quot; doesn't should be filled.&lt;br /&gt;
   Save changes and exit. &lt;br /&gt;
  BACK TO THE '''Build and install the kernel''' STEP in this tutorial.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using RAID and partition isn't recognized, install the package and reboot:&lt;br /&gt;
 sudo apt-get install dmraid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Nvidia Graphics Driver (352.41) for the Realtime Kernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;After installing the realtime kernel as described above, Nvidia graphics card owners will probably want&lt;br /&gt;
 to install the official graphics driver from Nvidia (if you're using Ardour you're going to need this driver &lt;br /&gt;
 to get smooth GUI performance). Unfortunately, the installer will just complain about the realtime kernel and&lt;br /&gt;
 quit. With some tweaks it is possible to install it nevertheless. This article describes the installation of the&lt;br /&gt;
 Nvidia driver version 352.41. For different versions you will need a different patch file or perform the patch manually.&lt;br /&gt;
&lt;br /&gt;
 Warning: I found that the driver sometimes locks itself up on my system, leading to a frozen image.&lt;br /&gt;
 If 100% stability is a requirement for you, you should not install it. During the installation you will &lt;br /&gt;
 need to stop your desktop session so consider printing this guide or open it up on a different device.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead if you're ready:&lt;br /&gt;
&lt;br /&gt;
Download the driver package from your local nvidia page:&lt;br /&gt;
 http://www.nvidia.com/Download/index.aspx&lt;br /&gt;
Make a patch file as follows: &lt;br /&gt;
 [[nvidia-352.41-rt.patch]]&lt;br /&gt;
Open a console and change directory to the folder where you downloaded the driver package to.&lt;br /&gt;
&lt;br /&gt;
Make the driver package executable:&lt;br /&gt;
 chmod +x NVIDIA-Linux-x86_64-352.41.run&lt;br /&gt;
&lt;br /&gt;
Extract the driver source:&lt;br /&gt;
 ./NVIDIA-Linux-x86_64-352.41.run --extract-only&lt;br /&gt;
&lt;br /&gt;
Apply the patch file:&lt;br /&gt;
 less nvidia-352.41-rt.patch | patch NVIDIA-Linux-x86_64-352.41/kernel/nv-linux.h&lt;br /&gt;
&lt;br /&gt;
Press Ctrl+Alt+F1 to open up a terminal session and login as root&lt;br /&gt;
Stop your desktop manager. If you're using XFCE (UbuntuStudio) this is LightDM. Beware that this kills all programs running in the GUI session, including the browser you might be reading this article in:&lt;br /&gt;
 /etc/init.d/lightdm stop&lt;br /&gt;
&lt;br /&gt;
Set this environment variable to disable the a check for the realtime kernel patch in the installer:&lt;br /&gt;
 export IGNORE_PREEMPT_RT_PRESENCE=1&lt;br /&gt;
&lt;br /&gt;
Change directory to the folder where the nvidia driver source was extracted to. &lt;br /&gt;
Run the installer just like you normally would:&lt;br /&gt;
 ./nvidia-installer&lt;br /&gt;
Restart your desktop manager:&lt;br /&gt;
 /etc/init.d/lightdm start&lt;br /&gt;
&lt;br /&gt;
Check if the driver was install correctly,  deve mostrar as informações da placa de video&lt;br /&gt;
 $ nvidia-settings&lt;br /&gt;
&lt;br /&gt;
Your system should now use the freshly installed driver!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;If you want to adapt this process for a different driver version, you will need to take a look what the patch actually&lt;br /&gt;
 does and make those changes to the nv-linux.h file manually. If you do so, it would be very nice of you to create a new patch &lt;br /&gt;
 file and post it here in the comments. Of course, there's no guarantee that this will work for newer driver versions.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para instalar o cuda siga as instruções do Getting_Started: http://developer.download.nvidia.com/compute/cuda/6_5/rel/docs/CUDA_Getting_Started_Linux.pdf&lt;br /&gt;
&lt;br /&gt;
Use o instador .run&lt;br /&gt;
&lt;br /&gt;
Na instalação vai aparecer algumas perguntas, Siga essas respostas.&lt;br /&gt;
&lt;br /&gt;
 Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.29? ((y)es/(n)o/(q)uit): n&lt;br /&gt;
 Install the CUDA 6.5 Toolkit? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter Toolkit Location [ default is /usr/local/cuda-6.5 ]: &lt;br /&gt;
 Do you want to install a symbolic link at /usr/local/cuda? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Install the CUDA 6.5 Samples? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter CUDA Samples Location [ default is /home/car01 ]: &lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
http://linuxaudioproduction.blogspot.com.br/2015/09/how-to-patching-and-compiling-nvidia.html&lt;br /&gt;
&lt;br /&gt;
https://devtalk.nvidia.com/default/topic/572468/nvidia-325-15-linux-rt-old-amp-amp-new-nvidia-rt-patch-methods-questions-about-nvidia-installer/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Possíveis problemas ==&lt;br /&gt;
&lt;br /&gt;
Error NVRM/VGA com o driver da nvidia:&lt;br /&gt;
&lt;br /&gt;
use o comando:&lt;br /&gt;
sudo dmesg | tail&lt;br /&gt;
Se ocorrer os seguintes erros:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[   15.458823] NVRM: Your system is not currently configured to drive a VGA console&lt;br /&gt;
[   15.458830] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver&lt;br /&gt;
[   15.458834] NVRM: requires the use of a text-mode VGA console. Use of other console&lt;br /&gt;
[   15.458838] NVRM: drivers including, but not limited to, vesafb, may result in&lt;br /&gt;
[   15.458841] NVRM: corruption and stability problems, and is not supported.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adicione a seguinte linha no arquivo  /boot/grub/grub.cfg ao fim da linha do kernel&lt;br /&gt;
 &lt;br /&gt;
video=vesa:off vga=normal&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
menuentry 'Ubuntu' --class ubuntu...&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
linux    /boot/vmlinuz-4.1.5-rt5 root=UUID=f5a99a1a-15a4-4a83-a3fb-2adbee7f8311 ro quiet splash $vt_handoff '''video=vesa:off vga=normal'''&lt;br /&gt;
&lt;br /&gt;
(..)&lt;br /&gt;
&lt;br /&gt;
verificar nesse link&lt;br /&gt;
 https://bbs.archlinux.org/viewtopic.php?id=143569&lt;br /&gt;
&lt;br /&gt;
Erro na resolução do monitor.&lt;br /&gt;
Entre na configurações da nvidia como super usuário&lt;br /&gt;
 &lt;br /&gt;
 $ sudo nvidia-settings &lt;br /&gt;
&lt;br /&gt;
Em X Server Display Configuration, restaure a configuração do X server clicando no botão de &amp;quot;Reset&amp;quot;. Após isso reinicie a maquina.&lt;br /&gt;
&lt;br /&gt;
Feito isso, volte na mesma aba da nvidia-settings. Verifique no campo &amp;quot;Selection&amp;quot; se o aparece o seu monitor. Depois mude a resolução do monitor para uma configuração maior e salve a configuração em &amp;quot;Save to X Configuration File&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81384</id>
		<title>Criando Kernel RT Ubuntu 14.04</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81384"/>
				<updated>2017-11-30T15:37:17Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Todas as informacoes aqui foram retiradas de: http://linuxaudioproduction.blogspot.com.br/2015/09/patching-compiling-and-installing.html&lt;br /&gt;
&lt;br /&gt;
'''Testado com o Ubuntu 14.04.1'''&lt;br /&gt;
&lt;br /&gt;
This guide is a condensed reference on how to patch, compile and install the 4.1.5. kernel.&lt;br /&gt;
&lt;br /&gt;
Download kernel and patch:&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.5.tar.xz&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/projects/rt/4.1/older/patch-4.1.5-rt5.patch.gz&lt;br /&gt;
&lt;br /&gt;
use sudo mode:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /home/car01/Downloads&lt;br /&gt;
Extract kernel archive and patch file:&lt;br /&gt;
 tar -Jxf linux-4.1.5.tar.xz&lt;br /&gt;
 gzip -d patch-4.1.5-rt5.patch.gz&lt;br /&gt;
Put the patch file one directory level above the kernel source.&lt;br /&gt;
 mv linux-4.1.5 /usr/src&lt;br /&gt;
 cp patch-4.1.5-rt5.patch /usr/src&lt;br /&gt;
&lt;br /&gt;
Change directory to the newly created kernel source directory&lt;br /&gt;
 cd /usr/src/linux-4.1.5&lt;br /&gt;
&lt;br /&gt;
Apply the patch to the kernel.&lt;br /&gt;
&lt;br /&gt;
 less ../patch-4.1.5-rt5.patch | patch -p1&lt;br /&gt;
&lt;br /&gt;
Get the latest configuration of new kernel&lt;br /&gt;
 make oldconfig&lt;br /&gt;
&lt;br /&gt;
The make will ask some questions, answer with the default option, '''EXCEPT''' the options about real time and debug mode. When asked for:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Preemption Model&amp;quot;&lt;br /&gt;
** Choose &amp;quot;5. Fully Preemptible Kernel (RT) (PREEMPT_RT_FULL) (NEW)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Debug preemptible kernel (DEBUG_PREEMPT)&amp;quot;&lt;br /&gt;
** Choose &amp;quot;n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Open up the kernel configuration tool:&lt;br /&gt;
 make menuconfig&lt;br /&gt;
&lt;br /&gt;
To configure the IP_TABLES NAT support:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
On the Kernel Configuration go to:&lt;br /&gt;
 Networking support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter) &amp;gt; IP: Netfilter Configuration&lt;br /&gt;
 Find the options listed below and mark with &amp;lt;M&amp;gt;&lt;br /&gt;
 	&amp;lt;M&amp;gt; IP tables support (required for filtering/masq/NAT) &lt;br /&gt;
 Other options will apear:&lt;br /&gt;
	&amp;lt;M&amp;gt; MASQUERADE target support&lt;br /&gt;
	&amp;lt;M&amp;gt; NETMAP tarrget support&lt;br /&gt;
	&amp;lt;M&amp;gt; REDIRECT target support&lt;br /&gt;
 save and exit&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
Build and install the kernel:&lt;br /&gt;
&lt;br /&gt;
 make -j 24&lt;br /&gt;
 make -j 24 modules&lt;br /&gt;
 make INSTALL_MOD_STRIP=1 modules_install&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -s linux-4.1.5 linux&lt;br /&gt;
&lt;br /&gt;
Update the bootloader (probably grub) if not done automatically.&lt;br /&gt;
&lt;br /&gt;
restart the computer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check if the iptables_nat is working:&lt;br /&gt;
&lt;br /&gt;
 iptables -t nat -L&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 If shows the following error:&lt;br /&gt;
   iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)&lt;br /&gt;
   Perhaps iptables or your kernel needs to be upgraded.&lt;br /&gt;
Back to the step of menu configuration tool:make menuconfig and check the iptables options. If is ok, try the solution:&lt;br /&gt;
     cd /usr/src/linux-4.1.5&lt;br /&gt;
     sudo make menuconfig&lt;br /&gt;
  Go to menu Networking Support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter)&lt;br /&gt;
  and press spacebar to mark with star&lt;br /&gt;
  Entry in this menu and go to Core Netfilter Configuration. Fill all options with M EXCEPT the options &lt;br /&gt;
  below that should be filled with star :&lt;br /&gt;
	&amp;quot;Netfilter connection tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking flow accounting&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection mark tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking security mark support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking events&amp;quot; and &lt;br /&gt;
	&amp;quot;Netfilter Xtables support (required for ip_tables)&amp;quot;&lt;br /&gt;
   And the option &amp;quot;Enable obsolete /proc/net/ipt_recent&amp;quot; doesn't should be filled.&lt;br /&gt;
   Save changes and exit. &lt;br /&gt;
  BACK TO THE '''Build and install the kernel''' STEP in this tutorial.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using RAID and partition isn't recognized, install the package and reboot:&lt;br /&gt;
 sudo apt-get install dmraid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Nvidia Graphics Driver (352.41) for the Realtime Kernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;After installing the realtime kernel as described above, Nvidia graphics card owners will probably want&lt;br /&gt;
 to install the official graphics driver from Nvidia (if you're using Ardour you're going to need this driver &lt;br /&gt;
 to get smooth GUI performance). Unfortunately, the installer will just complain about the realtime kernel and&lt;br /&gt;
 quit. With some tweaks it is possible to install it nevertheless. This article describes the installation of the&lt;br /&gt;
 Nvidia driver version 352.41. For different versions you will need a different patch file or perform the patch manually.&lt;br /&gt;
&lt;br /&gt;
 Warning: I found that the driver sometimes locks itself up on my system, leading to a frozen image.&lt;br /&gt;
 If 100% stability is a requirement for you, you should not install it. During the installation you will &lt;br /&gt;
 need to stop your desktop session so consider printing this guide or open it up on a different device.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead if you're ready:&lt;br /&gt;
&lt;br /&gt;
Download the driver package from your local nvidia page:&lt;br /&gt;
 http://www.nvidia.com/content/global/global.php&lt;br /&gt;
Make a patch file as follows: &lt;br /&gt;
 [[nvidia-352.41-rt.patch]]&lt;br /&gt;
Open a console and change directory to the folder where you downloaded the driver package to.&lt;br /&gt;
&lt;br /&gt;
Make the driver package executable:&lt;br /&gt;
 chmod +x NVIDIA-Linux-x86_64-352.41.run&lt;br /&gt;
&lt;br /&gt;
Extract the driver source:&lt;br /&gt;
 ./NVIDIA-Linux-x86_64-352.41.run --extract-only&lt;br /&gt;
&lt;br /&gt;
Apply the patch file:&lt;br /&gt;
 less nvidia-352.41-rt.patch | patch NVIDIA-Linux-x86_64-352.41/kernel/nv-linux.h&lt;br /&gt;
&lt;br /&gt;
Press Ctrl+Alt+F1 to open up a terminal session and login as root&lt;br /&gt;
Stop your desktop manager. If you're using XFCE (UbuntuStudio) this is LightDM. Beware that this kills all programs running in the GUI session, including the browser you might be reading this article in:&lt;br /&gt;
 /etc/init.d/lightdm stop&lt;br /&gt;
&lt;br /&gt;
Set this environment variable to disable the a check for the realtime kernel patch in the installer:&lt;br /&gt;
 export IGNORE_PREEMPT_RT_PRESENCE=1&lt;br /&gt;
&lt;br /&gt;
Change directory to the folder where the nvidia driver source was extracted to. &lt;br /&gt;
Run the installer just like you normally would:&lt;br /&gt;
 ./nvidia-installer&lt;br /&gt;
Restart your desktop manager:&lt;br /&gt;
 /etc/init.d/lightdm start&lt;br /&gt;
&lt;br /&gt;
Check if the driver was install correctly,  deve mostrar as informações da placa de video&lt;br /&gt;
 $ nvidia-settings&lt;br /&gt;
&lt;br /&gt;
Your system should now use the freshly installed driver!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;If you want to adapt this process for a different driver version, you will need to take a look what the patch actually&lt;br /&gt;
 does and make those changes to the nv-linux.h file manually. If you do so, it would be very nice of you to create a new patch &lt;br /&gt;
 file and post it here in the comments. Of course, there's no guarantee that this will work for newer driver versions.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para instalar o cuda siga as instruções do Getting_Started: http://developer.download.nvidia.com/compute/cuda/6_5/rel/docs/CUDA_Getting_Started_Linux.pdf&lt;br /&gt;
&lt;br /&gt;
Use o instador .run&lt;br /&gt;
&lt;br /&gt;
Na instalação vai aparecer algumas perguntas, Siga essas respostas.&lt;br /&gt;
&lt;br /&gt;
 Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.29? ((y)es/(n)o/(q)uit): n&lt;br /&gt;
 Install the CUDA 6.5 Toolkit? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter Toolkit Location [ default is /usr/local/cuda-6.5 ]: &lt;br /&gt;
 Do you want to install a symbolic link at /usr/local/cuda? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Install the CUDA 6.5 Samples? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter CUDA Samples Location [ default is /home/car01 ]: &lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
http://linuxaudioproduction.blogspot.com.br/2015/09/how-to-patching-and-compiling-nvidia.html&lt;br /&gt;
&lt;br /&gt;
https://devtalk.nvidia.com/default/topic/572468/nvidia-325-15-linux-rt-old-amp-amp-new-nvidia-rt-patch-methods-questions-about-nvidia-installer/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Possíveis problemas ==&lt;br /&gt;
&lt;br /&gt;
Error NVRM/VGA com o driver da nvidia:&lt;br /&gt;
&lt;br /&gt;
use o comando:&lt;br /&gt;
sudo dmesg | tail&lt;br /&gt;
Se ocorrer os seguintes erros:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[   15.458823] NVRM: Your system is not currently configured to drive a VGA console&lt;br /&gt;
[   15.458830] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver&lt;br /&gt;
[   15.458834] NVRM: requires the use of a text-mode VGA console. Use of other console&lt;br /&gt;
[   15.458838] NVRM: drivers including, but not limited to, vesafb, may result in&lt;br /&gt;
[   15.458841] NVRM: corruption and stability problems, and is not supported.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adicione a seguinte linha no arquivo  /boot/grub/grub.cfg ao fim da linha do kernel&lt;br /&gt;
 &lt;br /&gt;
video=vesa:off vga=normal&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
menuentry 'Ubuntu' --class ubuntu...&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
linux    /boot/vmlinuz-4.1.5-rt5 root=UUID=f5a99a1a-15a4-4a83-a3fb-2adbee7f8311 ro quiet splash $vt_handoff '''video=vesa:off vga=normal'''&lt;br /&gt;
&lt;br /&gt;
(..)&lt;br /&gt;
&lt;br /&gt;
verificar nesse link&lt;br /&gt;
 https://bbs.archlinux.org/viewtopic.php?id=143569&lt;br /&gt;
&lt;br /&gt;
Erro na resolução do monitor.&lt;br /&gt;
Entre na configurações da nvidia como super usuário&lt;br /&gt;
 &lt;br /&gt;
 $ sudo nvidia-settings &lt;br /&gt;
&lt;br /&gt;
Em X Server Display Configuration, restaure a configuração do X server clicando no botão de &amp;quot;Reset&amp;quot;. Após isso reinicie a maquina.&lt;br /&gt;
&lt;br /&gt;
Feito isso, volte na mesma aba da nvidia-settings. Verifique no campo &amp;quot;Selection&amp;quot; se o aparece o seu monitor. Depois mude a resolução do monitor para uma configuração maior e salve a configuração em &amp;quot;Save to X Configuration File&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81383</id>
		<title>Criando Kernel RT Ubuntu 14.04</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81383"/>
				<updated>2017-11-30T15:36:51Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Todas as informacoes aqui foram retiradas de: http://linuxaudioproduction.blogspot.com.br/2015/09/patching-compiling-and-installing.html&lt;br /&gt;
&lt;br /&gt;
'''Testado com o Ubuntu 14.04.1'''&lt;br /&gt;
&lt;br /&gt;
This guide is a condensed reference on how to patch, compile and install the 4.1.5. kernel.&lt;br /&gt;
&lt;br /&gt;
Download kernel and patch:&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.5.tar.xz&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/projects/rt/4.1/older/patch-4.1.5-rt5.patch.gz&lt;br /&gt;
&lt;br /&gt;
use sudo mode:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /home/car01/Downloads&lt;br /&gt;
Extract kernel archive and patch file:&lt;br /&gt;
 tar -Jxf linux-4.1.5.tar.xz&lt;br /&gt;
 gzip -d patch-4.1.5-rt5.patch.gz&lt;br /&gt;
Put the patch file one directory level above the kernel source.&lt;br /&gt;
 mv linux-4.1.5 /usr/src&lt;br /&gt;
 cp patch-4.1.5-rt5.patch /usr/src&lt;br /&gt;
&lt;br /&gt;
Change directory to the newly created kernel source directory&lt;br /&gt;
 cd /usr/src/linux-4.1.5&lt;br /&gt;
&lt;br /&gt;
Apply the patch to the kernel.&lt;br /&gt;
&lt;br /&gt;
 less ../patch-4.1.5-rt5.patch | patch -p1&lt;br /&gt;
&lt;br /&gt;
Get the latest configuration of new kernel&lt;br /&gt;
 make oldconfig&lt;br /&gt;
&lt;br /&gt;
The make will ask some questions, answer with the default option, '''EXCEPT''' the options about real time and debug mode. When asked for:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Preemption Model&amp;quot;&lt;br /&gt;
** Choose &amp;quot;5. Fully Preemptible Kernel (RT) (PREEMPT_RT_FULL) (NEW)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Debug preemptible kernel (DEBUG_PREEMPT)&amp;quot;&lt;br /&gt;
** Choose &amp;quot;n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Open up the kernel configuration tool:&lt;br /&gt;
 make menuconfig&lt;br /&gt;
&lt;br /&gt;
To configure the IP_TABLES NAT support:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
On the Kernel Configuration go to:&lt;br /&gt;
 Networking support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter) &amp;gt; IP: Netfilter Configuration&lt;br /&gt;
 Find the options listed below and mark with &amp;lt;M&amp;gt;&lt;br /&gt;
 	&amp;lt;M&amp;gt; IP tables support (required for filtering/masq/NAT) &lt;br /&gt;
 Other options will apear:&lt;br /&gt;
	&amp;lt;M&amp;gt; MASQUERADE target support&lt;br /&gt;
	&amp;lt;M&amp;gt; NETMAP tarrget support&lt;br /&gt;
	&amp;lt;M&amp;gt; REDIRECT target support&lt;br /&gt;
 save and exit&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
Build and install the kernel:&lt;br /&gt;
&lt;br /&gt;
 make -j 24&lt;br /&gt;
 make -j 24 modules&lt;br /&gt;
 make INSTALL_MOD_STRIP=1 modules_install&lt;br /&gt;
 make install&lt;br /&gt;
 ln -s linux-4.1.5 linux&lt;br /&gt;
&lt;br /&gt;
Update the bootloader (probably grub) if not done automatically.&lt;br /&gt;
&lt;br /&gt;
restart the computer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check if the iptables_nat is working:&lt;br /&gt;
&lt;br /&gt;
 iptables -t nat -L&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 If shows the following error:&lt;br /&gt;
   iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)&lt;br /&gt;
   Perhaps iptables or your kernel needs to be upgraded.&lt;br /&gt;
Back to the step of menu configuration tool:make menuconfig and check the iptables options. If is ok, try the solution:&lt;br /&gt;
     cd /usr/src/linux-4.1.5&lt;br /&gt;
     sudo make menuconfig&lt;br /&gt;
  Go to menu Networking Support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter)&lt;br /&gt;
  and press spacebar to mark with star&lt;br /&gt;
  Entry in this menu and go to Core Netfilter Configuration. Fill all options with M EXCEPT the options &lt;br /&gt;
  below that should be filled with star :&lt;br /&gt;
	&amp;quot;Netfilter connection tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking flow accounting&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection mark tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking security mark support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking events&amp;quot; and &lt;br /&gt;
	&amp;quot;Netfilter Xtables support (required for ip_tables)&amp;quot;&lt;br /&gt;
   And the option &amp;quot;Enable obsolete /proc/net/ipt_recent&amp;quot; doesn't should be filled.&lt;br /&gt;
   Save changes and exit. &lt;br /&gt;
  BACK TO THE '''Build and install the kernel''' STEP in this tutorial.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using RAID and partition isn't recognized, install the package and reboot:&lt;br /&gt;
 sudo apt-get install dmraid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Nvidia Graphics Driver (352.41) for the Realtime Kernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;After installing the realtime kernel as described above, Nvidia graphics card owners will probably want&lt;br /&gt;
 to install the official graphics driver from Nvidia (if you're using Ardour you're going to need this driver &lt;br /&gt;
 to get smooth GUI performance). Unfortunately, the installer will just complain about the realtime kernel and&lt;br /&gt;
 quit. With some tweaks it is possible to install it nevertheless. This article describes the installation of the&lt;br /&gt;
 Nvidia driver version 352.41. For different versions you will need a different patch file or perform the patch manually.&lt;br /&gt;
&lt;br /&gt;
 Warning: I found that the driver sometimes locks itself up on my system, leading to a frozen image.&lt;br /&gt;
 If 100% stability is a requirement for you, you should not install it. During the installation you will &lt;br /&gt;
 need to stop your desktop session so consider printing this guide or open it up on a different device.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead if you're ready:&lt;br /&gt;
&lt;br /&gt;
Download the driver package from your local nvidia page:&lt;br /&gt;
 http://www.nvidia.com/content/global/global.php&lt;br /&gt;
Make a patch file as follows: &lt;br /&gt;
 [[nvidia-352.41-rt.patch]]&lt;br /&gt;
Open a console and change directory to the folder where you downloaded the driver package to.&lt;br /&gt;
&lt;br /&gt;
Make the driver package executable:&lt;br /&gt;
 chmod +x NVIDIA-Linux-x86_64-352.41.run&lt;br /&gt;
&lt;br /&gt;
Extract the driver source:&lt;br /&gt;
 ./NVIDIA-Linux-x86_64-352.41.run --extract-only&lt;br /&gt;
&lt;br /&gt;
Apply the patch file:&lt;br /&gt;
 less nvidia-352.41-rt.patch | patch NVIDIA-Linux-x86_64-352.41/kernel/nv-linux.h&lt;br /&gt;
&lt;br /&gt;
Press Ctrl+Alt+F1 to open up a terminal session and login as root&lt;br /&gt;
Stop your desktop manager. If you're using XFCE (UbuntuStudio) this is LightDM. Beware that this kills all programs running in the GUI session, including the browser you might be reading this article in:&lt;br /&gt;
 /etc/init.d/lightdm stop&lt;br /&gt;
&lt;br /&gt;
Set this environment variable to disable the a check for the realtime kernel patch in the installer:&lt;br /&gt;
 export IGNORE_PREEMPT_RT_PRESENCE=1&lt;br /&gt;
&lt;br /&gt;
Change directory to the folder where the nvidia driver source was extracted to. &lt;br /&gt;
Run the installer just like you normally would:&lt;br /&gt;
 ./nvidia-installer&lt;br /&gt;
Restart your desktop manager:&lt;br /&gt;
 /etc/init.d/lightdm start&lt;br /&gt;
&lt;br /&gt;
Check if the driver was install correctly,  deve mostrar as informações da placa de video&lt;br /&gt;
 $ nvidia-settings&lt;br /&gt;
&lt;br /&gt;
Your system should now use the freshly installed driver!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;If you want to adapt this process for a different driver version, you will need to take a look what the patch actually&lt;br /&gt;
 does and make those changes to the nv-linux.h file manually. If you do so, it would be very nice of you to create a new patch &lt;br /&gt;
 file and post it here in the comments. Of course, there's no guarantee that this will work for newer driver versions.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para instalar o cuda siga as instruções do Getting_Started: http://developer.download.nvidia.com/compute/cuda/6_5/rel/docs/CUDA_Getting_Started_Linux.pdf&lt;br /&gt;
&lt;br /&gt;
Use o instador .run&lt;br /&gt;
&lt;br /&gt;
Na instalação vai aparecer algumas perguntas, Siga essas respostas.&lt;br /&gt;
&lt;br /&gt;
 Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.29? ((y)es/(n)o/(q)uit): n&lt;br /&gt;
 Install the CUDA 6.5 Toolkit? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter Toolkit Location [ default is /usr/local/cuda-6.5 ]: &lt;br /&gt;
 Do you want to install a symbolic link at /usr/local/cuda? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Install the CUDA 6.5 Samples? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter CUDA Samples Location [ default is /home/car01 ]: &lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
http://linuxaudioproduction.blogspot.com.br/2015/09/how-to-patching-and-compiling-nvidia.html&lt;br /&gt;
&lt;br /&gt;
https://devtalk.nvidia.com/default/topic/572468/nvidia-325-15-linux-rt-old-amp-amp-new-nvidia-rt-patch-methods-questions-about-nvidia-installer/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Possíveis problemas ==&lt;br /&gt;
&lt;br /&gt;
Error NVRM/VGA com o driver da nvidia:&lt;br /&gt;
&lt;br /&gt;
use o comando:&lt;br /&gt;
sudo dmesg | tail&lt;br /&gt;
Se ocorrer os seguintes erros:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[   15.458823] NVRM: Your system is not currently configured to drive a VGA console&lt;br /&gt;
[   15.458830] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver&lt;br /&gt;
[   15.458834] NVRM: requires the use of a text-mode VGA console. Use of other console&lt;br /&gt;
[   15.458838] NVRM: drivers including, but not limited to, vesafb, may result in&lt;br /&gt;
[   15.458841] NVRM: corruption and stability problems, and is not supported.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adicione a seguinte linha no arquivo  /boot/grub/grub.cfg ao fim da linha do kernel&lt;br /&gt;
 &lt;br /&gt;
video=vesa:off vga=normal&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
menuentry 'Ubuntu' --class ubuntu...&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
linux    /boot/vmlinuz-4.1.5-rt5 root=UUID=f5a99a1a-15a4-4a83-a3fb-2adbee7f8311 ro quiet splash $vt_handoff '''video=vesa:off vga=normal'''&lt;br /&gt;
&lt;br /&gt;
(..)&lt;br /&gt;
&lt;br /&gt;
verificar nesse link&lt;br /&gt;
 https://bbs.archlinux.org/viewtopic.php?id=143569&lt;br /&gt;
&lt;br /&gt;
Erro na resolução do monitor.&lt;br /&gt;
Entre na configurações da nvidia como super usuário&lt;br /&gt;
 &lt;br /&gt;
 $ sudo nvidia-settings &lt;br /&gt;
&lt;br /&gt;
Em X Server Display Configuration, restaure a configuração do X server clicando no botão de &amp;quot;Reset&amp;quot;. Após isso reinicie a maquina.&lt;br /&gt;
&lt;br /&gt;
Feito isso, volte na mesma aba da nvidia-settings. Verifique no campo &amp;quot;Selection&amp;quot; se o aparece o seu monitor. Depois mude a resolução do monitor para uma configuração maior e salve a configuração em &amp;quot;Save to X Configuration File&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81382</id>
		<title>Criando Kernel RT Ubuntu 14.04</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Criando_Kernel_RT_Ubuntu_14.04&amp;diff=81382"/>
				<updated>2017-11-30T15:25:20Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Todas as informacoes aqui foram retiradas de: http://linuxaudioproduction.blogspot.com.br/2015/09/patching-compiling-and-installing.html&lt;br /&gt;
&lt;br /&gt;
'''Testado com o Ubuntu 14.04.1'''&lt;br /&gt;
&lt;br /&gt;
This guide is a condensed reference on how to patch, compile and install the 4.1.5. kernel.&lt;br /&gt;
&lt;br /&gt;
Download kernel and patch:&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.5.tar.xz&lt;br /&gt;
 https://www.kernel.org/pub/linux/kernel/projects/rt/4.1/older/patch-4.1.5-rt5.patch.gz&lt;br /&gt;
&lt;br /&gt;
use sudo mode:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /home/car01/Downloads&lt;br /&gt;
Extract kernel archive and patch file:&lt;br /&gt;
 tar -Jxf linux-4.1.5.tar.xz&lt;br /&gt;
 gzip -d patch-4.1.5-rt5.patch.gz&lt;br /&gt;
Put the patch file one directory level above the kernel source.&lt;br /&gt;
 mv linux-4.1.5 /usr/src&lt;br /&gt;
 cp patch-4.1.5-rt5.patch /usr/src&lt;br /&gt;
&lt;br /&gt;
Change directory to the newly created kernel source directory&lt;br /&gt;
 cd /usr/src/linux-4.1.5&lt;br /&gt;
&lt;br /&gt;
Apply the patch to the kernel.&lt;br /&gt;
&lt;br /&gt;
 less ../patch-4.1.5-rt5.patch | patch -p1&lt;br /&gt;
&lt;br /&gt;
Get the latest configuration of new kernel&lt;br /&gt;
 make oldconfig&lt;br /&gt;
&lt;br /&gt;
The make will ask some questions, answer with the default option, '''EXCEPT''' the options about real time and debug mode. When asked for:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Preemption Model&amp;quot;&lt;br /&gt;
** Choose &amp;quot;5. Fully Preemptible Kernel (RT) (PREEMPT_RT_FULL) (NEW)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Debug preemptible kernel (DEBUG_PREEMPT)&amp;quot;&lt;br /&gt;
** Choose &amp;quot;n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Open up the kernel configuration tool:&lt;br /&gt;
 make menuconfig&lt;br /&gt;
&lt;br /&gt;
To configure the IP_TABLES NAT support:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
On the Kernel Configuration go to:&lt;br /&gt;
 Networking support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter) &amp;gt; IP: Netfilter Configuration&lt;br /&gt;
 Find the options listed below and mark with &amp;lt;M&amp;gt;&lt;br /&gt;
 	&amp;lt;M&amp;gt; IP tables support (required for filtering/masq/NAT) &lt;br /&gt;
 Other options will apear:&lt;br /&gt;
	&amp;lt;M&amp;gt; MASQUERADE target support&lt;br /&gt;
	&amp;lt;M&amp;gt; NETMAP tarrget support&lt;br /&gt;
	&amp;lt;M&amp;gt; REDIRECT target support&lt;br /&gt;
 save and exit&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
Build and install the kernel:&lt;br /&gt;
&lt;br /&gt;
 make -j 24&lt;br /&gt;
 make -j 24 modules&lt;br /&gt;
 make INSTALL_MOD_STRIP=1 modules_install&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Update the bootloader (probably grub) if not done automatically.&lt;br /&gt;
&lt;br /&gt;
restart the computer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check if the iptables_nat is working:&lt;br /&gt;
&lt;br /&gt;
 iptables -t nat -L&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 If shows the following error:&lt;br /&gt;
   iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)&lt;br /&gt;
   Perhaps iptables or your kernel needs to be upgraded.&lt;br /&gt;
Back to the step of menu configuration tool:make menuconfig and check the iptables options. If is ok, try the solution:&lt;br /&gt;
     cd /usr/src/linux-4.1.5&lt;br /&gt;
     sudo make menuconfig&lt;br /&gt;
  Go to menu Networking Support &amp;gt; Networking Options &amp;gt; Network packet filtering framework (Netfilter)&lt;br /&gt;
  and press spacebar to mark with star&lt;br /&gt;
  Entry in this menu and go to Core Netfilter Configuration. Fill all options with M EXCEPT the options &lt;br /&gt;
  below that should be filled with star :&lt;br /&gt;
	&amp;quot;Netfilter connection tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking flow accounting&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection mark tracking support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking security mark support&amp;quot;, &lt;br /&gt;
	&amp;quot;Connection tracking events&amp;quot; and &lt;br /&gt;
	&amp;quot;Netfilter Xtables support (required for ip_tables)&amp;quot;&lt;br /&gt;
   And the option &amp;quot;Enable obsolete /proc/net/ipt_recent&amp;quot; doesn't should be filled.&lt;br /&gt;
   Save changes and exit. &lt;br /&gt;
  BACK TO THE '''Build and install the kernel''' STEP in this tutorial.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using RAID and partition isn't recognized, install the package and reboot:&lt;br /&gt;
 sudo apt-get install dmraid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Nvidia Graphics Driver (352.41) for the Realtime Kernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;After installing the realtime kernel as described above, Nvidia graphics card owners will probably want&lt;br /&gt;
 to install the official graphics driver from Nvidia (if you're using Ardour you're going to need this driver &lt;br /&gt;
 to get smooth GUI performance). Unfortunately, the installer will just complain about the realtime kernel and&lt;br /&gt;
 quit. With some tweaks it is possible to install it nevertheless. This article describes the installation of the&lt;br /&gt;
 Nvidia driver version 352.41. For different versions you will need a different patch file or perform the patch manually.&lt;br /&gt;
&lt;br /&gt;
 Warning: I found that the driver sometimes locks itself up on my system, leading to a frozen image.&lt;br /&gt;
 If 100% stability is a requirement for you, you should not install it. During the installation you will &lt;br /&gt;
 need to stop your desktop session so consider printing this guide or open it up on a different device.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead if you're ready:&lt;br /&gt;
&lt;br /&gt;
Download the driver package from your local nvidia page:&lt;br /&gt;
 http://www.nvidia.com/content/global/global.php&lt;br /&gt;
Make a patch file as follows: &lt;br /&gt;
 [[nvidia-352.41-rt.patch]]&lt;br /&gt;
Open a console and change directory to the folder where you downloaded the driver package to.&lt;br /&gt;
&lt;br /&gt;
Make the driver package executable:&lt;br /&gt;
 chmod +x NVIDIA-Linux-x86_64-352.41.run&lt;br /&gt;
&lt;br /&gt;
Extract the driver source:&lt;br /&gt;
 ./NVIDIA-Linux-x86_64-352.41.run --extract-only&lt;br /&gt;
&lt;br /&gt;
Apply the patch file:&lt;br /&gt;
 less nvidia-352.41-rt.patch | patch NVIDIA-Linux-x86_64-352.41/kernel/nv-linux.h&lt;br /&gt;
&lt;br /&gt;
Press Ctrl+Alt+F1 to open up a terminal session and login as root&lt;br /&gt;
Stop your desktop manager. If you're using XFCE (UbuntuStudio) this is LightDM. Beware that this kills all programs running in the GUI session, including the browser you might be reading this article in:&lt;br /&gt;
 /etc/init.d/lightdm stop&lt;br /&gt;
&lt;br /&gt;
Set this environment variable to disable the a check for the realtime kernel patch in the installer:&lt;br /&gt;
 export IGNORE_PREEMPT_RT_PRESENCE=1&lt;br /&gt;
&lt;br /&gt;
Change directory to the folder where the nvidia driver source was extracted to. &lt;br /&gt;
Run the installer just like you normally would:&lt;br /&gt;
 ./nvidia-installer&lt;br /&gt;
Restart your desktop manager:&lt;br /&gt;
 /etc/init.d/lightdm start&lt;br /&gt;
&lt;br /&gt;
Check if the driver was install correctly,  deve mostrar as informações da placa de video&lt;br /&gt;
 $ nvidia-settings&lt;br /&gt;
&lt;br /&gt;
Your system should now use the freshly installed driver!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;If you want to adapt this process for a different driver version, you will need to take a look what the patch actually&lt;br /&gt;
 does and make those changes to the nv-linux.h file manually. If you do so, it would be very nice of you to create a new patch &lt;br /&gt;
 file and post it here in the comments. Of course, there's no guarantee that this will work for newer driver versions.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para instalar o cuda siga as instruções do Getting_Started: http://developer.download.nvidia.com/compute/cuda/6_5/rel/docs/CUDA_Getting_Started_Linux.pdf&lt;br /&gt;
&lt;br /&gt;
Use o instador .run&lt;br /&gt;
&lt;br /&gt;
Na instalação vai aparecer algumas perguntas, Siga essas respostas.&lt;br /&gt;
&lt;br /&gt;
 Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.29? ((y)es/(n)o/(q)uit): n&lt;br /&gt;
 Install the CUDA 6.5 Toolkit? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter Toolkit Location [ default is /usr/local/cuda-6.5 ]: &lt;br /&gt;
 Do you want to install a symbolic link at /usr/local/cuda? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Install the CUDA 6.5 Samples? ((y)es/(n)o/(q)uit): y&lt;br /&gt;
 Enter CUDA Samples Location [ default is /home/car01 ]: &lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
http://linuxaudioproduction.blogspot.com.br/2015/09/how-to-patching-and-compiling-nvidia.html&lt;br /&gt;
&lt;br /&gt;
https://devtalk.nvidia.com/default/topic/572468/nvidia-325-15-linux-rt-old-amp-amp-new-nvidia-rt-patch-methods-questions-about-nvidia-installer/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Possíveis problemas ==&lt;br /&gt;
&lt;br /&gt;
Error NVRM/VGA com o driver da nvidia:&lt;br /&gt;
&lt;br /&gt;
use o comando:&lt;br /&gt;
sudo dmesg | tail&lt;br /&gt;
Se ocorrer os seguintes erros:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[   15.458823] NVRM: Your system is not currently configured to drive a VGA console&lt;br /&gt;
[   15.458830] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver&lt;br /&gt;
[   15.458834] NVRM: requires the use of a text-mode VGA console. Use of other console&lt;br /&gt;
[   15.458838] NVRM: drivers including, but not limited to, vesafb, may result in&lt;br /&gt;
[   15.458841] NVRM: corruption and stability problems, and is not supported.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adicione a seguinte linha no arquivo  /boot/grub/grub.cfg ao fim da linha do kernel&lt;br /&gt;
 &lt;br /&gt;
video=vesa:off vga=normal&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
menuentry 'Ubuntu' --class ubuntu...&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
linux    /boot/vmlinuz-4.1.5-rt5 root=UUID=f5a99a1a-15a4-4a83-a3fb-2adbee7f8311 ro quiet splash $vt_handoff '''video=vesa:off vga=normal'''&lt;br /&gt;
&lt;br /&gt;
(..)&lt;br /&gt;
&lt;br /&gt;
verificar nesse link&lt;br /&gt;
 https://bbs.archlinux.org/viewtopic.php?id=143569&lt;br /&gt;
&lt;br /&gt;
Erro na resolução do monitor.&lt;br /&gt;
Entre na configurações da nvidia como super usuário&lt;br /&gt;
 &lt;br /&gt;
 $ sudo nvidia-settings &lt;br /&gt;
&lt;br /&gt;
Em X Server Display Configuration, restaure a configuração do X server clicando no botão de &amp;quot;Reset&amp;quot;. Após isso reinicie a maquina.&lt;br /&gt;
&lt;br /&gt;
Feito isso, volte na mesma aba da nvidia-settings. Verifique no campo &amp;quot;Selection&amp;quot; se o aparece o seu monitor. Depois mude a resolução do monitor para uma configuração maior e salve a configuração em &amp;quot;Save to X Configuration File&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Instala%C3%A7%C3%A3o_Carmen_para_Ubuntu_14.04&amp;diff=81377</id>
		<title>Instalação Carmen para Ubuntu 14.04</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Instala%C3%A7%C3%A3o_Carmen_para_Ubuntu_14.04&amp;diff=81377"/>
				<updated>2017-11-17T19:12:49Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
&lt;br /&gt;
Essa instalação é completa, mas é necessário testar todos os módulos. &lt;br /&gt;
&lt;br /&gt;
= Preparação para a instalação do Carmen = &lt;br /&gt;
&lt;br /&gt;
Atualizar o apt:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
&lt;br /&gt;
Instalar o git, gimp, meld e vim:&lt;br /&gt;
 sudo apt-get install gimp meld vim git&lt;br /&gt;
&lt;br /&gt;
Baixar o Carmen pelo git (faça o download enquanto segue os próximos passos):&lt;br /&gt;
 git clone https://github.com/LCAD-UFES/carmen_lcad.git&lt;br /&gt;
&lt;br /&gt;
Baixe a MAE via git:&lt;br /&gt;
 git clone https://github.com/LCAD-UFES/MAE.git&lt;br /&gt;
&lt;br /&gt;
Instalar os pacotes para o carmem no 14.04&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install swig \&lt;br /&gt;
 libgtk2.0-dev \&lt;br /&gt;
 qt-sdk \&lt;br /&gt;
 libimlib2 libimlib2-dev \&lt;br /&gt;
 imagemagick libmagick++-dev \&lt;br /&gt;
 libwrap0 libwrap0-dev tcpd \&lt;br /&gt;
 libncurses5 libncurses5-dev \&lt;br /&gt;
 libgsl0-dev libgsl0ldbl \&lt;br /&gt;
 libdc1394-22 libdc1394-22-dev libdc1394-utils \&lt;br /&gt;
 cmake \&lt;br /&gt;
 libgtkglext1 libgtkglext1-dev \&lt;br /&gt;
 libgtkglextmm-x11-1.2-0 libgtkglextmm-x11-1.2-dev \&lt;br /&gt;
 libglade2-0 libglade2-dev \&lt;br /&gt;
 freeglut3 freeglut3-dev \&lt;br /&gt;
 libcurl3 libcurl3-nss libcurl4-nss-dev \&lt;br /&gt;
 libglew1.5 libglew1.5-dev libglewmx1.5 libglewmx1.5-dev libglew-dev \&lt;br /&gt;
 libkml0 libkml-dev \&lt;br /&gt;
 liburiparser1 liburiparser-dev \&lt;br /&gt;
 libusb-1.0-0 libusb-1.0-0-dev libusb-dev \&lt;br /&gt;
 libxi-dev libxi6 \&lt;br /&gt;
 libxmu-dev libxmu6 \&lt;br /&gt;
 build-essential libforms-dev \&lt;br /&gt;
 byacc \&lt;br /&gt;
 flex \&lt;br /&gt;
 doxygen \&lt;br /&gt;
 libespeak-dev libfftw3-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
caso de erro em libcheese-gtk23 instale os pacotes abaixo antes dos anteriores (Solucão nao confirmada):&lt;br /&gt;
 sudo apt-get install libglew-dev libcheese7 libcheese-gtk23 libclutter-gst-2.0-0 libcogl15 libclutter-gtk-1.0-0 libclutter-1.0-0&lt;br /&gt;
&lt;br /&gt;
Instalar o Java:&lt;br /&gt;
&lt;br /&gt;
 sudo add-apt-repository ppa:webupd8team/java&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install oracle-jdk8-installer&lt;br /&gt;
 update-alternatives --display java&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/environment:&lt;br /&gt;
 sudo gedit /etc/environment&lt;br /&gt;
&lt;br /&gt;
Adicione no final do arquivo:&lt;br /&gt;
 JAVA_HOME=/usr/lib/jvm/java-8-oracle&lt;br /&gt;
&lt;br /&gt;
Instalar o eclipse:&lt;br /&gt;
 &lt;br /&gt;
Baixe o eclipse de:&lt;br /&gt;
 https://www.eclipse.org/downloads/eclipse-packages/&lt;br /&gt;
&lt;br /&gt;
Descompacte o ecplise&lt;br /&gt;
 cd Downloads/&lt;br /&gt;
 sudo mv eclipse-...tar.gz  /opt&lt;br /&gt;
 cd /opt/&lt;br /&gt;
 sudo tar -xvf eclipse-...tar.gz &lt;br /&gt;
&lt;br /&gt;
Crie um arquivo desktop e edite ele em /usr/share/applications:&lt;br /&gt;
 sudo gedit /usr/share/applications/eclipse.desktop&lt;br /&gt;
&lt;br /&gt;
Coloque o seguinte conteudo:&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=Eclipse&lt;br /&gt;
 Type=Application&lt;br /&gt;
 Exec=/opt/eclipse/eclipse&lt;br /&gt;
 Terminal=false&lt;br /&gt;
 Icon=/opt/eclipse/icon.xpm&lt;br /&gt;
 Comment=Integrated Development Environment&lt;br /&gt;
 NoDisplay=false&lt;br /&gt;
 Categories=Development;IDE&lt;br /&gt;
 Name[en]=Eclipse&lt;br /&gt;
&lt;br /&gt;
Instale as deps da PCL:&lt;br /&gt;
 sudo apt-get install libeigen3-dev libboost-all-dev libflann-dev libvtk5-dev cmake-gui&lt;br /&gt;
&lt;br /&gt;
Install OpenCV 3.1:&lt;br /&gt;
&lt;br /&gt;
Start installing the dependencies:&lt;br /&gt;
 sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev \&lt;br /&gt;
 python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev&lt;br /&gt;
&lt;br /&gt;
Download and select the correct version:&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /opt/opencv3.1.0/&lt;br /&gt;
 cd /opt/opencv3.1.0/&lt;br /&gt;
 sudo git clone https://github.com/Itseez/opencv.git&lt;br /&gt;
 sudo git clone https://github.com/Itseez/opencv_contrib.git&lt;br /&gt;
 cd opencv&lt;br /&gt;
 sudo git checkout 3.1.0&lt;br /&gt;
 cd /opt/opencv3.1.0/opencv_contrib&lt;br /&gt;
 sudo git checkout 3.1.0&lt;br /&gt;
 cd /opt/opencv3.1.0/opencv&lt;br /&gt;
&lt;br /&gt;
Build it:&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 sudo cmake -D -DWITH_IPP=ON -D WITH_CUDA=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \&lt;br /&gt;
 -D OPENCV_EXTRA_MODULES_PATH=/opt/opencv3.1.0/opencv_contrib/modules /opt/opencv3.1.0/opencv/ ..&lt;br /&gt;
 sudo make -j8&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
It is common to have problems with ippicv using this version of OpenCV. To fix it:&lt;br /&gt;
 Edit `/usr/local/lib/pkgconfig/opencv.pc`&lt;br /&gt;
 Add `libdir3rd=${exec_prefix}/share/OpenCV/3rdparty/lib` after libdir&lt;br /&gt;
 Add `-L${libdir3rd}` at Libs  &lt;br /&gt;
&lt;br /&gt;
Baixar os arquivos:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /usr/local/&lt;br /&gt;
 wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/bullet/bullet-2.78-r2387.tgz&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/fann/fann/2.2.0/FANN-2.2.0-Source.tar.gz&lt;br /&gt;
 wget http://www.kvaser.com/software/7330130980754/V5_3_0/linuxcan.tar.gz&lt;br /&gt;
 tar -xvf bullet-2.78-r2387.tgz&lt;br /&gt;
 tar -xvf linuxcan.tar.gz&lt;br /&gt;
 tar -xvf FANN-2.2.0-Source.tar.gz&lt;br /&gt;
 mv bullet-2.78 bullet&lt;br /&gt;
 cd bullet&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 cd linuxcan&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 cd FANN-2.2.0-Source&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/ld.so.conf.d/opencv.conf&lt;br /&gt;
 gedit /etc/ld.so.conf.d/opencv.conf&lt;br /&gt;
&lt;br /&gt;
Adicione ao final dele:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
Execute: &lt;br /&gt;
 ldconfig&lt;br /&gt;
&lt;br /&gt;
Edite o arquivo /etc/bash.bashrc:&lt;br /&gt;
 gedit /etc/bash.bashrc&lt;br /&gt;
&lt;br /&gt;
Adicione no final do arquivo:&lt;br /&gt;
 PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig&lt;br /&gt;
 export PKG_CONFIG_PATH&lt;br /&gt;
&lt;br /&gt;
sair do rooot&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Coloque no .bashrc:&lt;br /&gt;
 #CARMEN&lt;br /&gt;
 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig&lt;br /&gt;
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu/:/usr/lib/libkml&lt;br /&gt;
 export CARMEN_HOME=~/carmen_lcad&lt;br /&gt;
 #OpenJaus&lt;br /&gt;
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/carmen_lcad/sharedlib/OpenJAUS/libopenJaus/lib:~/carmen_lcad/sharedlib/OpenJAUS/libjaus/lib:~/carmen_lcad/sharedlib/OpenJAUS/ojTorc/lib:~/carmen_lcad/sharedlib/OpenJAUS/ojIARASim/lib&lt;br /&gt;
 &lt;br /&gt;
 #MAE&lt;br /&gt;
 export MAEHOME=~/MAE&lt;br /&gt;
 export PATH=$PATH:$MAEHOME/bin&lt;br /&gt;
&lt;br /&gt;
Instale os pacotes imlib e flycapture:&lt;br /&gt;
 cd $CARMEN_HOME/ubuntu_packages/&lt;br /&gt;
 sudo dpkg -i imlib_1.9.15-20_amd64.deb &lt;br /&gt;
 sudo dpkg -i imlib-devel_1.9.15-20_amd64.deb&lt;br /&gt;
 tar -xvf flycapture2-2.5.3.4-amd64-pkg.tgz&lt;br /&gt;
 cd flycapture2-2.5.3.4-amd64/&lt;br /&gt;
 sudo apt-get install libglademm-2.4-1c2a&lt;br /&gt;
 sudo apt-get install libglademm-2.4-dev&lt;br /&gt;
 sudo apt-get install libgtkmm-2.4-dev&lt;br /&gt;
 sudo sh install_flycapture.sh&lt;br /&gt;
&lt;br /&gt;
Faça os links:&lt;br /&gt;
 sudo ln -s /usr/lib64/libgdk_imlib.so.1.9.15 /usr/lib64/libgdk_imlib.a&lt;br /&gt;
 sudo ln -s /usr/src/linux-headers-3.8.0-30/ /usr/src/linux&lt;br /&gt;
&lt;br /&gt;
Instale a PCL:&lt;br /&gt;
 sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install libpcl-all&lt;br /&gt;
&lt;br /&gt;
Instale a câmera Kinect:&lt;br /&gt;
 sudo su&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.19/libusb-1.0.19.tar.bz2&lt;br /&gt;
 tar xvf libusb-1.0.19.tar.bz2&lt;br /&gt;
 cd libusb-1.0.19&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
se der erro na instalacao acima tente instalar a udev-dev antes:&lt;br /&gt;
 sudo apt-get install libudev-dev&lt;br /&gt;
&lt;br /&gt;
 mkdir /usr/local/tplib&lt;br /&gt;
 cd /usr/local/tplib&lt;br /&gt;
 git clone git://github.com/OpenKinect/libfreenect.git&lt;br /&gt;
 cd libfreenect&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 cp src/libfreenect.pc /usr/local/tplib/&lt;br /&gt;
 make&lt;br /&gt;
 cp ../src/libfreenect.pc.in src/libfreenect.pc &lt;br /&gt;
 cp ../fakenect/fakenect.sh.in fakenect/fakenect.sh&lt;br /&gt;
 make install&lt;br /&gt;
 ldconfig /usr/local/lib64/&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Execute:&lt;br /&gt;
 glview&lt;br /&gt;
&lt;br /&gt;
Caso dê erro, tente:&lt;br /&gt;
 freenect-glview&lt;br /&gt;
&lt;br /&gt;
Se der erro execute:&lt;br /&gt;
 sudo ldconfig /usr/local/lib64/&lt;br /&gt;
&lt;br /&gt;
Instalação da biblioteca G2O 14.04:&lt;br /&gt;
 sudo apt-get install cmake libsuitesparse-dev libqt4-dev qt4-qmake&lt;br /&gt;
 cd /usr/local/&lt;br /&gt;
 sudo svn co https://svn.openslam.org/data/svn/g2o&lt;br /&gt;
 cd /usr/local/g2o/trunk/build/&lt;br /&gt;
 sudo cmake ../ -DBUILD_CSPARSE=ON -DG2O_BUILD_DEPRECATED_TYPES=ON -DG2O_BUILD_LINKED_APPS=ON&lt;br /&gt;
 sudo make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
'''ATENCAO: Caso esteja usando o UBUNTU 14.04.3 é necessario instalar a zlib:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Para verificar sua versão, veja no campo Description, na saída do comando abaixo:&lt;br /&gt;
  lsb_release -a&lt;br /&gt;
Caso seja o 14.04.3 faca: &lt;br /&gt;
 cd $CARMEN_HOME/ubuntu_packages&lt;br /&gt;
 sudo dpkg -i zlib1g_1.2.3.4.dfsg-3ubuntu4_amd64.deb &lt;br /&gt;
 sudo dpkg -i zlib1g-dev_1.2.3.4.dfsg-3ubuntu4_amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Faça o link da boost:&lt;br /&gt;
 sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_thread.so /usr/lib/x86_64-linux-gnu/libboost_thread-mt.so&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Instale as bibliotecas da MAE:&lt;br /&gt;
 sudo apt-get install make g++ freeglut3-dev byacc libforms-dev libtiff4-dev libXi-dev libXmu-dev doxygen tcsh flex libdc1394-22-dev&lt;br /&gt;
&lt;br /&gt;
# Compilar a MAE:&lt;br /&gt;
## Pré-requisito: as variáveis de ambiente MAEHOME e PATH devem estar ajustadas;&lt;br /&gt;
## Entrar no diretório da MAE: &amp;quot;cd $MAEHOME&amp;quot;;&lt;br /&gt;
## Compilar a MAE: &amp;quot;make&amp;quot;.&lt;br /&gt;
## Verificar se a biblioteca da MAE libnet_conn.a foi gerado em MAEHOME/lib;&lt;br /&gt;
## Verificar se o compilador da MAE netcomp foi gerado em MAEHOME/bin.&lt;br /&gt;
&lt;br /&gt;
Mais informações sobre a MAE: http://www.lcad.inf.ufes.br/wiki/index.php/M%C3%A1quina_Associadora_de_Eventos_-_MAE#Compilando_a_MAE&lt;br /&gt;
&lt;br /&gt;
Instalação da dlib:&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 sudo su&lt;br /&gt;
 git clone https://github.com/davisking/dlib.git&lt;br /&gt;
 cd dlib/&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build/&lt;br /&gt;
 cmake .. {Vai reclamar de coisas CUDA. Mas pode compilar sem suporte a CUDA}&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Instalação da libwnn:&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 git clone http://github.com/filipemtz/libwnn&lt;br /&gt;
 cd libwnn&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake ..&lt;br /&gt;
 make -j 4&lt;br /&gt;
 sudo make install&lt;br /&gt;
 &lt;br /&gt;
 Atenção: em caso de problema com o opencv, faça:&lt;br /&gt;
 cd build&lt;br /&gt;
 rm -rf *&lt;br /&gt;
 cmake -DOpenCV_DIR=/usr/local/opencv-2.4.9/build/ ..&lt;br /&gt;
 make -j 4&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
Feche todos os terminais e faça:&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 ./configure --nojava --nocuda --nozlib&lt;br /&gt;
   Should the C++ tools be installed for CARMEN: [Y/n] Y&lt;br /&gt;
   Should Python Bindings be installed: [y/N] N&lt;br /&gt;
   Searching for Python2.4... Should the old laser server be used instead of the new one: [y/N] N&lt;br /&gt;
   Install path [/usr/local/]: &lt;br /&gt;
   Robot numbers [*]: 1,2&lt;br /&gt;
&lt;br /&gt;
Antes de compilar o CARMEN, precisamos que o módulo tracker seja compilado separadamente para que o navigator_spline funcione:&lt;br /&gt;
 cd $CARMEN_HOME/src/tracker&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Vai dar um erro de compilação, mas está tudo ok.&lt;br /&gt;
&lt;br /&gt;
Para compilar o carmen rode:&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Caso dê erro por causa da libusb.h vá no arquivo:&lt;br /&gt;
  sudo vim /usr/local/include/libfreenect.hpp&lt;br /&gt;
E altere #include &amp;lt;libusb.h&amp;gt; para&lt;br /&gt;
  #include &amp;lt;libusb-1.0/libusb.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Caso dê erro na compilacão no global por causa do z_stream tente&lt;br /&gt;
 cd $CARMEN_HOME/src&lt;br /&gt;
 make clean&lt;br /&gt;
 ./configure --nojava --nocuda&lt;br /&gt;
   Should the C++ tools be installed for CARMEN: [Y/n] Y&lt;br /&gt;
   Should Python Bindings be installed: [y/N] N&lt;br /&gt;
   Searching for Python2.4... Should the old laser server be used instead of the new one: [y/N] N&lt;br /&gt;
   Install path [/usr/local/]: &lt;br /&gt;
   Robot numbers [*]: 1,2&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
= Ajustes para a IARA = &lt;br /&gt;
'''(seções abaixo apenas para serem feitas na IARA)'''&lt;br /&gt;
&lt;br /&gt;
Para configurar o OpenJAUS siga o tutorial em : &lt;br /&gt;
 &lt;br /&gt;
 $CARMEN_HOME/sharedlib/OpenJAUS/README_ALBERTO.txt&lt;br /&gt;
&lt;br /&gt;
Para que o GPS e o XSENS sejam configurados automaticamente ao serem conectados às portas USB, copie o seguinte arquivo do diretório data do Carmen para sua máquina:&lt;br /&gt;
&lt;br /&gt;
 cd $CARMEN_HOME/data&lt;br /&gt;
 sudo cp 99-usb-serial.rules /etc/udev/rules.d/&lt;br /&gt;
&lt;br /&gt;
== Ajustes na rede para o GPS Trimble ==&lt;br /&gt;
&lt;br /&gt;
Para conectar o novo GPS Trimble é necessário uma conexão com a Internet dentro da IARA. Optamos por usar um iPhone com conexão 3G.&lt;br /&gt;
&lt;br /&gt;
Para o iPhone funcionar no Ubuntu 12.04 é necessário um tanto de coisas... Perdemos o histórico mas dá para achar na Internet (Google iPhone 4S ubuntu 12.04 mount). Precisa instalar uns pacotes (apt-get install ...). Se você tiver sucesso, vai ser possível usar o iPhone como Personal Hotspot, ou seja, usar a Internet de dentro da IARA.&lt;br /&gt;
&lt;br /&gt;
Feito isso, é necessário criar um Gateway da máquina que tem acesso a Internet (car01) para uma subrede da IARA (192.168.0.0 - a subrede de Carro Network). Para isso (ver página de referência em https://help.ubuntu.com/community/Internet/ConnectionSharing (Gateway set up)), considerando o iPhone em eth2 e a subrede da IARA em eth1:&lt;br /&gt;
  sudo iptables -A FORWARD -o eth2 -i eth1 -s 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT&lt;br /&gt;
  sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT&lt;br /&gt;
  sudo iptables -t nat -F POSTROUTING&lt;br /&gt;
  sudo iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE&lt;br /&gt;
  sudo iptables-save | sudo tee /etc/iptables.sav&lt;br /&gt;
&lt;br /&gt;
Os comandos acima criam um NAT do iPhone para a subrede da IARA. Em seguida, é necessário editar o /etc/rc.local e adicionar a linha abaixo antes de &amp;quot;exit 0&amp;quot;:&lt;br /&gt;
  iptables-restore &amp;lt; /etc/iptables.sav&lt;br /&gt;
&lt;br /&gt;
É necessário ainda:&lt;br /&gt;
  sudo sh -c &amp;quot;echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Para tornar isso permanente, inclua as linhas abaixo em /etc/sysctl.conf:&lt;br /&gt;
  net.ipv4.ip_forward=1&lt;br /&gt;
  net.ipv4.conf.default.forwarding=1&lt;br /&gt;
  net.ipv4.conf.all.forwarding=1&lt;br /&gt;
&lt;br /&gt;
No Network Manager, tem que setar &amp;quot;Use this connection only for resources on its network&amp;quot; (Network Manager-&amp;gt;IPv4 Settings-&amp;gt;Routes) em todas as redes cabeadas exceto a do iPhone.&lt;br /&gt;
&lt;br /&gt;
Pronto!&lt;br /&gt;
&lt;br /&gt;
== Ajustes para o Raspberry do volante ==&lt;br /&gt;
&lt;br /&gt;
'''Prevenir que entre em modo de espera, proteção de tela ou desabilite o monitor'''&lt;br /&gt;
 &lt;br /&gt;
Fonte: https://raspberrypi.stackexchange.com/questions/752/how-do-i-prevent-the-screen-from-going-blank&lt;br /&gt;
&lt;br /&gt;
Testado no Raspbian jessey&lt;br /&gt;
&lt;br /&gt;
Only if the files don't exist install (It was not necessary):&lt;br /&gt;
 &lt;br /&gt;
   apt-get install x11-xserver-utils&lt;br /&gt;
&lt;br /&gt;
Edit the files:&lt;br /&gt;
&lt;br /&gt;
 /etc/xdg/lxsession/LXDE/autostart&lt;br /&gt;
 /etc/xdg/lxsession/LXDE-pi/autostart&lt;br /&gt;
 ~/.config/lxprofile/LXDE-pi/autostart&lt;br /&gt;
&lt;br /&gt;
Append these lines:&lt;br /&gt;
&lt;br /&gt;
  @xset s noblank&lt;br /&gt;
  @xset s off&lt;br /&gt;
  @xset -dpms&lt;br /&gt;
&lt;br /&gt;
Possibly also comment out the line that says @xscreensaver -no-splash, so the complete file should look something like this:&lt;br /&gt;
&lt;br /&gt;
  @lxpanel --profile LXDE&lt;br /&gt;
  @pcmanfm --desktop --profile LXDE&lt;br /&gt;
  # @xscreensaver -no-splash&lt;br /&gt;
&lt;br /&gt;
  @xset s noblank&lt;br /&gt;
  @xset s off&lt;br /&gt;
  @xset -dpms&lt;br /&gt;
&lt;br /&gt;
Maybe also exist the line @point-rpi, DONT DELETE and DONT ADD in the others files!&lt;br /&gt;
&lt;br /&gt;
Also edit /etc/kbd/config and make sure these values are set as follows (however I believe this is only for when the lightweight desktop (LXDE) is not running (i.e. the pi is still in text / terminal mode):&lt;br /&gt;
&lt;br /&gt;
  BLANK_TIME=0&lt;br /&gt;
  BLANK_DPMS=off&lt;br /&gt;
  POWERDOWN_TIME=0&lt;br /&gt;
&lt;br /&gt;
I believe that the /etc/xdg/lxsession/LXDE/autostart may be the sort of system-wide version of ~/.xinitrc but someone else probably knows the nuances better.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Carmen_Robot_Navigation_Toolkit&amp;diff=81376</id>
		<title>Carmen Robot Navigation Toolkit</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Carmen_Robot_Navigation_Toolkit&amp;diff=81376"/>
				<updated>2017-10-11T20:50:51Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: Desfeita a edição 81373 de Vinicius Brito (Discussão)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
== [[Introduction - What's Carmen?]] ==&lt;br /&gt;
	&lt;br /&gt;
== [[Core Functionalities]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Download / Installation]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Required Hardware]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Running Carmen]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Configuring Carmen]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Program with Carmen]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Carmen Online Docs]] ==&lt;br /&gt;
&lt;br /&gt;
== [[FAQ]] ==&lt;br /&gt;
&lt;br /&gt;
== [[What's New?]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Chief Changes between Releases]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Repository]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Papers]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Mailing List]] ==&lt;br /&gt;
&lt;br /&gt;
== [[People]] ==&lt;br /&gt;
&lt;br /&gt;
== Data Sets(Radish)[http://radish.sourceforge.net/]==&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Carmen_Robot_Navigation_Toolkit&amp;diff=81375</id>
		<title>Carmen Robot Navigation Toolkit</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Carmen_Robot_Navigation_Toolkit&amp;diff=81375"/>
				<updated>2017-10-11T20:50:24Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: Desfeita a edição 81374 de Vinicius Brito (Discussão)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
== [[Introduction - What's Carmen?]] ==&lt;br /&gt;
	&lt;br /&gt;
== [[Core Functionalities]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Download / Installation]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Required Hardware]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Running Carmen]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Configuring Carmen]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Carmen programming patterns]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Carmen Online Docs]] ==&lt;br /&gt;
&lt;br /&gt;
== [[FAQ]] ==&lt;br /&gt;
&lt;br /&gt;
== [[What's New?]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Chief Changes between Releases]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Repository]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Papers]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Mailing List]] ==&lt;br /&gt;
&lt;br /&gt;
== [[People]] ==&lt;br /&gt;
&lt;br /&gt;
== Data Sets(Radish)[http://radish.sourceforge.net/]==&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Carmen_Robot_Navigation_Toolkit&amp;diff=81374</id>
		<title>Carmen Robot Navigation Toolkit</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Carmen_Robot_Navigation_Toolkit&amp;diff=81374"/>
				<updated>2017-10-11T20:46:38Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Carmen programming patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
== [[Introduction - What's Carmen?]] ==&lt;br /&gt;
	&lt;br /&gt;
== [[Core Functionalities]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Download / Installation]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Required Hardware]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Running Carmen]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Configuring Carmen]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Carmen Programming Patterns]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Carmen Online Docs]] ==&lt;br /&gt;
&lt;br /&gt;
== [[FAQ]] ==&lt;br /&gt;
&lt;br /&gt;
== [[What's New?]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Chief Changes between Releases]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Repository]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Papers]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Mailing List]] ==&lt;br /&gt;
&lt;br /&gt;
== [[People]] ==&lt;br /&gt;
&lt;br /&gt;
== Data Sets(Radish)[http://radish.sourceforge.net/]==&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Carmen_Robot_Navigation_Toolkit&amp;diff=81373</id>
		<title>Carmen Robot Navigation Toolkit</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Carmen_Robot_Navigation_Toolkit&amp;diff=81373"/>
				<updated>2017-10-11T20:46:23Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Program with Carmen */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
== [[Introduction - What's Carmen?]] ==&lt;br /&gt;
	&lt;br /&gt;
== [[Core Functionalities]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Download / Installation]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Required Hardware]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Running Carmen]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Configuring Carmen]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Carmen programming patterns]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Carmen Online Docs]] ==&lt;br /&gt;
&lt;br /&gt;
== [[FAQ]] ==&lt;br /&gt;
&lt;br /&gt;
== [[What's New?]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Chief Changes between Releases]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Repository]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Papers]] ==&lt;br /&gt;
&lt;br /&gt;
== [[Mailing List]] ==&lt;br /&gt;
&lt;br /&gt;
== [[People]] ==&lt;br /&gt;
&lt;br /&gt;
== Data Sets(Radish)[http://radish.sourceforge.net/]==&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81372</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81372"/>
				<updated>2017-10-11T20:44:08Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Carmen use Scenaria */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using two different scenaria: simulating a robot and way-point navigation of it in a known map and then running a playback of a logged ride. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The first module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
The rtt_path_follower module tries to reduce the latency on the atuation system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Controls the aceleration of the robot to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display.&lt;br /&gt;
&lt;br /&gt;
Place the simulated robot in the map by left-clicking on the &amp;quot;Place Robot&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot. Click on go to start the simulation.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_procedure.gif]]&lt;br /&gt;
&lt;br /&gt;
Procconttrol_gui&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
This GUI display all the modules running for this process:&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_interface.png]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
=== Playback a recorded ride ===&lt;br /&gt;
&lt;br /&gt;
Now, we will run a playback of a recorded ride so that we can see the car route and sensor data in real-time. To do this section you will need the log file called (NOME DO LOG) saved in a directory called ¨/dados/¨. The log file contains pose, gps and velodyne data from a especific run. The log files are oftenly used to generate new offline maps and to calibrate sensors.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81371</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81371"/>
				<updated>2017-10-11T20:42:29Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Building a Map (using teleoperation) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The first module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
The rtt_path_follower module tries to reduce the latency on the atuation system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Controls the aceleration of the robot to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display.&lt;br /&gt;
&lt;br /&gt;
Place the simulated robot in the map by left-clicking on the &amp;quot;Place Robot&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot. Click on go to start the simulation.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_procedure.gif]]&lt;br /&gt;
&lt;br /&gt;
Procconttrol_gui&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
This GUI display all the modules running for this process:&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_interface.png]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
=== Playback a recorded ride ===&lt;br /&gt;
&lt;br /&gt;
Now, we will run a playback of a recorded ride so that we can see the car route and sensor data in real-time. To do this section you will need the log file called (NOME DO LOG) saved in a directory called ¨/dados/¨. The log file contains pose, gps and velodyne data from a especific run. The log files are oftenly used to generate new offline maps and to calibrate sensors.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81370</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81370"/>
				<updated>2017-10-11T20:42:12Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Autonomous Navigation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The first module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
The rtt_path_follower module tries to reduce the latency on the atuation system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Controls the aceleration of the robot to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display.&lt;br /&gt;
&lt;br /&gt;
Place the simulated robot in the map by left-clicking on the &amp;quot;Place Robot&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot. Click on go to start the simulation.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_procedure.gif]]&lt;br /&gt;
&lt;br /&gt;
Procconttrol_gui&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
This GUI display all the modules running for this process:&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_interface.png]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
=== Playback a recorded ride ===&lt;br /&gt;
&lt;br /&gt;
Now, we will run a playback of a recorded ride so that we can see the car route and sensor data in real-time. To do this section you will need the log file called (NOME DO LOG) saved in a directory called ¨/dados/¨. The log file contains pose, gps and velodyne data from a especific run. The log files are oftenly used to generate new offline maps and to calibrate sensors.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81369</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81369"/>
				<updated>2017-10-11T20:41:38Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Motion Control Module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The first module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
The rtt_path_follower module tries to reduce the latency on the atuation system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Controls the aceleration of the robot to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display.&lt;br /&gt;
&lt;br /&gt;
Place the simulated robot in the map by left-clicking on the &amp;quot;Place Robot&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot. Click on go to start the simulation.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_procedure.gif]]&lt;br /&gt;
&lt;br /&gt;
Procconttrol_gui&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
This GUI display all the modules running for this process:&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_interface.png]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
=== Playback a recorded ride ===&lt;br /&gt;
&lt;br /&gt;
Now, we will run a playback of a recorded ride so that we can see the car route and sensor data in real-time. To do this section you will need the log file called (NOME DO LOG) saved in a directory called ¨/dados/¨. The log file contains pose, gps and velodyne data from a especific run. The log files are oftenly used to generate new offline maps and to calibrate sensors.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81368</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81368"/>
				<updated>2017-10-11T20:38:10Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Teleoperation of a Robot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
This module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The path planner module tries to reduce the latency between sensoring and atuation on the system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Generate alternative paths to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display.&lt;br /&gt;
&lt;br /&gt;
Place the simulated robot in the map by left-clicking on the &amp;quot;Place Robot&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot. Click on go to start the simulation.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_procedure.gif]]&lt;br /&gt;
&lt;br /&gt;
Procconttrol_gui&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
This GUI display all the modules running for this process:&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_interface.png]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
=== Playback a recorded ride ===&lt;br /&gt;
&lt;br /&gt;
Now, we will run a playback of a recorded ride so that we can see the car route and sensor data in real-time. To do this section you will need the log file called (NOME DO LOG) saved in a directory called ¨/dados/¨. The log file contains pose, gps and velodyne data from a especific run. The log files are oftenly used to generate new offline maps and to calibrate sensors.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81367</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81367"/>
				<updated>2017-10-11T19:30:37Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Interface Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
This module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The path planner module tries to reduce the latency between sensoring and atuation on the system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Generate alternative paths to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display.&lt;br /&gt;
&lt;br /&gt;
Place the simulated robot in the map by left-clicking on the &amp;quot;Place Robot&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot. Click on go to start the simulation.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_procedure.gif]]&lt;br /&gt;
&lt;br /&gt;
Procconttrol_gui&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
This GUI display all the modules running for this process:&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_interface.png]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81366</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81366"/>
				<updated>2017-10-11T19:27:21Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Interface Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
This module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The path planner module tries to reduce the latency between sensoring and atuation on the system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Generate alternative paths to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_procedure.gif]]&lt;br /&gt;
&lt;br /&gt;
Procconttrol_gui&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
This GUI display all the modules running for this process:&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_interface.png]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81365</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81365"/>
				<updated>2017-10-11T19:26:40Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Interface Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
This module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The path planner module tries to reduce the latency between sensoring and atuation on the system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Generate alternative paths to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_procedure.gif]]&lt;br /&gt;
&lt;br /&gt;
Procconttrol_gui&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
This GUI display all the modules running for this module.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_interface.png]]&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81364</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81364"/>
				<updated>2017-10-11T19:22:50Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Interface Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
This module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The path planner module tries to reduce the latency between sensoring and atuation on the system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Generate alternative paths to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_procedure.gif]]&lt;br /&gt;
&lt;br /&gt;
Procconttrol_gui&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81363</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81363"/>
				<updated>2017-10-11T19:20:01Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Interface Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
This module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The path planner module tries to reduce the latency between sensoring and atuation on the system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Generate alternative paths to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_procedure.gif]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81362</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81362"/>
				<updated>2017-10-11T19:19:41Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Interface Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
This module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The path planner module tries to reduce the latency between sensoring and atuation on the system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Generate alternative paths to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_procedure.png]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Arquivo:Navigator_procedure.gif&amp;diff=81361</id>
		<title>Arquivo:Navigator procedure.gif</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Arquivo:Navigator_procedure.gif&amp;diff=81361"/>
				<updated>2017-10-11T19:18:48Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Arquivo:Navigator_interface.png&amp;diff=81360</id>
		<title>Arquivo:Navigator interface.png</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Arquivo:Navigator_interface.png&amp;diff=81360"/>
				<updated>2017-10-11T19:18:23Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81359</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81359"/>
				<updated>2017-10-11T18:46:47Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Interface Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
This module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The path planner module tries to reduce the latency between sensoring and atuation on the system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Generate alternative paths to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navigator_gui.png]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Arquivo:Navigator_gui.png&amp;diff=81358</id>
		<title>Arquivo:Navigator gui.png</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Arquivo:Navigator_gui.png&amp;diff=81358"/>
				<updated>2017-10-11T18:44:33Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81357</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81357"/>
				<updated>2017-10-11T18:43:09Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Interface Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
This module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The path planner module tries to reduce the latency between sensoring and atuation on the system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Generate alternative paths to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:200w_d.gif]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81355</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81355"/>
				<updated>2017-10-10T19:32:41Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Running it All Together */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
This module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The path planner module tries to reduce the latency between sensoring and atuation on the system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Generate alternative paths to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:carmen-planner.png]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81354</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81354"/>
				<updated>2017-10-10T19:32:20Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* In window 9, start the robotgui program */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
This module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The path planner module tries to reduce the latency between sensoring and atuation on the system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Generate alternative paths to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:carmen-planner.png]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
====Running it All Together====&lt;br /&gt;
&lt;br /&gt;
To initialize 8 xterm and to type all commands described above is time consuming. You can run all programs described above with a single command:&lt;br /&gt;
&lt;br /&gt;
   ./run_all.bat&lt;br /&gt;
&lt;br /&gt;
The command above is a bash script containing:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  ./central &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./param_daemon --robot p2d8+ ../data/mapa_do_ctvii_500k_64.map &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./simulator &amp;amp;&lt;br /&gt;
  ./robot &amp;amp;&lt;br /&gt;
  ./localize &amp;amp;&lt;br /&gt;
  ./navigator &amp;amp;&lt;br /&gt;
  ./navigatorgui &amp;amp;&lt;br /&gt;
  ./robotgui &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can stop all processes started in the script run_all.bat with the script:&lt;br /&gt;
  &lt;br /&gt;
  all_stop.bat&lt;br /&gt;
&lt;br /&gt;
The disadvantage of using the run_all.bat script is that all messages go to the same terminal, which might not be a good ideal if you are debugging a module.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may use the '''proccontrol''' tool:&lt;br /&gt;
&lt;br /&gt;
  ./proccontrol process.ini&lt;br /&gt;
&lt;br /&gt;
This program starts all programs described in process.ini and allow one to control them. Please refer to the process.ini file content to understand how to use it.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81353</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81353"/>
				<updated>2017-10-10T19:31:23Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Interface Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
This module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The path planner module tries to reduce the latency between sensoring and atuation on the system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Generate alternative paths to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:carmen-planner.png]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
====In window 9, start the robotgui program====&lt;br /&gt;
&lt;br /&gt;
   ./robotgui&lt;br /&gt;
&lt;br /&gt;
See the instructions for using robotgui below to teleoperate the simulated robot. You can also build maps and autonomously navigate the robot as described further below. Maps should look the same as the original map unless there were differences in the parameters used (in either the paramfile or in the vasco program) when creating the original map and the new map. Remember that if you are running programs on multiple machines, you must set the CENTRALHOST environment variable to point to the machine on which you are running central.&lt;br /&gt;
&lt;br /&gt;
====Running it All Together====&lt;br /&gt;
&lt;br /&gt;
To initialize 8 xterm and to type all commands described above is time consuming. You can run all programs described above with a single command:&lt;br /&gt;
&lt;br /&gt;
   ./run_all.bat&lt;br /&gt;
&lt;br /&gt;
The command above is a bash script containing:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  ./central &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./param_daemon --robot p2d8+ ../data/mapa_do_ctvii_500k_64.map &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./simulator &amp;amp;&lt;br /&gt;
  ./robot &amp;amp;&lt;br /&gt;
  ./localize &amp;amp;&lt;br /&gt;
  ./navigator &amp;amp;&lt;br /&gt;
  ./navigatorgui &amp;amp;&lt;br /&gt;
  ./robotgui &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can stop all processes started in the script run_all.bat with the script:&lt;br /&gt;
  &lt;br /&gt;
  all_stop.bat&lt;br /&gt;
&lt;br /&gt;
The disadvantage of using the run_all.bat script is that all messages go to the same terminal, which might not be a good ideal if you are debugging a module.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may use the '''proccontrol''' tool:&lt;br /&gt;
&lt;br /&gt;
  ./proccontrol process.ini&lt;br /&gt;
&lt;br /&gt;
This program starts all programs described in process.ini and allow one to control them. Please refer to the process.ini file content to understand how to use it.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81352</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81352"/>
				<updated>2017-10-10T19:18:14Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Interface Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
This module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The path planner module tries to reduce the latency between sensoring and atuation on the system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Generate alternative paths to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
Navigatorgui&lt;br /&gt;
&lt;br /&gt;
   ./navigator_gui2 -map_path ../data/map_ida_guarapari-20170403&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:carmen-planner.png]]&lt;br /&gt;
&lt;br /&gt;
Viewer 3D&lt;br /&gt;
&lt;br /&gt;
   ./viewer_3D&lt;br /&gt;
&lt;br /&gt;
This will open a 3D graphic interface where the car movement and sensors data are displayed.&lt;br /&gt;
&lt;br /&gt;
[[imagem:carmen-planner.png]]&lt;br /&gt;
&lt;br /&gt;
====In window 9, start the robotgui program====&lt;br /&gt;
&lt;br /&gt;
   ./robotgui&lt;br /&gt;
&lt;br /&gt;
See the instructions for using robotgui below to teleoperate the simulated robot. You can also build maps and autonomously navigate the robot as described further below. Maps should look the same as the original map unless there were differences in the parameters used (in either the paramfile or in the vasco program) when creating the original map and the new map. Remember that if you are running programs on multiple machines, you must set the CENTRALHOST environment variable to point to the machine on which you are running central.&lt;br /&gt;
&lt;br /&gt;
====Running it All Together====&lt;br /&gt;
&lt;br /&gt;
To initialize 8 xterm and to type all commands described above is time consuming. You can run all programs described above with a single command:&lt;br /&gt;
&lt;br /&gt;
   ./run_all.bat&lt;br /&gt;
&lt;br /&gt;
The command above is a bash script containing:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  ./central &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./param_daemon --robot p2d8+ ../data/mapa_do_ctvii_500k_64.map &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./simulator &amp;amp;&lt;br /&gt;
  ./robot &amp;amp;&lt;br /&gt;
  ./localize &amp;amp;&lt;br /&gt;
  ./navigator &amp;amp;&lt;br /&gt;
  ./navigatorgui &amp;amp;&lt;br /&gt;
  ./robotgui &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can stop all processes started in the script run_all.bat with the script:&lt;br /&gt;
  &lt;br /&gt;
  all_stop.bat&lt;br /&gt;
&lt;br /&gt;
The disadvantage of using the run_all.bat script is that all messages go to the same terminal, which might not be a good ideal if you are debugging a module.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may use the '''proccontrol''' tool:&lt;br /&gt;
&lt;br /&gt;
  ./proccontrol process.ini&lt;br /&gt;
&lt;br /&gt;
This program starts all programs described in process.ini and allow one to control them. Please refer to the process.ini file content to understand how to use it.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81351</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81351"/>
				<updated>2017-10-10T19:14:17Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Motion Control Module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
This module outputs the aceleration of the car based on the next position desired.&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
The path planner module tries to reduce the latency between sensoring and atuation on the system.&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
Generate alternative paths to avoid obstacles.&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
   ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:carmen-planner.png]]&lt;br /&gt;
&lt;br /&gt;
====In window 9, start the robotgui program====&lt;br /&gt;
&lt;br /&gt;
   ./robotgui&lt;br /&gt;
&lt;br /&gt;
See the instructions for using robotgui below to teleoperate the simulated robot. You can also build maps and autonomously navigate the robot as described further below. Maps should look the same as the original map unless there were differences in the parameters used (in either the paramfile or in the vasco program) when creating the original map and the new map. Remember that if you are running programs on multiple machines, you must set the CENTRALHOST environment variable to point to the machine on which you are running central.&lt;br /&gt;
&lt;br /&gt;
====Running it All Together====&lt;br /&gt;
&lt;br /&gt;
To initialize 8 xterm and to type all commands described above is time consuming. You can run all programs described above with a single command:&lt;br /&gt;
&lt;br /&gt;
   ./run_all.bat&lt;br /&gt;
&lt;br /&gt;
The command above is a bash script containing:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  ./central &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./param_daemon --robot p2d8+ ../data/mapa_do_ctvii_500k_64.map &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./simulator &amp;amp;&lt;br /&gt;
  ./robot &amp;amp;&lt;br /&gt;
  ./localize &amp;amp;&lt;br /&gt;
  ./navigator &amp;amp;&lt;br /&gt;
  ./navigatorgui &amp;amp;&lt;br /&gt;
  ./robotgui &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can stop all processes started in the script run_all.bat with the script:&lt;br /&gt;
  &lt;br /&gt;
  all_stop.bat&lt;br /&gt;
&lt;br /&gt;
The disadvantage of using the run_all.bat script is that all messages go to the same terminal, which might not be a good ideal if you are debugging a module.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may use the '''proccontrol''' tool:&lt;br /&gt;
&lt;br /&gt;
  ./proccontrol process.ini&lt;br /&gt;
&lt;br /&gt;
This program starts all programs described in process.ini and allow one to control them. Please refer to the process.ini file content to understand how to use it.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81350</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81350"/>
				<updated>2017-10-10T19:06:57Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* In window 8, start the navigatorgui program */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====Behavior Selector====&lt;br /&gt;
&lt;br /&gt;
   ./behavior_selector&lt;br /&gt;
&lt;br /&gt;
As the name suggest, this program will choose the rigth behavior in each different situation detected by other modules.&lt;br /&gt;
 &lt;br /&gt;
==== Motion Control Module ====&lt;br /&gt;
Model predictive planner&lt;br /&gt;
&lt;br /&gt;
   ./model_predictive_planner&lt;br /&gt;
&lt;br /&gt;
Path planner&lt;br /&gt;
&lt;br /&gt;
   ./rrt_path_follower&lt;br /&gt;
&lt;br /&gt;
Obstacle avoider&lt;br /&gt;
&lt;br /&gt;
   ./obstacle_avoider&lt;br /&gt;
&lt;br /&gt;
==== Interface Modules ====&lt;br /&gt;
   ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:carmen-planner.png]]&lt;br /&gt;
&lt;br /&gt;
====In window 9, start the robotgui program====&lt;br /&gt;
&lt;br /&gt;
   ./robotgui&lt;br /&gt;
&lt;br /&gt;
See the instructions for using robotgui below to teleoperate the simulated robot. You can also build maps and autonomously navigate the robot as described further below. Maps should look the same as the original map unless there were differences in the parameters used (in either the paramfile or in the vasco program) when creating the original map and the new map. Remember that if you are running programs on multiple machines, you must set the CENTRALHOST environment variable to point to the machine on which you are running central.&lt;br /&gt;
&lt;br /&gt;
====Running it All Together====&lt;br /&gt;
&lt;br /&gt;
To initialize 8 xterm and to type all commands described above is time consuming. You can run all programs described above with a single command:&lt;br /&gt;
&lt;br /&gt;
   ./run_all.bat&lt;br /&gt;
&lt;br /&gt;
The command above is a bash script containing:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  ./central &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./param_daemon --robot p2d8+ ../data/mapa_do_ctvii_500k_64.map &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./simulator &amp;amp;&lt;br /&gt;
  ./robot &amp;amp;&lt;br /&gt;
  ./localize &amp;amp;&lt;br /&gt;
  ./navigator &amp;amp;&lt;br /&gt;
  ./navigatorgui &amp;amp;&lt;br /&gt;
  ./robotgui &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can stop all processes started in the script run_all.bat with the script:&lt;br /&gt;
  &lt;br /&gt;
  all_stop.bat&lt;br /&gt;
&lt;br /&gt;
The disadvantage of using the run_all.bat script is that all messages go to the same terminal, which might not be a good ideal if you are debugging a module.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may use the '''proccontrol''' tool:&lt;br /&gt;
&lt;br /&gt;
  ./proccontrol process.ini&lt;br /&gt;
&lt;br /&gt;
This program starts all programs described in process.ini and allow one to control them. Please refer to the process.ini file content to understand how to use it.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81349</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81349"/>
				<updated>2017-10-10T18:57:40Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* RDDF Module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
====In window 8, start the navigatorgui program====&lt;br /&gt;
&lt;br /&gt;
   ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:carmen-planner.png]]&lt;br /&gt;
&lt;br /&gt;
====In window 9, start the robotgui program====&lt;br /&gt;
&lt;br /&gt;
   ./robotgui&lt;br /&gt;
&lt;br /&gt;
See the instructions for using robotgui below to teleoperate the simulated robot. You can also build maps and autonomously navigate the robot as described further below. Maps should look the same as the original map unless there were differences in the parameters used (in either the paramfile or in the vasco program) when creating the original map and the new map. Remember that if you are running programs on multiple machines, you must set the CENTRALHOST environment variable to point to the machine on which you are running central.&lt;br /&gt;
&lt;br /&gt;
====Running it All Together====&lt;br /&gt;
&lt;br /&gt;
To initialize 8 xterm and to type all commands described above is time consuming. You can run all programs described above with a single command:&lt;br /&gt;
&lt;br /&gt;
   ./run_all.bat&lt;br /&gt;
&lt;br /&gt;
The command above is a bash script containing:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  ./central &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./param_daemon --robot p2d8+ ../data/mapa_do_ctvii_500k_64.map &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./simulator &amp;amp;&lt;br /&gt;
  ./robot &amp;amp;&lt;br /&gt;
  ./localize &amp;amp;&lt;br /&gt;
  ./navigator &amp;amp;&lt;br /&gt;
  ./navigatorgui &amp;amp;&lt;br /&gt;
  ./robotgui &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can stop all processes started in the script run_all.bat with the script:&lt;br /&gt;
  &lt;br /&gt;
  all_stop.bat&lt;br /&gt;
&lt;br /&gt;
The disadvantage of using the run_all.bat script is that all messages go to the same terminal, which might not be a good ideal if you are debugging a module.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may use the '''proccontrol''' tool:&lt;br /&gt;
&lt;br /&gt;
  ./proccontrol process.ini&lt;br /&gt;
&lt;br /&gt;
This program starts all programs described in process.ini and allow one to control them. Please refer to the process.ini file content to understand how to use it.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81348</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81348"/>
				<updated>2017-10-10T18:55:45Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* In window 7, start the navigator module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
==== RDDF Module====&lt;br /&gt;
&lt;br /&gt;
RDDF stands for Road Data Definition file.&lt;br /&gt;
&lt;br /&gt;
   ./rddf_play ../data/rndf/rddf-voltadaufes-20170809.txt ../data/rddf_annotation_log_20140418.txt&lt;br /&gt;
&lt;br /&gt;
This program will create a file that contains pose informations (position and angles) about a previous driven ride. This will be a reference to the rigth path inside the road to the car when in autonomous mode.&lt;br /&gt;
&lt;br /&gt;
   ./navigator&lt;br /&gt;
&lt;br /&gt;
The navigator uses a shortest-path motion planner to find a path from the current robot pose to a goal pose. If no path exists, the navigator finds a path to the nearest (in Euclidean distance) point that the robot can reach. The path is assumed to be a set of joined line-segments defined by a set of way-points. Once a path has been computed, if the navigator is put into autonomous mode (by sending a navigator_go() message), then the navigator will use a P-D controller to drive from one waypoint to the next.&lt;br /&gt;
&lt;br /&gt;
The navigator subscribes to global position messages from localize, odometry messages from the base and laser messages. The laser messages are used to make local changes to the map, allowing the navigator to replan around unmapped obstacles. The navigator does not require localize to be running, but navigation without accurate position estimates is likely to fail.&lt;br /&gt;
&lt;br /&gt;
====In window 8, start the navigatorgui program====&lt;br /&gt;
&lt;br /&gt;
   ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:carmen-planner.png]]&lt;br /&gt;
&lt;br /&gt;
====In window 9, start the robotgui program====&lt;br /&gt;
&lt;br /&gt;
   ./robotgui&lt;br /&gt;
&lt;br /&gt;
See the instructions for using robotgui below to teleoperate the simulated robot. You can also build maps and autonomously navigate the robot as described further below. Maps should look the same as the original map unless there were differences in the parameters used (in either the paramfile or in the vasco program) when creating the original map and the new map. Remember that if you are running programs on multiple machines, you must set the CENTRALHOST environment variable to point to the machine on which you are running central.&lt;br /&gt;
&lt;br /&gt;
====Running it All Together====&lt;br /&gt;
&lt;br /&gt;
To initialize 8 xterm and to type all commands described above is time consuming. You can run all programs described above with a single command:&lt;br /&gt;
&lt;br /&gt;
   ./run_all.bat&lt;br /&gt;
&lt;br /&gt;
The command above is a bash script containing:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  ./central &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./param_daemon --robot p2d8+ ../data/mapa_do_ctvii_500k_64.map &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./simulator &amp;amp;&lt;br /&gt;
  ./robot &amp;amp;&lt;br /&gt;
  ./localize &amp;amp;&lt;br /&gt;
  ./navigator &amp;amp;&lt;br /&gt;
  ./navigatorgui &amp;amp;&lt;br /&gt;
  ./robotgui &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can stop all processes started in the script run_all.bat with the script:&lt;br /&gt;
  &lt;br /&gt;
  all_stop.bat&lt;br /&gt;
&lt;br /&gt;
The disadvantage of using the run_all.bat script is that all messages go to the same terminal, which might not be a good ideal if you are debugging a module.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may use the '''proccontrol''' tool:&lt;br /&gt;
&lt;br /&gt;
  ./proccontrol process.ini&lt;br /&gt;
&lt;br /&gt;
This program starts all programs described in process.ini and allow one to control them. Please refer to the process.ini file content to understand how to use it.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81347</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81347"/>
				<updated>2017-10-10T18:37:10Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* Running a Simulated Robot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced, as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
To run the simulation just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Central notes ====&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
==== Parameters Server ====&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
==== Proccontrol GUI====&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
==== Map Server ====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
The map_server program will load the car's poses and the OFFLINE map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. The OFFLINE MAP serves as reference to the localisation system of the car.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
==== Simulator Module ====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
==== Slam modules ====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the `carmen-ford-escape.ini` file. In this case we use the '-mapping_mode off' command-line option because we are not generating an offline map from sensor logs.&lt;br /&gt;
&lt;br /&gt;
The mapper module updates the offline map loaded from the map_server module with real-time information (moving objects, people, etc).  &lt;br /&gt;
&lt;br /&gt;
====In window 7, start the navigator module====&lt;br /&gt;
&lt;br /&gt;
   ./navigator&lt;br /&gt;
&lt;br /&gt;
The navigator uses a shortest-path motion planner to find a path from the current robot pose to a goal pose. If no path exists, the navigator finds a path to the nearest (in Euclidean distance) point that the robot can reach. The path is assumed to be a set of joined line-segments defined by a set of way-points. Once a path has been computed, if the navigator is put into autonomous mode (by sending a navigator_go() message), then the navigator will use a P-D controller to drive from one waypoint to the next.&lt;br /&gt;
&lt;br /&gt;
The navigator subscribes to global position messages from localize, odometry messages from the base and laser messages. The laser messages are used to make local changes to the map, allowing the navigator to replan around unmapped obstacles. The navigator does not require localize to be running, but navigation without accurate position estimates is likely to fail.&lt;br /&gt;
&lt;br /&gt;
====In window 8, start the navigatorgui program====&lt;br /&gt;
&lt;br /&gt;
   ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:carmen-planner.png]]&lt;br /&gt;
&lt;br /&gt;
====In window 9, start the robotgui program====&lt;br /&gt;
&lt;br /&gt;
   ./robotgui&lt;br /&gt;
&lt;br /&gt;
See the instructions for using robotgui below to teleoperate the simulated robot. You can also build maps and autonomously navigate the robot as described further below. Maps should look the same as the original map unless there were differences in the parameters used (in either the paramfile or in the vasco program) when creating the original map and the new map. Remember that if you are running programs on multiple machines, you must set the CENTRALHOST environment variable to point to the machine on which you are running central.&lt;br /&gt;
&lt;br /&gt;
====Running it All Together====&lt;br /&gt;
&lt;br /&gt;
To initialize 8 xterm and to type all commands described above is time consuming. You can run all programs described above with a single command:&lt;br /&gt;
&lt;br /&gt;
   ./run_all.bat&lt;br /&gt;
&lt;br /&gt;
The command above is a bash script containing:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  ./central &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./param_daemon --robot p2d8+ ../data/mapa_do_ctvii_500k_64.map &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./simulator &amp;amp;&lt;br /&gt;
  ./robot &amp;amp;&lt;br /&gt;
  ./localize &amp;amp;&lt;br /&gt;
  ./navigator &amp;amp;&lt;br /&gt;
  ./navigatorgui &amp;amp;&lt;br /&gt;
  ./robotgui &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can stop all processes started in the script run_all.bat with the script:&lt;br /&gt;
  &lt;br /&gt;
  all_stop.bat&lt;br /&gt;
&lt;br /&gt;
The disadvantage of using the run_all.bat script is that all messages go to the same terminal, which might not be a good ideal if you are debugging a module.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may use the '''proccontrol''' tool:&lt;br /&gt;
&lt;br /&gt;
  ./proccontrol process.ini&lt;br /&gt;
&lt;br /&gt;
This program starts all programs described in process.ini and allow one to control them. Please refer to the process.ini file content to understand how to use it.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81337</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81337"/>
				<updated>2017-10-04T14:37:49Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* In window 4, start the map server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
If you want to go directly to the simulation without following the steps bellow, just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
(first step)&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====In window (xterm) 1, start the IPC central server====&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
====In window 2, start the parameter server====&lt;br /&gt;
//////// Atual:&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
//////// Como Era:&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon --robot p2d8+ ../data/mapa_do_ctvii_500k_64.map&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that it serves parameters for the LCAD robot &amp;quot;p2d8+&amp;quot; from the parameter file &amp;quot;carmen/src/carmen.ini&amp;quot; and the map file &amp;quot;carmen/data/mapa_do_ctvii_500k_64.map.&amp;quot; Other command-line options are:&lt;br /&gt;
&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
====In window 3, start the proccontrol GUI====&lt;br /&gt;
/////// Atual:&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
/////// Como era (DEPRECATED):&lt;br /&gt;
&lt;br /&gt;
====In window 3, start the simulator====&lt;br /&gt;
   ./simulator&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately.&lt;br /&gt;
&lt;br /&gt;
/////// Atual&lt;br /&gt;
====In window 4, start the map server====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
In this case, the map_server program will generate the car's poses and the map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. Alternatively, you could directly load this informations from a file, with the '-map' command-line option.&lt;br /&gt;
&lt;br /&gt;
(REVER EXPLICACAO)&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
/////// Como era&lt;br /&gt;
&lt;br /&gt;
====In window 4, start the robot module====&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
Robot is a module that provides an abstract view to the hardware of the robot. If furthermore provides a elementary collision detection that is able to stop the robot in front of obstacles (if activated in the ini file: &amp;quot;robot_collision_avoidance on&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Robot has further functionalities: On the one hand, it combines the laser, sonar, and bumper data with the odometry information. On the other hand, robot should be used to send motion command to the robot.&lt;br /&gt;
&lt;br /&gt;
///// Atual&lt;br /&gt;
====In window 5, start the simulator module====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
////// Como era&lt;br /&gt;
&lt;br /&gt;
/////// Atual&lt;br /&gt;
/////// Atual&lt;br /&gt;
====In window 6, start the SLAM modules====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. In this case we use the '-mapping_mode off' command-line option because the map will be generated with the 'mapper' module. (CONTINUAR DAQUI)  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/////// Como era&lt;br /&gt;
====In window 6, start the localize module====&lt;br /&gt;
&lt;br /&gt;
   ./localize&lt;br /&gt;
&lt;br /&gt;
The localize module implements the classical Monte-Carlo localization using a particle filter. It can perform global localization and pose tracking. Note that localize needs a map, otherwise, it will not work. The performance of localize mainly depends on the number of particles. The bigger that number, the slower runs the localization but is typically more robust.&lt;br /&gt;
&lt;br /&gt;
Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the ini file. However, the standard configuration should work fine with robots equipped with SICK laser range finders.&lt;br /&gt;
&lt;br /&gt;
====In window 7, start the navigator module====&lt;br /&gt;
&lt;br /&gt;
   ./navigator&lt;br /&gt;
&lt;br /&gt;
The navigator uses a shortest-path motion planner to find a path from the current robot pose to a goal pose. If no path exists, the navigator finds a path to the nearest (in Euclidean distance) point that the robot can reach. The path is assumed to be a set of joined line-segments defined by a set of way-points. Once a path has been computed, if the navigator is put into autonomous mode (by sending a navigator_go() message), then the navigator will use a P-D controller to drive from one waypoint to the next.&lt;br /&gt;
&lt;br /&gt;
The navigator subscribes to global position messages from localize, odometry messages from the base and laser messages. The laser messages are used to make local changes to the map, allowing the navigator to replan around unmapped obstacles. The navigator does not require localize to be running, but navigation without accurate position estimates is likely to fail.&lt;br /&gt;
&lt;br /&gt;
====In window 8, start the navigatorgui program====&lt;br /&gt;
&lt;br /&gt;
   ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:carmen-planner.png]]&lt;br /&gt;
&lt;br /&gt;
====In window 9, start the robotgui program====&lt;br /&gt;
&lt;br /&gt;
   ./robotgui&lt;br /&gt;
&lt;br /&gt;
See the instructions for using robotgui below to teleoperate the simulated robot. You can also build maps and autonomously navigate the robot as described further below. Maps should look the same as the original map unless there were differences in the parameters used (in either the paramfile or in the vasco program) when creating the original map and the new map. Remember that if you are running programs on multiple machines, you must set the CENTRALHOST environment variable to point to the machine on which you are running central.&lt;br /&gt;
&lt;br /&gt;
====Running it All Together====&lt;br /&gt;
&lt;br /&gt;
To initialize 8 xterm and to type all commands described above is time consuming. You can run all programs described above with a single command:&lt;br /&gt;
&lt;br /&gt;
   ./run_all.bat&lt;br /&gt;
&lt;br /&gt;
The command above is a bash script containing:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  ./central &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./param_daemon --robot p2d8+ ../data/mapa_do_ctvii_500k_64.map &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./simulator &amp;amp;&lt;br /&gt;
  ./robot &amp;amp;&lt;br /&gt;
  ./localize &amp;amp;&lt;br /&gt;
  ./navigator &amp;amp;&lt;br /&gt;
  ./navigatorgui &amp;amp;&lt;br /&gt;
  ./robotgui &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can stop all processes started in the script run_all.bat with the script:&lt;br /&gt;
  &lt;br /&gt;
  all_stop.bat&lt;br /&gt;
&lt;br /&gt;
The disadvantage of using the run_all.bat script is that all messages go to the same terminal, which might not be a good ideal if you are debugging a module.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may use the '''proccontrol''' tool:&lt;br /&gt;
&lt;br /&gt;
  ./proccontrol process.ini&lt;br /&gt;
&lt;br /&gt;
This program starts all programs described in process.ini and allow one to control them. Please refer to the process.ini file content to understand how to use it.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81336</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81336"/>
				<updated>2017-10-04T14:37:16Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* In window 6, start the localize module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
If you want to go directly to the simulation without following the steps bellow, just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
(first step)&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====In window (xterm) 1, start the IPC central server====&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
====In window 2, start the parameter server====&lt;br /&gt;
//////// Atual:&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
//////// Como Era:&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon --robot p2d8+ ../data/mapa_do_ctvii_500k_64.map&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that it serves parameters for the LCAD robot &amp;quot;p2d8+&amp;quot; from the parameter file &amp;quot;carmen/src/carmen.ini&amp;quot; and the map file &amp;quot;carmen/data/mapa_do_ctvii_500k_64.map.&amp;quot; Other command-line options are:&lt;br /&gt;
&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
====In window 3, start the proccontrol GUI====&lt;br /&gt;
/////// Atual:&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
/////// Como era (DEPRECATED):&lt;br /&gt;
&lt;br /&gt;
====In window 3, start the simulator====&lt;br /&gt;
   ./simulator&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately.&lt;br /&gt;
&lt;br /&gt;
/////// Atual&lt;br /&gt;
====In window 4, start the map server====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
In this case, the map_server program will generate the car's poses and the map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. Alternatively, you could directly load this informations from a file, with the '-map' command-line option.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
/////// Como era&lt;br /&gt;
&lt;br /&gt;
====In window 4, start the robot module====&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
Robot is a module that provides an abstract view to the hardware of the robot. If furthermore provides a elementary collision detection that is able to stop the robot in front of obstacles (if activated in the ini file: &amp;quot;robot_collision_avoidance on&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Robot has further functionalities: On the one hand, it combines the laser, sonar, and bumper data with the odometry information. On the other hand, robot should be used to send motion command to the robot.&lt;br /&gt;
&lt;br /&gt;
///// Atual&lt;br /&gt;
====In window 5, start the simulator module====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
////// Como era&lt;br /&gt;
&lt;br /&gt;
/////// Atual&lt;br /&gt;
/////// Atual&lt;br /&gt;
====In window 6, start the SLAM modules====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off &amp;amp;&lt;br /&gt;
   ./mapper -map_path ../data/mapper_teste -map_x 7756450 -map_y -364200 &amp;amp;&lt;br /&gt;
   ./obstacle_distance_mapper&lt;br /&gt;
&lt;br /&gt;
The localize module is the original Carmen localization program using a particle filter. It can perform global localization and pose tracking. In this case we use the '-mapping_mode off' command-line option because the map will be generated with the 'mapper' module. (CONTINUAR DAQUI)  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/////// Como era&lt;br /&gt;
====In window 6, start the localize module====&lt;br /&gt;
&lt;br /&gt;
   ./localize&lt;br /&gt;
&lt;br /&gt;
The localize module implements the classical Monte-Carlo localization using a particle filter. It can perform global localization and pose tracking. Note that localize needs a map, otherwise, it will not work. The performance of localize mainly depends on the number of particles. The bigger that number, the slower runs the localization but is typically more robust.&lt;br /&gt;
&lt;br /&gt;
Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the ini file. However, the standard configuration should work fine with robots equipped with SICK laser range finders.&lt;br /&gt;
&lt;br /&gt;
====In window 7, start the navigator module====&lt;br /&gt;
&lt;br /&gt;
   ./navigator&lt;br /&gt;
&lt;br /&gt;
The navigator uses a shortest-path motion planner to find a path from the current robot pose to a goal pose. If no path exists, the navigator finds a path to the nearest (in Euclidean distance) point that the robot can reach. The path is assumed to be a set of joined line-segments defined by a set of way-points. Once a path has been computed, if the navigator is put into autonomous mode (by sending a navigator_go() message), then the navigator will use a P-D controller to drive from one waypoint to the next.&lt;br /&gt;
&lt;br /&gt;
The navigator subscribes to global position messages from localize, odometry messages from the base and laser messages. The laser messages are used to make local changes to the map, allowing the navigator to replan around unmapped obstacles. The navigator does not require localize to be running, but navigation without accurate position estimates is likely to fail.&lt;br /&gt;
&lt;br /&gt;
====In window 8, start the navigatorgui program====&lt;br /&gt;
&lt;br /&gt;
   ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:carmen-planner.png]]&lt;br /&gt;
&lt;br /&gt;
====In window 9, start the robotgui program====&lt;br /&gt;
&lt;br /&gt;
   ./robotgui&lt;br /&gt;
&lt;br /&gt;
See the instructions for using robotgui below to teleoperate the simulated robot. You can also build maps and autonomously navigate the robot as described further below. Maps should look the same as the original map unless there were differences in the parameters used (in either the paramfile or in the vasco program) when creating the original map and the new map. Remember that if you are running programs on multiple machines, you must set the CENTRALHOST environment variable to point to the machine on which you are running central.&lt;br /&gt;
&lt;br /&gt;
====Running it All Together====&lt;br /&gt;
&lt;br /&gt;
To initialize 8 xterm and to type all commands described above is time consuming. You can run all programs described above with a single command:&lt;br /&gt;
&lt;br /&gt;
   ./run_all.bat&lt;br /&gt;
&lt;br /&gt;
The command above is a bash script containing:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  ./central &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./param_daemon --robot p2d8+ ../data/mapa_do_ctvii_500k_64.map &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./simulator &amp;amp;&lt;br /&gt;
  ./robot &amp;amp;&lt;br /&gt;
  ./localize &amp;amp;&lt;br /&gt;
  ./navigator &amp;amp;&lt;br /&gt;
  ./navigatorgui &amp;amp;&lt;br /&gt;
  ./robotgui &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can stop all processes started in the script run_all.bat with the script:&lt;br /&gt;
  &lt;br /&gt;
  all_stop.bat&lt;br /&gt;
&lt;br /&gt;
The disadvantage of using the run_all.bat script is that all messages go to the same terminal, which might not be a good ideal if you are debugging a module.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may use the '''proccontrol''' tool:&lt;br /&gt;
&lt;br /&gt;
  ./proccontrol process.ini&lt;br /&gt;
&lt;br /&gt;
This program starts all programs described in process.ini and allow one to control them. Please refer to the process.ini file content to understand how to use it.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	<entry>
		<id>http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81335</id>
		<title>Running Carmen</title>
		<link rel="alternate" type="text/html" href="http://www.lcad.inf.ufes.br/wiki/index.php?title=Running_Carmen&amp;diff=81335"/>
				<updated>2017-10-04T14:13:11Z</updated>
		
		<summary type="html">&lt;p&gt;Vinicius Brito: /* In window 6, start the localize module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Carmen]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
This document is an aid to begin using the CARMEN robot sensing and navigation software, including (but not limited to) the following programs:&lt;br /&gt;
&lt;br /&gt;
* [[logger]]&lt;br /&gt;
This program stores sensor and odometry data with time stamps into a log file.&lt;br /&gt;
* playback&lt;br /&gt;
This program plays back a log file and send the stored messages to the other modules.&lt;br /&gt;
* [[map_editor]]&lt;br /&gt;
This program allows for creating or editting maps for use by Carmen.&lt;br /&gt;
* [[navigatorgui]]&lt;br /&gt;
This program provides a graphic interface which shows the robot's position and destiation on the pre-built map and allows setting of the current position and orientation, and selection of destinations.&lt;br /&gt;
* param_edit&lt;br /&gt;
This program enables the user to change parameters as the robot is running. It also makes it easy to save the changes to a &amp;quot;.ini&amp;quot; file.&lt;br /&gt;
* param_deamon&lt;br /&gt;
This program provides other programs with information about the robot being used and the area around it. This can include a pre-built map, sensors on the robot, and typical sensor error.&lt;br /&gt;
* robotgui&lt;br /&gt;
This program provides a simple graphic interface for the robot, allowing direct motion control and a display of current sensor information.&lt;br /&gt;
* processcontrol&lt;br /&gt;
This program controls the different processes, restarts them in case of a crash, etc.&lt;br /&gt;
* simulator&lt;br /&gt;
This program provides simulated data generation from a virtual robot. It requires a previously generated map.&lt;br /&gt;
* base_services&lt;br /&gt;
This program controls the movement of the robot and accepts inputs from the sensors. This program MUST run on the computer attatched to the robot hardware.&lt;br /&gt;
* localize&lt;br /&gt;
This program uses the sensor information from the baseServer to find the robot position in a map provided by param_deamon.&lt;br /&gt;
* navigator&lt;br /&gt;
This program enables autonomous navigation.&lt;br /&gt;
* vasco&lt;br /&gt;
This program creates a map from sensor and odometry data stored in a log file.&lt;br /&gt;
* vasco-tiny&lt;br /&gt;
A command line scan-matcher based on vasco. It reads log files and outputs a (locally) corrected log file. &lt;br /&gt;
&lt;br /&gt;
The links above will go to other pages with more complete descriptions and instructions for using these programs.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;central&amp;quot; program, IPC, enables communication between these and other programs. Information on using and coding with IPC can be found at http://www-2.cs.cmu.edu/afs/cs/project/TCA/www/ipc/ipc.html. A simplistic explanation of IPC: various programs &amp;quot;publish&amp;quot; generated information which is then &amp;quot;subscibed to&amp;quot; by other programs. IPC keeps track of what is published and delivers it to the subscribers.&lt;br /&gt;
&lt;br /&gt;
==Carmen use Scenaria==&lt;br /&gt;
The use of CARMEN will described using three different scenaria: simulating a robot and way-point navigation of it in a known map, tele-operating a robot, and building a map. Since CARMEN is modular software, each scenario will involve opening a bunch of different xterms and running different programs (called modules in the LCAD version of Carmen). Alternatively, one can use the program '''proccontrol''' to start and control each module.&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin.&lt;br /&gt;
&lt;br /&gt;
===Running a Simulated Robot===&lt;br /&gt;
&lt;br /&gt;
In this section you will learn how to run a simulation of the autonomous driving car from IARA project. Just follow the steps bellow to understand how each of the modules are initialized for this task. &lt;br /&gt;
&lt;br /&gt;
The modules shown in this tutorial may be replaced as the project is still in developpement. So we encourage you to check the 'process-navigate-volta-da-ufes-pid.ini' file. There you will see every module been used by this process (that is usualy the most update one). &lt;br /&gt;
&lt;br /&gt;
If you want to go directly to the simulation without following the steps bellow, just do:&lt;br /&gt;
&lt;br /&gt;
   cd $CARMEN_HOME/bin/&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
(first step)&lt;br /&gt;
And then, in another tab in the bin/ directory:&lt;br /&gt;
   ./proccontrol process-navigate-volta-da-ufes-pid.ini&lt;br /&gt;
&lt;br /&gt;
This will run all the commands automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====In window (xterm) 1, start the IPC central server====&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
If the central server is already running, you might receive the message:&lt;br /&gt;
&lt;br /&gt;
   Error: unable to bind TCP/IP socket for listening&lt;br /&gt;
&lt;br /&gt;
You can check if the server is running using the command:&lt;br /&gt;
   &lt;br /&gt;
   ps -a | grep central&lt;br /&gt;
&lt;br /&gt;
If there is a server running you will receive a message like this:&lt;br /&gt;
   &lt;br /&gt;
   6446 pts/0    00:00:00 central&lt;br /&gt;
&lt;br /&gt;
You can kill a running central using:&lt;br /&gt;
&lt;br /&gt;
   killall central&lt;br /&gt;
&lt;br /&gt;
If you are running programs on multiple machines, then you must specify on the other machines which machine is running central. This is done with the bash command:&lt;br /&gt;
&lt;br /&gt;
   export CENTRALHOST=[hostname]&lt;br /&gt;
&lt;br /&gt;
where [hostname] is the name of the machine on which central is running.&lt;br /&gt;
&lt;br /&gt;
Note: When running displays on off-robot computers, running the display programs off-robot rather than on-robot uses less bandwidth than piping the X display across the network.&lt;br /&gt;
&lt;br /&gt;
====In window 2, start the parameter server====&lt;br /&gt;
//////// Atual:&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon ../src/carmen-ford-escape.ini&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that read the parameters for LCAD's robots and modules from the parameter file &amp;quot;carmen/src/carmen-ford-escape.ini&amp;quot;. Some of the parameters contained in &amp;quot;carmen-ford-escape.ini&amp;quot; are informations about the localization, mapping and odometry modules, as well as the geometry of the sensors and the car it-self.&lt;br /&gt;
&lt;br /&gt;
Other command-line options are:&lt;br /&gt;
* [map_filename] Opens the map to get some information about it&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
//////// Como Era:&lt;br /&gt;
&lt;br /&gt;
   ./param_daemon --robot p2d8+ ../data/mapa_do_ctvii_500k_64.map&lt;br /&gt;
&lt;br /&gt;
The command above will start the param_deamon such that it serves parameters for the LCAD robot &amp;quot;p2d8+&amp;quot; from the parameter file &amp;quot;carmen/src/carmen.ini&amp;quot; and the map file &amp;quot;carmen/data/mapa_do_ctvii_500k_64.map.&amp;quot; Other command-line options are:&lt;br /&gt;
&lt;br /&gt;
* robot [robotname] directs the server to parameters specific to the robot which should exist in the specified parameter file.&lt;br /&gt;
* [mapfile.map] directs the server to a map file specific to the location. If you do not specify a mapfile, then no map will be served.&lt;br /&gt;
* [paramfile.ini] specifies a parameter file. If no file is specified, then parameters from carmen.ini will be used. The param_deamon will look first in the current directory, then the parent directory (../), and then ../src/ for carmen.ini.&lt;br /&gt;
* [-port portnum] specifies a port to be used for an ANT server&lt;br /&gt;
* [-noant] says not open an ANT server&lt;br /&gt;
* [-useant] says to use an ANT server&lt;br /&gt;
&lt;br /&gt;
====In window 3, start the proccontrol GUI====&lt;br /&gt;
/////// Atual:&lt;br /&gt;
   ./proccontrol_gui&lt;br /&gt;
&lt;br /&gt;
The command above will open an interface where you can easily monitor the modules running for this simulation. As you run other modules, their names will apear in the screen. &lt;br /&gt;
&lt;br /&gt;
/////// Como era (DEPRECATED):&lt;br /&gt;
&lt;br /&gt;
====In window 3, start the simulator====&lt;br /&gt;
   ./simulator&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately.&lt;br /&gt;
&lt;br /&gt;
/////// Atual&lt;br /&gt;
====In window 4, start the map server====&lt;br /&gt;
&lt;br /&gt;
   ./map_server -map_path ../data/map_ida_guarapari-20170403-2 -map_x 7756892.9 -map_y -364045.2 -block_map on  -lanemap_incoming_message_type 0&lt;br /&gt;
&lt;br /&gt;
In this case, the map_server program will generate the car's poses and the map from the informations contained in ../data/map_ida_guarapari-20170403-2 directory. Alternatively, you could directly load this informations from a file, with the '-map' command-line option.&lt;br /&gt;
&lt;br /&gt;
Essential command-line options:&lt;br /&gt;
* -map [map-file]         : Load an offline map from the [map-file].&lt;br /&gt;
* -map_path [path]        : Enter the path to the offline map directory.&lt;br /&gt;
* -map_x [float]          : map's x global position.&lt;br /&gt;
* -map_y [float]          : map's y global position.&lt;br /&gt;
* -block_map ['on'/'off'] : enable the generation of the map with the data inside the [path] directory.&lt;br /&gt;
&lt;br /&gt;
/////// Como era&lt;br /&gt;
&lt;br /&gt;
====In window 4, start the robot module====&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
Robot is a module that provides an abstract view to the hardware of the robot. If furthermore provides a elementary collision detection that is able to stop the robot in front of obstacles (if activated in the ini file: &amp;quot;robot_collision_avoidance on&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Robot has further functionalities: On the one hand, it combines the laser, sonar, and bumper data with the odometry information. On the other hand, robot should be used to send motion command to the robot.&lt;br /&gt;
&lt;br /&gt;
///// Atual&lt;br /&gt;
====In window 5, start the simulator module====&lt;br /&gt;
&lt;br /&gt;
   ./simulator_ackerman&lt;br /&gt;
&lt;br /&gt;
This command will start a moderately useful 2-D simulator, intended to replace the base module. It publishes odometry, laser messages and sonar messages. It accepts base velocity commands. The simulator always starts with its robot in the bottom right corner of the map (0,0), but subscribes to localize_initialize messages as well as simulator_set_truepose messages to initialize its robot position.&lt;br /&gt;
&lt;br /&gt;
The simulator can also run an instance of the robot module to provide collision prevention. This, however, needs to be activated in the ini file using the parameter &amp;quot;simulator_use_robot&amp;quot;. This parameter is disabled by default, which means that you have to start the module robot separately. &lt;br /&gt;
&lt;br /&gt;
////// Como era&lt;br /&gt;
&lt;br /&gt;
/////// Atual&lt;br /&gt;
====In window 6, start the localize module====&lt;br /&gt;
&lt;br /&gt;
   ./localize_ackerman -mapping_mode off&lt;br /&gt;
&lt;br /&gt;
The localize module implements the classical Monte-Carlo localization using a particle filter. It can perform global localization and pose tracking. Note that localize needs a map, otherwise, it will not work. The performance of localize mainly depends on the number of particles. The bigger that number, the slower runs the localization but is typically more robust.&lt;br /&gt;
&lt;br /&gt;
Localize uses a set of parameters that (strongly) influence the robustness and performance of localize. This is mainly the observation likelihood model and the noise in the motion model. You will find those parameters as expert parameters in the ini file. However, the standard configuration should work fine with robots equipped with SICK laser range finders.&lt;br /&gt;
&lt;br /&gt;
====In window 7, start the navigator module====&lt;br /&gt;
&lt;br /&gt;
   ./navigator&lt;br /&gt;
&lt;br /&gt;
The navigator uses a shortest-path motion planner to find a path from the current robot pose to a goal pose. If no path exists, the navigator finds a path to the nearest (in Euclidean distance) point that the robot can reach. The path is assumed to be a set of joined line-segments defined by a set of way-points. Once a path has been computed, if the navigator is put into autonomous mode (by sending a navigator_go() message), then the navigator will use a P-D controller to drive from one waypoint to the next.&lt;br /&gt;
&lt;br /&gt;
The navigator subscribes to global position messages from localize, odometry messages from the base and laser messages. The laser messages are used to make local changes to the map, allowing the navigator to replan around unmapped obstacles. The navigator does not require localize to be running, but navigation without accurate position estimates is likely to fail.&lt;br /&gt;
&lt;br /&gt;
====In window 8, start the navigatorgui program====&lt;br /&gt;
&lt;br /&gt;
   ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
This will open a graphic display. Place the simulated robot in the map by left-clicking on the &amp;quot;Place Simulator&amp;quot; button, and then left-clicking once on the desired location on the map. Then move the cursor away from the blue dot that appears, in the direction you wish the robot to face. A blue line appears between the cursor (now two curved arrows) and the simulated robot, indicating the facing of the robot. Left-click again to fix the facing of the robot.&lt;br /&gt;
&lt;br /&gt;
[[imagem:carmen-planner.png]]&lt;br /&gt;
&lt;br /&gt;
====In window 9, start the robotgui program====&lt;br /&gt;
&lt;br /&gt;
   ./robotgui&lt;br /&gt;
&lt;br /&gt;
See the instructions for using robotgui below to teleoperate the simulated robot. You can also build maps and autonomously navigate the robot as described further below. Maps should look the same as the original map unless there were differences in the parameters used (in either the paramfile or in the vasco program) when creating the original map and the new map. Remember that if you are running programs on multiple machines, you must set the CENTRALHOST environment variable to point to the machine on which you are running central.&lt;br /&gt;
&lt;br /&gt;
====Running it All Together====&lt;br /&gt;
&lt;br /&gt;
To initialize 8 xterm and to type all commands described above is time consuming. You can run all programs described above with a single command:&lt;br /&gt;
&lt;br /&gt;
   ./run_all.bat&lt;br /&gt;
&lt;br /&gt;
The command above is a bash script containing:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  ./central &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./param_daemon --robot p2d8+ ../data/mapa_do_ctvii_500k_64.map &amp;amp;&lt;br /&gt;
  sleep 1&lt;br /&gt;
  ./simulator &amp;amp;&lt;br /&gt;
  ./robot &amp;amp;&lt;br /&gt;
  ./localize &amp;amp;&lt;br /&gt;
  ./navigator &amp;amp;&lt;br /&gt;
  ./navigatorgui &amp;amp;&lt;br /&gt;
  ./robotgui &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can stop all processes started in the script run_all.bat with the script:&lt;br /&gt;
  &lt;br /&gt;
  all_stop.bat&lt;br /&gt;
&lt;br /&gt;
The disadvantage of using the run_all.bat script is that all messages go to the same terminal, which might not be a good ideal if you are debugging a module.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may use the '''proccontrol''' tool:&lt;br /&gt;
&lt;br /&gt;
  ./proccontrol process.ini&lt;br /&gt;
&lt;br /&gt;
This program starts all programs described in process.ini and allow one to control them. Please refer to the process.ini file content to understand how to use it.&lt;br /&gt;
&lt;br /&gt;
===Teleoperation of a Robot===&lt;br /&gt;
&lt;br /&gt;
Before starting, go to the Carmen sub-directory carmen/bin. &lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   ./param_deamon [paramfile.ini] --robot robotname&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   ./pioneer&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   ./robogui&lt;br /&gt;
&lt;br /&gt;
Note that if you have a pioneer or scout robot, you can run the base_services program instead of steps 3, 4, and 5. It is not yet working with other robot types.&lt;br /&gt;
&lt;br /&gt;
   ./base_services&lt;br /&gt;
&lt;br /&gt;
Here is a bit more detail on the programs to be run.&lt;br /&gt;
&lt;br /&gt;
* central&lt;br /&gt;
Run this anywhere, but other programs need an environment vairable set before you run them: &amp;quot;setenv CENTRALHOST [hostname]&amp;quot; if that program is being run on a different computer than central. This program must be started first. If stop this program (with cntl-c, typically), all the other Carmen programs will quit.&lt;br /&gt;
&lt;br /&gt;
* param_deamon --robot robotname [paramfile.ini]&lt;br /&gt;
The robotname option directs the server to parameters specific to the robot which should exist in the file &amp;quot;carmen.ini&amp;quot;. If you wish to use a parameter file other than carmen.ini, then that would be specified in the paramfile.ini option.&lt;br /&gt;
&lt;br /&gt;
* base_services&lt;br /&gt;
Run this program after central and param_deamon have been started. This program connects to the robot and to the various sensors on the robot, so it MUST run on the machine connected to that hardware.&lt;br /&gt;
&lt;br /&gt;
Note: This program combines three modules. If the robot hardware is divided among multiple computers, then the modules can be used independently on different computers. this currently only works with the Scout robots from Nomadics Technologies and the Pioneer robots from ActivMedia.&lt;br /&gt;
&lt;br /&gt;
*scout - This module co-ordinates the motion of the Scout robot and monitors robot odometry.&lt;br /&gt;
&lt;br /&gt;
* pioneer - This module co-ordinates the motion of the Pioneer robot and monitors robot odometry. It is an alternative to scout.&lt;br /&gt;
&lt;br /&gt;
* laser - this monitors the SICK LMS and PLS laser sensors.&lt;br /&gt;
&lt;br /&gt;
* robot - this module takes odometry and sensor readings and combines them for distribution to other programs. &lt;br /&gt;
&lt;br /&gt;
* robotgui -add_control on&lt;br /&gt;
This opens a display which shows the robot as a circle or rectangle in the center with a small line designating the front and also sensor information. Blue regions are obstacles or unknown, white is clear. Red edges in the laser display indicate indicate obstacles which are close enough to prevent forward motion. &lt;br /&gt;
&lt;br /&gt;
To turn the robot, use the left mouse button. Clicking near the robot will turn it right or left. To move the robot, click on the robot and drag the mouse pointer in the direction (relative to the &amp;quot;forward&amp;quot; indicator on the screen) you wish the robot to go. The robot indicator will turn red when you click on it, indicating that it is ready to move. The further from the robot you drag the cursor, the faster the robot will go.&lt;br /&gt;
&lt;br /&gt;
Or, if you have properly installed your joystick under linux, you can drive the robot with the joystick.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use keyboard commands to move the robot. The following keys will move the robot:&lt;br /&gt;
&lt;br /&gt;
*U I O&lt;br /&gt;
*J K L&lt;br /&gt;
*M , .&lt;br /&gt;
&lt;br /&gt;
with I moving the robot forward, U will move it forward and turning it left, O forward and right. J and L will turn the robot in place. Some robot param files are written so that the robot will not go backwards because some of our robots do not have rear sensing. M and . will move it backwards and turn, or just turn, depending on the parameter file. , will move it backwards or not at all. any other key, including K, will stop the robot. Speed cannot be controlled with this method. &lt;br /&gt;
&lt;br /&gt;
[[imagem:robotgraph.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the sensor data displayed is from a SICK PLS laser scanner. The robot is represented by the grey circle, facing the direction indicated by the black line. Dark blue edges are perceived objects, and lighter blue areas are unknown. The red edges are objects which are close enough that obstical avoidance routines will prevent forward motion.&lt;br /&gt;
&lt;br /&gt;
===Building a Map (using teleoperation)===&lt;br /&gt;
&lt;br /&gt;
To build a map, you can use either teleoperation or autonomous navigation. However, autonomous navigation requires that you start with a map, so this section describes how to do it with teleoperation. Another way to build a map is with the map editor program.&lt;br /&gt;
&lt;br /&gt;
While the robot is moving, you will need to run the logger program.&lt;br /&gt;
&lt;br /&gt;
Run steps 1 through 6 above for teleoperating the robot, then:&lt;br /&gt;
&lt;br /&gt;
7. In window 7, start the loggger&lt;br /&gt;
&lt;br /&gt;
   ./logger [filename].log&lt;br /&gt;
&lt;br /&gt;
[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than &amp;quot;Y&amp;quot; or &amp;quot;y&amp;quot; is given, then the logger will quit.&lt;br /&gt;
&lt;br /&gt;
Drive the robot around, covering your environment, then stop the logger by typing a CONTROL-C in the logger xterm. Before quitting the other programs (or after restarting them at a later time), run vasco on the logfile you created&lt;br /&gt;
&lt;br /&gt;
    ./vasco file.log&lt;br /&gt;
&lt;br /&gt;
This program opens an interface which displays sensor data compiled with raw odometry data, as in this image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco1.gif]]&lt;br /&gt;
&lt;br /&gt;
To correct for odometry error, click the &amp;quot;scan match&amp;quot; button on the upper right. After some computation time (progress is indicated on the lower left), the display will change, as in this second image:&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco2.gif]]&lt;br /&gt;
&lt;br /&gt;
This data was generated moving a robot from a lab (center right) into a corridor, up and down the corridor some distance, then back to the lab. The odd &amp;quot;fuzz&amp;quot; in the center of the corridor is actually the legs of people walking by as the data was gathered.&lt;br /&gt;
&lt;br /&gt;
To create the final map to be used with param_deamon, now click the &amp;quot;Make Evidence Grid&amp;quot; button on the upper right. A new display will open allowing you to adjust parameters for creating the mapfile. At first, you should stick with the defaults.&lt;br /&gt;
&lt;br /&gt;
[[imagem:vasco3.gif]]&lt;br /&gt;
&lt;br /&gt;
When you click &amp;quot;Okay,&amp;quot; that display will disappear, a new one will open and the map will form as you watch.&lt;br /&gt;
&lt;br /&gt;
[[imagem:egrid.gif]]&lt;br /&gt;
&lt;br /&gt;
Note that the data which showed the people walking through the image has not effected the final map. To save this as a map, click on the &amp;quot;File&amp;quot; menu and save as a &amp;quot;.map&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file can then be used through your param_deamon program to allow for localization and autonomous navigation through the area you mapped.&lt;br /&gt;
&lt;br /&gt;
===Autonomous Navigation===&lt;br /&gt;
&lt;br /&gt;
This begins as if you were teleoperating the robot, but with a change in the param_deamon options to add the map file, and with other programs added.&lt;br /&gt;
&lt;br /&gt;
1. In window 1, start the IPC central server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./central&lt;br /&gt;
&lt;br /&gt;
2. In window 2, start the parameter server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./param_deamon [paramfile.ini] --robot robotname mapfile.map&lt;br /&gt;
&lt;br /&gt;
3. In window 3, start the base server that corresponds to your robot&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./scout&lt;br /&gt;
&lt;br /&gt;
4. In window 4, start the laser server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./laser&lt;br /&gt;
&lt;br /&gt;
5. In window 5, start the robot server&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robot&lt;br /&gt;
&lt;br /&gt;
6. In window 6, start the robotgui program&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./robotgui&lt;br /&gt;
&lt;br /&gt;
7. In window 7, Run the localizer&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./localize&lt;br /&gt;
&lt;br /&gt;
8. In window 8, Run the path planner&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigator&lt;br /&gt;
&lt;br /&gt;
9. In window 9, Run the path planner graphics module&lt;br /&gt;
&lt;br /&gt;
   cd carmen/bin ; ./navigatorgui&lt;br /&gt;
&lt;br /&gt;
Here is more detail on the new programs.&lt;br /&gt;
&lt;br /&gt;
* localize&lt;br /&gt;
This program takes sensor data from base_services and compares it to the map to localize the robot on that map.&lt;br /&gt;
* navigator&lt;br /&gt;
This program plans the path from the robot's current location to its destination and tells base_services how to move the robot.&lt;br /&gt;
* navigatorgui&lt;br /&gt;
This program provides a user interface for telling the robot where it is and where to go. To set the robot position on the map display, simply left-click the &amp;quot;Place Robot&amp;quot; button, then left-click the desired location on the map. The cursor will change into a pair of curved arrows, and a red dot appears ti indicate the robot location. A line between the dot and the cursor indicates the direction the robot's orientation. Left-click again to fix the robot orientation. If you are using a simulated robot, this will also place and orient the simulated robot. To separate the simulated robot from it's perceived location, you must set the simulator location after setting the robot location. &lt;br /&gt;
&lt;br /&gt;
You can now control the robot using the navigator. You can then left click on the map to give the robot a goal. Select the &amp;quot;Go&amp;quot; button to send the robot from its current location to the selected goal. Select the &amp;quot;Stop&amp;quot; button (the same location as the &amp;quot;Go&amp;quot; button) to make the robot stop at any time.&lt;br /&gt;
&lt;br /&gt;
[[imagem:navpanel.gif]]&lt;br /&gt;
&lt;br /&gt;
In this image, the robot's current perceived position is represented by the red circle, and the simulated position is represented by the blue circle. The robot's goal is represented by the yellow circle. The planned path is represented by the blue line. The planned path will change as the robot moves toward the goal and encounters obsticles. The scale of the image can be changed by moving the lower slide-bar.&lt;/div&gt;</summary>
		<author><name>Vinicius Brito</name></author>	</entry>

	</feed>