13 October 2011

Installing PCL on Ubuntu 11.04


Add the PCL to the repository
sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
Update repository
sudo apt-get update
Install repository
sudo apt-get install libpcl-all
It would be better you add ROS to your repository before installing PCL. This add some of the optional dependencies of PCL which are there in ROS. Moreover OpenNI is also installed automatically from ROS repo which relieves you from the burden ofconnecting kinect by installing all the dependencies on by one.
ROS Diamondback repository - 
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu natty main" > /etc/apt/sources.list.d/ros-latest.list' 

$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -

$ sudo apt-get update

10 October 2011

Installing OGRE on Ubuntu 11.04

Download following files before installation -
1. Ogre SDK
2. Object Oriented Input System(OIS) Source
3. Perl Compatible Regular Expression (PCRE)
4. Install nvdia-cg-toolkit from synaptic or download from here.
5. Type this command to install other dependencies -
$ sudo apt-get install build-essential autoconf libtool libdevil-dev libfreeimage-dev libfreetype6-dev libglew1.5-dev libxaw7-dev libxrandr-dev libxt-dev libxxf86vm-dev libzzip-dev

Step 1:  Building OIS
   Extract OIS to any folder and type following commands from terminal to build.
$ ./bootstrap
$ ./configure
$ make
$ sudo make install

Step 2: Building Nvidia CG toolkit if you have downloaded the source.
 Extract into a folder and type the following commands -
$ ./configure
$ make -j4
This 4 can be any number which specifies the number of threads you want to use for the make process.
$ sudo make install
$ sudo ldconfig

Step 3: Installing PCRE
Extract the files and type the following command from the terminal -
$ ./configure --enable-utf8
$ make -j4
$ sudo make install

Make link to the shared object in /usr/lib folder by typing following command.
$ sudo ln -s /lib/x86_64-linux-gnu/libpcre.so.3 /usr/lib/libpcre.so.0
Now we are ready to install Ogre.

Step 4: Installing OGRE SDK
Extract the ogre files and type the following commands from the terminal.
$ cmake-gui .
This will open the cmake gui tool. Click on the configure button. Now all the required libraries will be configured and shown. Tick the build samples and build doc check boxes. Also check if all the required libraries are present. Now click on generate button. After generating you may close this gui.
Type following commands in terminal after exiting the gui.
$ make -j4
$ sudo make install

Step 5: Installing CEGUI
Extract the files in some folder and type the following lines from the terminal.
$ ./configure
$ make -j4
$ sudo make install

Now open .bashrc file and the following line at the end of it.
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH



Reference links -
1. http://ubuntuforums.org/showthread.php?t=1148570
2. http://www.ogre3d.org/tikiwiki/Building+Ogre+With+CMake

6 October 2011

Important links required to make own linux distibution

1. https://help.ubuntu.com/community/LiveCDCustomization - Ubuntu Live CD Customization site
2. https://help.ubuntu.com/community/UbuntuBootupHowto - Ubuntu Boot Up Changing Site
3. http://ubuntuclub.com/files/04-Techniques.txt - Some customization techniques
4. http://ubuntuforums.org/showthread.php?t=1073838 - Remastersys steps to customize own distribution
5. http://www.ubuntugeek.com/creating-custom-ubuntu-live-cd-with-remastersys.html - Using Remastersys
6. https://help.ubuntu.com/community/Grub2 - Grub2 customization instructions
7. http://www.remastersys.com/info.html - Remastersys website for information
8. https://help.ubuntu.com/community/Kernel/Compile - Compiling kernel for greater customization
9. http://theindexer.wordpress.com/2011/04/03/to-do-list-after-installing-ubuntu-11-04-aka-natty-narwhal/ - Packages and repositories for newly installed systems
10. http://blog.sarathonline.com/2009/03/how-to-make-local-offline-repository-in.html - Making a local repository
11. http://members.iinet.net/~herman546/p20/GRUB2%20Splashimages.html - Changing grub splash screen
12. http://ubuntuguide.net/an-effective-way-changing-ubuntu-11-04-login-screen-appearance - Changing login window appearance
13. http://www.unixmen.com/linux-distributions/4/265-great-themes-for-ubuntu-904-jaunty-jackalope - Some theme installations for ubuntu
14. http://ubuntuguide.net/an-easy-way-to-addchange-grub2-background-image-in-ubuntu-11-04 - Changing grub background splash image.
15. http://www.youtube.com/watch?v=_6j05f9SccY - Improving boot time of ubuntu.
16. http://brej.org/blog/?p=158 - Creating plymouth splash screen

4 October 2011

