Wednesday, September 22, 2010

NetBeans 6.9 - compiling C/C++ Windows

I just installed the new NetBeans 6.9.1 and tried to compile the examples that came with it.

I got a funny dialog pop-up (missing make).

To found make.exe on my windows computer and put in the path, but i was still getting error:
make[2]: mkdir: Command not found

Then i installed MinGW as recommended and included the MSYS option with it.

And was still getting the error and finally changed the PATH variable. Added path to C:\MinGW\bin
first before anything else.

run NetBeans again and it worked !!!!!

Monday, July 26, 2010

How to Install Aria on 64 bit Ubuntu + java wrapper

If you try to install it out of the bow will not work.

Here is what you need to do.
1) download aria's 32 bit .deb (latest will be best)
2) install it
3) download aria's 32 bit java wrapper (should match your aria version)
4) install it

kris@ubuntu:~/Downloads$ sudo dpkg -i --force-architecture libaria
libaria_2.7.1_i386.deb libaria_2.7.2_i386.deb libaria-java_2.7.2_i386.deb
kris@ubuntu:~/Downloads$ sudo dpkg -i --force-architecture libaria_2.7.2_i386.deb
dpkg: warning: overriding problem because --force enabled:
package architecture (i386) does not match system (amd64)
(Reading database ... 300524 files and directories currently installed.)
Preparing to replace libaria 2.7.1 (using libaria_2.7.2_i386.deb) ...
Unpacking replacement libaria ...
The ARIA directory /usr/local/Aria was not removed, in case you left some file there. Use purge to remove it.
Setting up libaria (2.7.2) ...
ARIA has been installed in /usr/local/Aria.
Header files are in /usr/local/Aria/include. Documentation is in /usr/local/Aria/docs. is in /usr/local/Aria/lib.
Adding /usr/local/Aria/lib to /etc/
running ldconfig...

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
kris@ubuntu:~/Downloads$ sudo dpkg -i --force-architecture libaria-java_2.7.2_i386.deb
dpkg: warning: overriding problem because --force enabled:
package architecture (i386) does not match system (amd64)
(Reading database ... 300539 files and directories currently installed.)
Preparing to replace libaria-java 2.7.2 (using libaria-java_2.7.2_i386.deb) ...
Unpacking replacement libaria-java ...
Setting up libaria-java (2.7.2) ...
AriaJava has been installed in /usr/local/Aria/java. See /usr/local/Aria/javaExamples for information and example programs.

Friday, June 4, 2010

Tooth fairy vs Shunk fairy

My wisdom tooth is growing which caused my right side to swell and hurts at a constant rate. Today I went to the Dental emergency at U PENN Dental Clinic, long story short, I am in pain and will have to wait till 23rd for tooth extraction. End result i lost friday and I am still in pain.

The Shunk Arm arrived on Thursday, but it didn't have the cable in, so me and Rolf tried to get it work it out, using the manual and the Windows software that came with it, we ended up staying till 8:30 pm, but at least we got it to recognize the correct ids, but still didn't make it work.
I got a message from Rolf, he got the arm working, I suspect it was something in the wiring.

I had problems with compiling Andreas Nuechter's SLAM6D, and after installing all libraries in the README and some others I wrote him an email. It turned out that I found a bug, a quick fix was to comment most modules from the Makefile.options, till they fix it. He updated the SVN and got the new source, this time I managed to compile most stuff, but there are still modules that do not compile.

i commented
-PMD camera options
-SIFT based registration

Since we have all robot parts, it is design time. I will explain the design in a later post, for now enjoy the robot pics above.

Friday, May 28, 2010

Bye,Bye Aria - Welcome Carmen

After a long week of reading and small quick and dirty python scripts to visualize RADISH data format, by just plotting the laser readings using the odometry of the robot ( I used the MIT court data-set). Rolf came back from vacation and told me about Grisseti's GridSlam GMapping approach.

I installed Ubuntu 10.04 LTS
uname -a
Linux ubuntu 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:28:05 UTC 2010 x86_64 GNU/Linux

