Monday, September 3, 2012

Installing Contiki 2.6 and Cooja Simulator in Ubuntu 12.04


Are you working with WSN or IoT? Probably you have heard about Contiki. Since a while I'm interested in using Contiki like operative system for a wireless sensor network. In this post I'm going to explain you how to install it in Ubuntu. Please read more about in the contiki page project http://www.contiki-os.org. In that page you can download "Instant Contiki", which is an virtual image disk where is ubuntu installed and all the contiki related things (cooja,contiki os, eclipse IDE for programming) configured, ready to use. But if you'd rather install it by your own, follow the next steps

1) Download contiki source from here.

2) Unzip the contiki-2.6.zip file

3) Try if Contiki works running an example from directory "examples". To compile the hello-world example,


cd contiki-2.6/examples/hello-world 
make TARGET=native
./hello-world.native

You should see the following output

Contiki 2.6 started
Rime started with address 2.1
MAC nullmac RDC nullrdc NETWORK Rime
Hello, world


After testing that hello world example you can clean the temporary files created during the compilation,

make clean


4) Procede installing java, because the cooja is a java based simulator,

sudo apt-get install openjdk-6-jdk

5) To compile cooja, install ant which is a compile tool,

sudo apt-get install ant


6) To compile and start cooja I gave the commands,cd tools/cooja

ant run

To remove all the temporary files created during the compilation, use ant clean 

7) If you're a begginer with Contiki OS I strongly recommend you to read the Getting started section step 3 for running Contiki on Cooja simulator.

Enjoy it!! :)





Installing player with stage

 I took a mobile robotic course and I have to do some homework with player/stage. Here I share some usefull links & tips that I found. Sorry for my short post!

How to install player stage

Usefull tutorial in http://wiki.tekkotsu.org/index.php/Player/Stage_install_instructions
  
How to solve install error fx.run()

http://old.nabble.com/Stage-install-error-td32665566.html

changing in CMake
 //Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=-Wl,--no-as-needed

Error can't load plugin

Uninstall player, delete build folder and try all again



Enjoy robotic :)!!