ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

House_hold objects database

asked 2012-12-13 18:09:32 -0500

umakarthiga gravatar image

I dont have clear idea of using table_top detector and how to restore the household objects database in pgadmin3.Can anyone guide me through this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
6

answered 2012-12-13 20:24:14 -0500

updated 2012-12-14 04:47:23 -0500

Household objects database is used by Tabletop object recognition.

To install household objects database server, you can refer to this page. But I can give you steps.

To create server

1.Open a terminal, type

sudo apt-get install postgresql

2.After the installation, type the command below to become user postgres

sudo su - postgres

For example, it's like

rosfuerte@rosfuerte-K53SM:~$ sudo su - postgres
[sudo] password for rosfuerte: 
postgres@rosfuerte-K53SM:~$

3.Next, type psql to enter postgre sql interpreter, it's like

postgres@rosfuerte-K53SM:~$ psql
psql (9.1.6)
Type "help" for help.

postgres=#

4.Then, add a new user willow by entering CREATE ROLE ...(Don't forget the semicolon)

postgres=# CREATE ROLE willow LOGIN CREATEDB CREATEROLE PASSWORD 'willow';

5.Leave the interpreter

postgres=# \q
postgres@rosfuerte-K53SM:~$

To make connection over TCP/IP works

1.Get the paths of the files(pg_hba.conf & postgresql.conf) you need to modify

postgres@rosfuerte-K53SM:~$ ps auxw | grep postgresql
postgres  1170  0.0  0.1 132084 10400 ?        S    09:53   0:00 /usr/lib/postgresql/9.1/bin/postgres -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf
postgres  4095  0.0  0.0  13612   916 pts/1    S+   11:32   0:00 grep postgresql

2.Modify pg_hba.conf(usually is /etc/postgresql/9.1/main/pg_hba.conf), You need to add these two lines in the bottom of this file

# Anybody through TCP/IP with password
host    all         all         0.0.0.0   0.0.0.0     md5

3.Modify postgresql.conf(usually is /etc/postgresql/9.1/main/postgresql.conf), add this line to the file

listen_addresses = '*'

4.Log out postgres user

exit

5.Reboot your computer

To add object database to server

1.Install PGAdmin3

sudo apt-get install pgadmin3

2.Launch PGAdmin3 by enter

pgadmin3

3.Press the plugin button on the upper-left of PGAdmin GUI

4.Enter the name(whatever name you want)

5.Set the host, enter "localhost"

6.Enter password, which is "willow"

7.When your GUI looks like this, press OK

image description

8.Now you can see your server on Object Browser on the left, press right button of the mouse on "Databases" under the server

9.Choose "New Database..."

10.Set the name and the owner, like(you should follow the name in the picture below) image description

11.Press right button of the mouse on the newly added database

12.Press "Restore..."

13.Download the database backup file by

svn export https://code.ros.org/svn/data/trunk/household_objects/household_objects-0.6_fuerte_prerelease_1.backup

14.Restore the file

image description

15.Press "Restore"(Restore process need some time to complete), then you finished installing the household objects database


To use this database, you first need to create a yaml file, for example, I should create my_server.yaml

household_objects_database:
  database_host: localhost
  database_port: 5432
  database_user: willow
  database_pass: willow
  database_name: household_objects

To integrate the database with tabletop object detector, you should create a launch file(in this example, I created a package named ricky_tabletop_object_detector, I put my_server.yaml ... (more)

edit flag offensive delete link more

Comments

How to remove it ?!!

Amal gravatar image Amal  ( 2012-12-15 02:19:11 -0500 )edit

Why you need to remove the database? If you don't want to use this database, you can select the datadase a node use by modifying .yaml file

Po-Jen Lai gravatar image Po-Jen Lai  ( 2012-12-15 03:33:26 -0500 )edit

I want to use but I have a problem in pg_hba.conf file it not accessible... so I have some thing to do but want to remove it first then install !! do you have any suggestion ?!

Amal gravatar image Amal  ( 2012-12-15 04:03:43 -0500 )edit

you mean you cannot edit /etc/postgresql/9.1/main/pg_hba.conf? If you want to remove postgresql, use sudo apt-get purge postgresql

Po-Jen Lai gravatar image Po-Jen Lai  ( 2012-12-15 13:08:21 -0500 )edit

yes, I can not edit it any way. Do you have any suggestion about this ?!

Amal gravatar image Amal  ( 2012-12-16 05:23:36 -0500 )edit

Are you editing it when you are user postgres?

Po-Jen Lai gravatar image Po-Jen Lai  ( 2012-12-16 21:04:10 -0500 )edit

@Ricky Thanks a lot.I will try on this

umakarthiga gravatar image umakarthiga  ( 2012-12-17 00:56:40 -0500 )edit

Welcome : ) Feel free to ask~

Po-Jen Lai gravatar image Po-Jen Lai  ( 2012-12-17 03:28:40 -0500 )edit

Question Tools

6 followers

Stats

Asked: 2012-12-13 18:09:32 -0500

Seen: 987 times

Last updated: Dec 14 '12