-
Notifications
You must be signed in to change notification settings - Fork 19
tms_db
Yoonseok Pyo edited this page Aug 27, 2015
·
33 revisions
$ sudo vi /etc/hostname
ros-tms-server
$ sudo vi /etc/hosts
127.0.1.1 ros-tms-server
$ sudo reboot
mkdir ~/mongodb_store
sudo gedit /etc/mongodb.conf
bind_ip = 127.0.0.1 → bind_ip = 0.0.0.0
HOSTNAME=ros-tms-server roslaunch mongodb_store mongodb_store.launch db_path:=/home/rts/mongodb_store port:=62345
table name | type | explanation |
---|---|---|
id | none | Basic information |
history_data | none | History data |
backup_data | none | Long-term storage data |
data_person | Object 1000 : person | Data (person) |
data_robot | Object 2000 : robot | Data (robot) |
data_sensor | Object 3000 : sensor | Data (sensor) |
data_structure | Location 4000 : structure | Data (structure) |
data_space | Location 5000 : space | Data (space) |
data_furniture | Location 6000 : furniture | Data (furniture) |
data_object | Location 7000 : object | Data (object) |
data_task | Task 8000 : task | Data (task) |
data_subtask | Task 9000 : subtask | Data (subtask) |
data_state | Task 10000 : state | Data (state of environment) |
CREATE TABLE `data` (
`time` datetime(6) NOT NULL,
`type` varchar(30) DEFAULT NULL,
`id` int(11) DEFAULT NULL,
`name` varchar(30) DEFAULT NULL,
`x` double DEFAULT NULL,
`y` double DEFAULT NULL,
`z` double DEFAULT NULL,
`rr` double DEFAULT NULL,
`rp` double DEFAULT NULL,
`ry` double DEFAULT NULL,
`offset_x` double DEFAULT NULL,
`offset_y` double DEFAULT NULL,
`offset_z` double DEFAULT NULL,
`joint` varchar(500) DEFAULT NULL,
`weight` double DEFAULT NULL,
`rfid` varchar(30) DEFAULT NULL,
`etcdata` varchar(500) DEFAULT NULL,
`place` int(11) DEFAULT NULL,
`extfile` varchar(500) DEFAULT NULL,
`sensor` int(11) DEFAULT NULL,
`probability` double DEFAULT NULL,
`state` int(11) DEFAULT NULL,
`task` varchar(500) DEFAULT NULL,
`note` varchar(500) DEFAULT NULL,
`tag` varchar(500) DEFAULT NULL,
PRIMARY KEY (`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
👍 robot/furnitureのetc_dataに,以下の形で定義 (複数のロボットに対して定義するときは,「;」で繋ぐ)
robot_name;x(mm),y(mm),yaw(deg)
例(get_object): 9001$oid 9002$oid + 9003$uid +
User Requestから来る最大の引数データ
oid:object_id, uid:user_id, rid:robot_id, pid:place_id
UPDATE `rostmsdb`.`id` SET `time`='0', `x`='0', `y`='0', `z`='0', `rr`='0', `rp`='0', `ry`='0', `offset_x`='0', `offset_y`='0', `offset_z`='0', `joint`='', `weight`='0', `rfid`='', `etcdata`='', `place`='0', `extfile`='', `sensor`='0', `probability`='0.0', `state`='0', `task`='', `note`='', `tag`='' WHERE `id`='1000';
SELECT * FROM rostmsdb.id;
id, PRIMARY KEY (`id`)
history_data, PRIMARY KEY (`time`)
backup_data, PRIMARY KEY (`time`)
data_xxx, PRIMARY KEY (`time`)
Header header
tms_msg_db/Tmsdb[] tmsdb
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
tms_msg_db/Tmsdb tmsdb
---
tms_msg_db/Tmsdb[] 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 |
- joint (smartpal5) : lumba_low, lumba_high, jR[0]...[6], gripper_right, jL[0]...[6], gripper_left
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 |
coordinate | explanation | color |
---|---|---|
x | Forward | R |
y | Left | G |
z | Up | B |
- Center coordinates of the model: Middle of model
sudo apt-get install vsftpd
sudo nano /etc/vsftpd.conf
anonymous_enable=NO local_enable=YES wirte_enable=YES local_umask=022
sudo adduser rtsftp
ftp 192.168.4.170 id: rtsftp pw: tmsftp
sudo apt-get install mysql-server-5.6 mysql-client-5.6
sudo nano /etc/mysql/my.cnf
#skip-external-locking #bind-address = 127.0.0.1
mysql -u root -p
mysql> create database rostmsdb;
mysql> show databases;
mysql> GRANT ALL PRIVILEGES ON *.* TO root@"%" identified by 'tmsdb';
mysql> flush privileges;
mysqldump -h 192.168.4.170 -u root -p rostmsdb > rostmsdb.sql
mysqldump -h 192.168.4.170 -u root -p rostmsdb id > rostmsdb_id.sql
- password : tmsdb
mysql -h 192.168.4.170 -u root -p rostmsdb < rostmsdb.sql
mysql -h 192.168.4.170 -u root -p rostmsdb < rostmsdb_id.sql
mysql -h 192.168.4.170 -u root -p
sudo apt-get install mysql-client mysql-client-5.5 mysql-workbench
- bug of mysql-workbench (2014.04)
- https://bugs.launchpad.net/ubuntu/+source/mysql-workbench/+bug/1287424
http://192.168.4.170/phpmyadmin/
- id : tmsdb
- password : tmsdb
http://dev.mysql.com/doc/refman/5.6/en/index.html
ros_tms/tms_rp/tms_models/model_list.txt
ROS-TMS
Messages of ROS-TMS
Database
Task Scheduler
Robot Controller
Robot Motion Planning
Robot Service
Sensor Drive
Sensor System
- tms_ss_fss
- tms_ss_his
- tms_ss_ics
- tms_ss_ods
- tms_ss_vicon
- tms_ss_vs
- tms_ss_pot
- tms_ss_nfbed
- tms_ss_whs1
- tms_ss_pozyx
State Analyzer
User Request
Network module for Hierarchical ROS-TMS
ROS-TMS Developer
ETC.