Skip to content

Commit

Permalink
add jsk_database_scripts package
Browse files Browse the repository at this point in the history
  • Loading branch information
knorth55 committed Nov 29, 2022
1 parent a8464dc commit ca71854
Show file tree
Hide file tree
Showing 31 changed files with 19,067 additions and 0 deletions.
8 changes: 8 additions & 0 deletions jsk_database_scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.0.2)
project(jsk_database_scripts)

find_package(catkin REQUIRED)

catkin_package()

include_directories()
54 changes: 54 additions & 0 deletions jsk_database_scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# jsk_database_scripts

## mongodb

JSK mongodb database server config

This project is originally created by Yuki Furuta (@furushchev) and modified by Shingo Kitagawa (@knorth55)

This project is moved from [knorth55/toolbox](https://github.com/knorth55/toolbox.git)

### Installation

Please see [./mongodb/docker](./mongodb/docker) for more information.

### Backup mongodb to QNAP

```bash
cd ./mongodb
sudo bash ./backup_to_qnap.sh
```

## influxdb

JSK influxdb database server config

### Systemctl service installation

```bash
sudo cp ./influxdb/systemd/* /etc/systemd/system
sudo systemctl daemon-reload
# enable your service
sudo systemctl enable jsk-pr1040-influxdb.service
```

## gdrive

JSK gdrive server config

### Systemctl service installation

```bash
sudo cp ./gdrive/systemd/* /etc/systemd/system
sudo systemctl daemon-reload
# enable your service
sudo systemctl enable jsk-pr1040-gdrive.service
```

## grafana

JSK grafana server config

### Grafana models for InfluxDB

You can find models JSON file in [./grafana/models](./grafana/models).
12 changes: 12 additions & 0 deletions jsk_database_scripts/gdrive/systemd/jsk-fetch1075-gdrive.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=JSK Fetch1075 gdrive server
After=network-online.target
Wants=network-online.target

[Service]
User=applications
Group=applications
ExecStart=/bin/bash -c "source /home/applications/ros/melodic/devel/setup.bash && rossetip && rossetmaster fetch1075 && GOOGLE_DRIVE_SETTINGS_YAML=/var/lib/robot/gdrive/pydrive_settings.yaml rosrun jsk_tools roscore_regardless.py --respawn --timeout 3 --ping-trials 1 --sigint-timeout 5 --sigterm-timeout 5 roslaunch gdrive_ros gdrive_server.launch node_name:=gdrive_record_server"

[Install]
WantedBy=multi-user.target
12 changes: 12 additions & 0 deletions jsk_database_scripts/gdrive/systemd/jsk-fetch15-gdrive.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=JSK Fetch15 gdrive server
After=network-online.target
Wants=network-online.target

[Service]
User=applications
Group=applications
ExecStart=/bin/bash -c "source /home/applications/ros/melodic/devel/setup.bash && rossetip && rossetmaster fetch15 && GOOGLE_DRIVE_SETTINGS_YAML=/var/lib/robot/gdrive/pydrive_settings.yaml rosrun jsk_tools roscore_regardless.py --respawn --timeout 3 --ping-trials 1 --sigint-timeout 5 --sigterm-timeout 5 roslaunch gdrive_ros gdrive_server.launch node_name:=gdrive_record_server"

[Install]
WantedBy=multi-user.target
12 changes: 12 additions & 0 deletions jsk_database_scripts/gdrive/systemd/jsk-pr1012-gdrive.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=JSK PR1012 gdrive server
After=network-online.target
Wants=network-online.target

[Service]
User=applications
Group=applications
ExecStart=/bin/bash -c "source /home/applications/ros/melodic/devel/setup.bash && rossetip && rossetmaster pr1012 && GOOGLE_DRIVE_SETTINGS_YAML=/var/lib/robot/gdrive/pydrive_settings.yaml rosrun jsk_tools roscore_regardless.py --respawn --timeout 1 --ping-trials 1 --sigint-timeout 5 --sigterm-timeout 5 roslaunch gdrive_ros gdrive_server.launch node_name:=gdrive_record_server"

[Install]
WantedBy=multi-user.target
12 changes: 12 additions & 0 deletions jsk_database_scripts/gdrive/systemd/jsk-pr1040-gdrive.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=JSK PR1040 gdrive server
After=network-online.target
Wants=network-online.target

[Service]
User=applications
Group=applications
ExecStart=/bin/bash -c "source /home/applications/ros/melodic/devel/setup.bash && rossetip && rossetmaster pr1040 && GOOGLE_DRIVE_SETTINGS_YAML=/var/lib/robot/gdrive/pydrive_settings.yaml rosrun jsk_tools roscore_regardless.py --respawn --timeout 1 --ping-trials 1 --sigint-timeout 5 --sigterm-timeout 5 roslaunch gdrive_ros gdrive_server.launch node_name:=gdrive_record_server"

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=JSK Fetch1075 gdrive recorder
After=network-online.target
Wants=network-online.target

[Service]
User=applications
Group=applications
ExecStart=/bin/bash -c "source /home/applications/ros/melodic/devel/setup.bash && rossetip && rossetmaster fetch1075 && rosrun jsk_tools roscore_regardless.py --respawn --timeout 3 --ping-trials 1 --sigint-timeout 5 --sigterm-timeout 5 rosrun gdrive_recorder gdrive_recorder.py _video_path:=/tmp _database:=fetch1075 _timezone:=Asia/Tokyo _robot_type:=fetch _robot_name:=fetch1075"

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=JSK Fetch15 gdrive recorder
After=network-online.target
Wants=network-online.target

[Service]
User=applications
Group=applications
ExecStart=/bin/bash -c "source /home/applications/ros/melodic/devel/setup.bash && rossetip && rossetmaster fetch15 && rosrun jsk_tools roscore_regardless.py --respawn --timeout 3 --ping-trials 1 --sigint-timeout 5 --sigterm-timeout 5 rosrun gdrive_recorder gdrive_recorder.py _video_path:=/tmp _database:=fetch15 _timezone:=Asia/Tokyo _robot_type:=fetch _robot_name:=fetch15"

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=JSK PR1012 gdrive recorder
After=network-online.target
Wants=network-online.target

[Service]
User=applications
Group=applications
ExecStart=/bin/bash -c "source /home/applications/ros/melodic/devel/setup.bash && rossetip && rossetmaster pr1012 && rosrun jsk_tools roscore_regardless.py --respawn --timeout 1 --ping-trials 1 --sigint-timeout 5 --sigterm-timeout 5 rosrun gdrive_recorder gdrive_recorder.py _video_path:=/tmp _database:=pr1012 _timezone:=Asia/Tokyo _robot_type:=pr2 _robot_name:=pr1012"

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=JSK PR1040 gdrive recorder
After=network-online.target
Wants=network-online.target

[Service]
User=applications
Group=applications
ExecStart=/bin/bash -c "source /home/applications/ros/melodic/devel/setup.bash && rossetip && rossetmaster pr1040 && rosrun jsk_tools roscore_regardless.py --respawn --timeout 1 --ping-trials 1 --sigint-timeout 5 --sigterm-timeout 5 rosrun gdrive_recorder gdrive_recorder.py _video_path:=/tmp _database:=pr1040 _timezone:=Asia/Tokyo _robot_type:=pr2 _robot_name:=pr1040"

[Install]
WantedBy=multi-user.target
Loading

0 comments on commit ca71854

Please sign in to comment.