Installing latest version of remastersys on Ubuntu 11.10

 Remastersys is a tool that can be used to do 2 things with an existing Debian,  Ubuntu or derivative installation.
  1. It can make a full system backup including personal data to a live cd or dvd that you can use anywhere and install.
  2. It can make a distributable copy you can share with friends.  This will not have any of your personal user data in it.

I haven't found any specific method to install remastersys properly. Everytime, some works and some don't. So I try different methods in this order and everytime atleast one of them works. Sounds funny but works for me.

Method 1
1. Go to this link  http://www.remastersys.com/ubuntu/remastersys.gpg.key and save this key on your disk.
2. In synaptic, go to Settings/Repositories; select "Authentication" tab and "Import Key File" just downloaded.
3. Still in synaptic, go to "Other Software" tab and click "Add", then enter the apt line and replace oneiric with either lucid, maverick, or natty to match your Ubuntu version:
    deb http://www.remastersys.com/ubuntu oneiric main
4. Leave the repositories tab and "Reload".
5. Search for "remastersys" and select for install.  Edit/Apply Marked Changes.

This might give error some times.

Method 2
1. Type the following key in the terminal to add the key of the repository to the synaptic.
    sudo wget -O - http://www.remastersys.com/ubuntu/remastersys.gpg.key | apt-key add -
2. Add the following line that corresponds to your version of Ubuntu to your /etc/apt/sources.list

#Remastersys Lucid
deb http://www.remastersys.com/ubuntu lucid main

#Remastersys Maverick

deb http://www.remastersys.com/ubuntu maverick main

#Remastersys Natty

deb http://www.remastersys.com/ubuntu natty main

#Remastersys Oneiric

deb http://www.remastersys.com/ubuntu oneiric main

3. Type the following line in the terminal
    sudo apt-get update
4. Now open the synaptic package manager and search for remastersys and install it.

If the above two methods give error. Remove the packages from your sources.list file.

Method 3
1. Go to this link http://www.remastersys.com/repository/ and download the appropriate version of remastersys. For ubuntu, it will be in karmic folder or similar other ubuntu version.
2. Double click on it so that it may open in software center directly. Now click on install.


Reference:
1. http://www.remastersys.com/

2 October 2011

Setting up Ogre Project in Visual Studio 2010

Prerequisites - 

  • Visual Studio 2010 must be installed.
  • Ogre SDK 1.7 or greater must be installed. Use this link for installation details.
Steps to setup project - 


1. Set Environment variable - 
   Run setx OGRE_HOME path_to_ogre_sdk in a command console (cmd.exe).
   Alternatively create a batch file to set the variable. 
   Filename: OgreHome.bat
   Contents: setx OGRE_HOME %CD%
                  pause
   Location: Ogre Extracted folder ( Eg:-C:\OgreSDK_vc10_v1-7-3)

2. Create a new Visual Studio Project
   Make sure the windows application is selected and empty project is checked.
  

I kept the name as OgreProject.

2. Now download the sample ogre files to be included in the project - TutorialsFramework.zip.
   After downloading this zip file, extract the file into the project folder.
   Add those files to the project by selecting Add->Existing Item...

3. Change the project configuration.
   
Switch to All Configurations:

Under General Properties, set the Character Set to Multi-Byte Character Set


Under Debuggin Configuration Properties, set the following values:
Command : $(OGRE_HOME)\Bin\$(Configuration)\$(ProjectName).exe
Working Directory: $(OGRE_HOME)\Bin\$(Configuration)
   
  Now Goto Configuration Properties->C/C++->General->Additional Include Directories add following:
  $(OGRE_HOME)\include
$(OGRE_HOME)\include\OIS
$(OGRE_HOME)\include\OGRE 
$(OGRE_HOME)\Samples\Common\include
$(OGRE_HOME)\boost_1_44

In Configuration->Linker->General->Additional Library Directories add following - $(OGRE_HOME)\lib\$(Configuration)
$(OGRE_HOME)\boost_1_44\lib

In Configuration Properties->Build Events->Post Build Event->Command Line, add:
copy "$(OutDir)\$(TargetFileName)" "$(OGRE_HOME)\Bin\$(Configuration)"


Now make some Configuration Specific Settings. Switch Configuration to Active(Debug) : 

Add Input libaries for debug : 
OgreMain_d.lib
OIS_d.lib

Configuration Properties -> Linker -> Input ->Additional Dependencies -> Release
Switch configuration from Active(debug) to Active(release).
Add input libraries for release: 
OgreMain.lib
OIS.lib

4. Now Build your project and see the output. All executables generated are sent to the Ogre SDK's->Bin Folder as all the Ogre .dll files are there. So you may execute from there as well.