I got Carmen from SVN
svn co --username anonymous

I had to install a bunch of things to get it to compile, see

Last time i tried to build it on my older ACER laptop failed ( I think i used the .gz file as it says in the docs), but this time i got it all working.
kris@ubuntu:~/Downloads/carmen/carmen/src$ ./configure
Using $CC as gcc...
Found processor x86_64.
Congratulations. You are running Linux.
Found kernel 2.6.32-22-generic.
This doesn't look like SuSE!
Searching for linux kernel headers... found at /usr/src/linux-headers-2.6.32-22-generic
Searching for canlib... Found canlib header at /usr/include/canlib.h
Searching for GTK... found, version 2.20.0
Searching for joystick... found at /usr/include/linux/joystick.h

It looks like this is a system include, so I won't add it to the standard
include path. Adding partial system include paths is usually a recipe for
disaster. If this is the wrong thing to do, you could add the following
line to Makefile.vars:
JOYSTICK_INCLUDE = -I/usr/include/linux/joystick.h

Searching for tcpd.h... found
Looks like your system supports access control. Very good.
Searching for jpeglib.h... found
Searching for zlib.h... found
Searching for ImageMagick (Wand)... not found
Searching for Java... not found
Searching for doxygen... found
Searching for SWIG... found
Should IPC run in silent mode by default: [Y/n]
Should the C++ tools be installed for CARMEN: [Y/n]
Should Python Bindings be installed: [y/N]
Should the old laser server be used instead of the new one: [y/N]

Type the install prefix to use for public installs, or hit enter to keep the
default as /usr/local. (This prefix is not currently used by any rules.)

Install path [/usr/local/]:

You must have Linux kernel 2.0.20 to compile:
Nomadic Technologies XR4000

These are the robot types CARMEN currently supports:
1. ActiveMedia Pioneer I
2. ActiveMedia Pioneer II
3. iRobot ATRV
4. iRobot ATRV-JR
5. iRobot B21R
6. Scout
7. OrcBoard v.4
8. OrcBoard v.5 (Experimental)
9. Segway RMP
10. *

Please select which robots you wish to compile base modules for.
e.g., 1, 2, 6 would compile support for both Pioneer types and a Scout.
Hit enter to compile them all, or type "none" to compile no base module
support, for example, if you will be working exclusively in simulation.

Robot numbers [*]: 1,2

Compiling base support for: pioneer

I ran all binary files and found the docs somewhat useful

Running ./vasco was a pleasant surprise [you can get .log data from RADISH database]

Next I got GMapping
svn co
I don't think i had big troubles compiling it, then I ran the ./gfs_simplegui

it worked really fast on the MIT data, but it had some kinks.

Today I showed all that to Rolf and tried to make Carmen control the physical robot. Rolf bought a generic USB joystick after i told him we can navigate the robot manually and collect data in CARMEN format using Carmen's framework.

I connected the Serial -> USB box to my Ubuntu laptop, then looked at the /dev
ls /dev
you will see that serial ports from the USB box are named as
Changed the parameters in the ../../carmen.ini file (the parameter server) to set laser_laser_dev to /dev/ttyUSB3

then when you run ./laser will show

kris@ubuntu:~/Downloads/carmen/carmen/bin$ ./laser
CARMEN - Carnegie Mellon Robot Navigation Toolkit - Version 0.8.0

This instance of laser will use the lasers with the ids: [1 2 3 4 5]

Laser id ........................... 1
Requested baud rate ................ 38400 kbps
Checking requested configuration ... see below
Requested laser configuration:
type ............................. SICK_LMS
remission_mode ................... none
resolution ....................... 1.00 deg
max range ........................ 81.900 m
fov .............................. 180 deg
start angle ...................... -90.00 deg
Initialization device .............. done

Connecting device .................. connected
Querying baudrate ................ 9600 . success
Detected baudrate ................ 9600 kbps
Setting new baudrate ............. done (reconnect needed)

Reconnecting device ................ connected
Querying baudrate ................ 9600 ........ failed
19200 ........ failed
38400 . success
Detected baudrate ................ 38400 kbps
Baudrate is already correct ...... done
Connection to laser device succeded

