Skip to content
Junya-s edited this page May 15, 2017 · 33 revisions

ROS-TMS Database (mongodb)

MongoDB version

  • DB version = mongodb 2.4.9
  • Tool version = pymongo 2.6.3

install pymongo2.6.3

 sudo apt-get install python-pip
 python -m pip install pymongo==2.6.3

tms_db_manager package

roslaunch tms_db_manager tms_db_manager.launch 
rosrun tms_db_manager tms_db_writer.py
rosrun tms_db_manager tms_db_reader.py
rosrun tms_db_manager tms_db_publisher.py

If you want to run tms_db_backuper.py:

roslaunch tms_db_manager tms_db_manager.launch backup:=true

Dump

roscd tms_db_manager/json/
rm -r dump/
mongodump --host localhost --port 27017 --out dump/

Store

roscd tms_db_manager/json/
mongorestore --host localhost --port 27017 dump/

Export

roscd tms_db_manager/json/
mongoexport --db rostmsdb --collection default --out default.json
mongoexport --db rostmsdb --collection now --out now.json

Import

roscd tms_db_manager/json/
mongoimport --db rostmsdb --collection default --file default.json
mongoimport --db rostmsdb --collection now --file now.json

DB backup

roscd tms_db_manager/json/
./backup.sh

DB sort

roscd tms_db_manager/json/
./sort.py

web browser

http://localhost:27017/

GUI Tool

http://robomongo.org/

tmsdbStamped.msg

Header            header
tms_msg_db/Tmsdb[]  tmsdb

tmsdb.msg

string    time
string    type
int32     id
string    name
float64   x
float64   y
float64   z
float64   rr
float64   rp
float64   ry
float64   offset_x
float64   offset_y
float64   offset_z
string    joint
float64   weight
string    rfid
string    etcdata
int32     place
string    extfile
int32     sensor
float64   probability
int32     state
string    task
string    note
string    tag
string    announce

TmsdbGetData.srv

tms_msg_db/Tmsdb  tmsdb
---
tms_msg_db/Tmsdb[]  tmsdb

The contents of each item of tmsdb

column name content datatype
time Time (ms unit)​ string
type Target type​ string
id Target ID​ int32
name Target name​ string
x Target position of x​ float64
y Target position of y​ float64
z Target position of z​ float64
rr Roll (x axis)​ float64
rp Pitch (y axis)​ float64
ry Yaw (z axis)​ float64
offset_x Offset X from the center point float64
offset_y Offset y from the center point float64
offset_z Offset z from the center point float64
joint Angle of each joint​ string
weight Weight​ float64
rfid Number of RF tag string
etcdata Other values, temperature, etc.​ string
place Location int32
extfile External file, FTP Addr such as pcd and image file string
sensor Sensor ID​ int32
probability Probability (0.0~1.0) float64
state State​ int32
task Task​ string
note note​ string
tag tag​ string
announce announce string
  • joint (smartpal5) : lumba_low, lumba_high, jR[0]...[6], gripper_right, jL[0]...[6], gripper_left

Basic unit of ROS-TMS

Unit ROS ROS-TMS
length meter mm
mass kilogram gram
time second micro sec
current ampere ampere
angle radian degree
frequency hertz hertz
force newton newton
power watt watt
voltage volt volt
temperature celsius celsius
time GMT GMT +9H

Coordinates of ROS-TMS

coordinate explanation color
x Forward R
y Left G
z Up B

Object 25

移動候補点の定義:【id table】

👍 robot/furnitureのetc_dataに,以下の形で定義 (複数のロボットに対して定義するときは,「;」で繋ぐ)

robot_name;x(mm),y(mm),yaw(deg)

タスクの定義:【id table(8001~8999)】

例(get_object): 9001$oid 9002$oid + 9003$uid +

User Requestから来る最大の引数データ

oid:object_id, uid:user_id, rid:robot_id, pid:place_id

Clone this wiki locally