Configuring laser device ........... see below
Querying configuration ........... ok
Setting the config mode .......... done (laser light is red)
Setting range and remission ...... config accepted
Setting variant .................. accepted
Switching to monitorning mode ... done
Configuration of laser device succeded

Initializing of laser with 0 successfully completed!

Info: Starting thread for laser 1
Info: The laser 2 is not used in this instance of laser
Info: The laser 3 is not used in this instance of laser
Info: The laser 4 is not used in this instance of laser
Info: The laser 5 is not used in this instance of laser

Timestamp calibration for laser 1, please wait a few seconds (100 scans)
N.....................................................................................................Estimated frequency of laser 1 is 9.4697 Hz
status: send-queue: 0 msg(s), laser-msg freqency: 9.709 Hz (globally)
After you make sure you get the laser working, you change the base_dev parameter in the parameter server (carmen.ini) to point to where you have connected the robot's serial, mine was in /dev/ttyUSB2

I spend a good amount of time before i found that i need to use, either
p2d8 or p2d8+dual as robot names, even though my robot is AT3.
I had to add several parameter, which are not included by default in the carmen.ini


# Parameters for Pioneer 2-DX8 Plus
base_type pioneer
base_model p2d8+
base_dev /dev/ttyUSB2
base_relative_wheelsize 1.0
base_relative_wheelbase 1.0

If all is good you will get a message that the robot connected

To control the robot make sure you know what device you have your joystick on, mine was /dev/input/js0

Then we took the robot for a short laser-scan-walk around the Temple CIS dept, 3rd floor.

Then plotted the collected data using vasco and gmapping

Wednesday, May 5, 2010

Connecting ARIA with Pioneer Robot

Today was the first time I managed to connect and run ARIA using the Pioneer robot, not the simulation.

I mounted the SICK Laser scanner using adhesive and connected its serial to the BOX (I will add the correct name later). Then connected the robot's serial to the serial of the BOX.

BOX description:
port 1 - still waiting for the Arm
port 2 - still waiting for the LRU
port 3 - Robot
port 4 - Laser

Then installed the windows drivers for the BOX and saw that it maps the ports to COM13-17
After spending 2 hours the previous day, trying to figure out why ARIA can't connect to the robot, even thought i was specifying the ports ( -rp COM17) when running the .java

Rolf discovered the problem. Windows is not happy when the port number is greater than 9.
So today I went into the Device Manager -> Advanced and choose ports 1,2,3,4. Some were showing In USE, but do not worry just choose and confirm.

First found the Robot and then the laser, there is a soft restart for the laser each time ARIA connects to it, so waiting for 10-15 sec.
I was able to log the laser reading using ArLasserLogger() - it takes the robot instance, filename, start_angle, end_angle, see Docs for more explanation.

I was not able to get the robot to wander, not relying on the sonar sensors, but I got it working on the Aria Simulator and I want to try if the recorder map can be read by MobilEyes.

For now I am using my 6 years ACER Laptop running Windows XP, SP3, the battery is bad and It heats up a lot. I am looking forward to the new laptops as well as for 2D Robotic Arm and LRU.

Tuesday, May 4, 2010

Building Aria in Java ++

I thought building the java examples would be a 5 min task, but it turned out that in NetBeans creating a library and including the library path is different than adding the jar as library ?!.

The other obstacle was having 64 bit Windows 7, I tried forcing Windows 7 to run NetBeans as Windows XP, but Java is too smart and still used the 64 bit, where Aria's jar is 32 bit.
To solve this problem I tried 2 things:
-recompile aria's jar to 64 bit - FAILED
-force NetBeans to use 32 bit - GOT too LAZY

so my solution was to switch to my other computer (32 bit Windows XP SP3)
There was no problem there. To save time, if you see any of these errors please read above !!!

java.lang.UnsatisfiedLinkError: C:\Program Files\MobileRobots\Aria\bin\AriaJava.dll: Can't find dependent libraries