Skip to content

Commit 68921d6

Browse files
committed
Update: README.md
1 parent 0779d05 commit 68921d6

File tree

7 files changed

+194
-39
lines changed

7 files changed

+194
-39
lines changed

README.md

+19-5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ ROS2-TMS-FOR-CONSTRUCTION is developed as an IoRT library for construction appli
1818

1919
Project page: [https://moonshot-cafe-project.org/en/](https://moonshot-cafe-project.org/en/)
2020

21+
### Architecture
22+
23+
![](docs/ros2-tms-for-construction_archtecture.png)
24+
2125
## Install
2226

2327
### ROS2 Foxy
@@ -57,7 +61,7 @@ mkdir -p ~/ros2-tms-for-constructoin_ws/src
5761

5862
```
5963
cd ~/ros2-tms-for-constructoin_ws/src/
60-
git clone https://github.com/irvs/ros2_tms_for_construction.git
64+
git clone https://github.com/irvs/ros2_tms_for_construction.git
6165
```
6266

6367
### Build the workspace
@@ -87,10 +91,12 @@ ROS2-TMS-FOR-CONSTRUCTION has the following packages. You can see detail descrip
8791

8892
- [tms_sd_terrain](tms_sd/tms_sd_terrain)
8993

90-
tms_sd_terrain is a package for converting PointCloud2 msg to .pcd file and sending the file info to tms_db_writer_gridfs.
94+
tms_sd_terrain is a package for handling point cloud data of static and dynamic terrain.
9195

9296
The received PointCloud2 msg is a point cloud data of terrain.
9397

98+
Static terrain refers to terrain that does not change during construction operations. And dynamic terrain refers to terrain that changes during construction work.
99+
94100
### tms_sp
95101

96102
- [tms_sp_machine_odom](tms_sp/tms_sp_machine_odom)
@@ -99,6 +105,14 @@ ROS2-TMS-FOR-CONSTRUCTION has the following packages. You can see detail descrip
99105

100106
The received Odometry msg is the estimated location data of the construction machine.
101107

108+
### tms_ss
109+
110+
- [tms_ss_terrain_static](tms_ss/tms_ss_terrain_static)
111+
112+
tms_ss_terrain_static is a package for handling point cloud data of static terrain.
113+
114+
The received PointCloud2 msg is a point cloud data of terrain.
115+
102116
### tms_ur
103117

104118
- [tms_ur_construction](tms_ur/tms_ur_construction)
@@ -137,9 +151,9 @@ ros2 launch tms_sp_machine_odom tms_sp_machine_odom_launch.py input/odom:=/demo/
137151
ros2 launch tms_sd_ground tms_sd_ground_launch.py input/occupancy_grid:=/demo/occupancy_grid ground_name:=demo_ground
138152
139153
# PointCloud2
140-
ros2 launch tms_sd_terrain tms_sd_terrain_launch.py input/pointcloud2:=/demo/pointcloud2 filename:=demo.pcd
154+
ros2 launch tms_sd_terrain tms_sd_terrain_launch.py input/terrain/static/pointcloud2:=/demo/pointcloud2 input/terrain/dynamic/pointcloud2:=/pod_1/points filename:=demo.pcd
141155
```
142-
156+
# TODO prepare demo data of dynamic terrain
143157
#### Play rosbag
144158

145159
```
@@ -197,7 +211,7 @@ ros2 launch tms_sp_machine_odom tms_sp_machine_odom_launch.py input/odom:=/demo/
197211
ros2 launch tms_sd_ground tms_sd_ground_launch.py input/occupancy_grid:=/demo/occupancy_grid ground_name:=demo_ground
198212
199213
# PointCloud2
200-
ros2 launch tms_sd_terrain tms_sd_terrain_launch.py input/pointcloud2:=/demo/pointcloud2 filename:=demo.pcd
214+
ros2 launch tms_sd_terrain tms_sd_terrain_launch.py input/terrain/static/pointcloud2:=/demo/pointcloud2 input/terrain/dynamic/pointcloud2:=/pod_1/points filename:=demo.pcd
201215
```
202216

203217
#### Rviz2
307 KB
Loading

tms_db/tms_db_manager/README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ After the below command, service nodes are executed that get requested data in R
1212
ros2 launch tms_db_manager tms_db_reader.launch.py db_host:=localhost db_port:=27017
1313
```
1414

15-
### Servers
15+
### Services
1616

1717
| Name | Type | Description |
1818
| ---------------------- | ------------------------------------- | ------------------------------------------- |
1919
| `tms_db_reader` | `tms_msg_db::srv::TmsdbGetData` | get data stored in ROS2-TMS database |
20-
| `tms_db_reader_gridfs` | `tms_msg_db::srv::TmsdbGridFSGetData` | get GridFS data stored in ROS2-TMS database |
20+
21+
### Actions
22+
23+
| Name | Type | Description |
24+
| ---------------------- | --------------------------------- | ------------------------------------------- |
25+
| `tms_db_reader_gridfs` | `tms_msg_db::action::TmsdbGridFS` | get GridFS data stored in ROS2-TMS database |
2126

2227
## Writer
2328

tms_msg/README.md

+58-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,45 @@
11
# TMS Messages
22

3-
Messages and Services used in ROS2-TMS-FOR-CONSTRUCTION.
3+
Actinos, Messages and Services used in ROS2-TMS-FOR-CONSTRUCTION.
4+
5+
## Actions
6+
7+
### TmsdbGridFS
8+
9+
TmsdbGridFS is used by [tms_db_reader_gridfs](../tms_db/tms_db_manager/tms_db_manager/tms_db_reader_gridfs.py) to get file from TMS database.
10+
11+
```
12+
string type
13+
int32 id
14+
string filename
15+
bool latest_only
16+
---
17+
bool result
18+
string msg
19+
sensor_msgs/PointCloud2 pointcloud2
20+
---
21+
bool result
22+
string msg
23+
sensor_msgs/PointCloud2 pointcloud2
24+
```
425

526
## Messages
627

28+
### ColoredMesh
29+
30+
ColoredMesh is used by ColoredMeshSrv.
31+
32+
```
33+
shape_msgs/MeshTriangle[] triangles
34+
geometry_msgs/Point[] vertices
35+
std_msgs/ColorRGBA[] vertex_colors
36+
geometry_msgs/Vector3[] vertex_normals
37+
38+
```
39+
740
### Tmsdb
841

9-
Tmsdb is subscribed by [tms_db_writer](https://github.com/irvs/ros2_tms_for_construction/blob/main/tms_db/tms_db_manager/tms_db_manager/tms_db_writer.py).
42+
Tmsdb is subscribed by [tms_db_writer](../tms_db/tms_db_manager/tms_db_manager/tms_db_writer.py).
1043

1144
```
1245
string time # Time this msg was created.
@@ -19,7 +52,7 @@ string msg # JSON msg converted from ROS msg.
1952

2053
### TmsdbGridFS
2154

22-
TmsdbGridFS is subscribed by [tms_db_writer_gridfs](https://github.com/irvs/ros2_tms_for_construction/blob/main/tms_db/tms_db_manager/tms_db_manager/tms_db_writer_gridfs.py).
55+
TmsdbGridFS is subscribed by [tms_db_writer_gridfs](../tms_db/tms_db_manager/tms_db_manager/tms_db_writer_gridfs.py).
2356

2457
```
2558
string time # Time this msg was created.
@@ -30,9 +63,29 @@ string filename # File name of the file to be stored in the database.
3063

3164
## Services
3265

66+
### ColoredMeshSrv
67+
68+
ColoredMeshSrv is used by [tms_ur_construction_terrain_static](../tms_ur/tms_ur_construction/tms_ur_construction/tms_ur_construction_terrain_static.py) to get colored mesh data of static terrain.
69+
70+
```
71+
string type
72+
---
73+
tms_msg_db/ColoredMesh colored_mesh
74+
```
75+
76+
### TerrainStaticSrv
77+
78+
TerrainStaticSrv is used by [tms_ur_construction_terrain_mesh](../tms_ur/tms_ur_construction/tms_ur_construction/tms_ur_construction_terrain_mesh.py) to get point cloud data of static terrain.
79+
80+
```
81+
string type
82+
---
83+
sensor_msgs/PointCloud2 pointcloud2
84+
```
85+
3386
### TmsdbGetData
3487

35-
TmsdbGetData is used by [tms_db_reader](https://github.com/irvs/ros2_tms_for_construction/blob/main/tms_db/tms_db_manager/tms_db_manager/tms_db_reader.py) to get data from TMS database.
88+
TmsdbGetData is used by [tms_db_reader](../tms_db/tms_db_manager/tms_db_manager/tms_db_reader.py) to get data from TMS database.
3689

3790
```
3891
string type # Data type (ex. sensor, machine).
@@ -44,7 +97,7 @@ tms_msg_db/Tmsdb[] tmsdbs
4497

4598
### TmsdbGridFSGetData
4699

47-
TmsdbGetData is used by [tms_db_reader_gridfs](https://github.com/irvs/ros2_tms_for_construction/blob/main/tms_db/tms_db_manager/tms_db_manager/tms_db_reader_gridfs.py) to get file from TMS database.
100+
TmsdbGetData is used by [tms_db_reader_gridfs](../tms_db/tms_db_manager/tms_db_manager/tms_db_reader_gridfs.py) to get file from TMS database.
48101

49102
```
50103
string type # Data type (ex. sensor, machine).

tms_sd/tms_sd_terrain/README.md

+17-7
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ tms_sd_tarrain package has two nodes tms_sd_terrain_static and tms_sd_terrain_dy
44

55
- tms_sd_terrain_static
66

7-
tms_sd_terrain_static converts PointCloud2 msg to .pcd file and sends the file info to tms_db_writer_gridfs.
7+
tms_sd_terrain_static relay PointCloud2 msg to [tms_ss_terrain_static](../../tms_ss/tms_ss_terrain_static).
88

99
- tms_sd_terrain_dynamic
1010

11-
tms_sd_terrain_dynamic formats PointCloud2 msg to TmsdbGridFS msg and sends it to tms_db_writer_gridfs.
11+
tms_sd_terrain_dynamic formats PointCloud2 msg to TmsdbGridFS msg and sends it to [tms_db_writer_gridfs](../../tms_db/tms_db_manager).
1212

1313
Received PointCloud2 msg is a point cloud data of terrain.
1414

1515
# Usecase
1616

17-
## 1. Run tms_db_writer or tms_db_manager
17+
## 1. Run tms_db_writer_gridfs or tms_db_manager
1818

19-
Detail description is [here](https://github.com/irvs/ros2_tms_for_construction/tree/main/tms_db).
19+
Detail description is [here](../../tms_db/tms_db_manager).
2020

21-
Receive TmsdbGridFS from tms_sd_terrain and store them in ROS2-TMS database.
21+
Receive TmsdbGridFS from tms_ss_terrain_static and store them in ROS2-TMS database.
2222

2323
### Writer
2424

@@ -34,10 +34,12 @@ ros2 launch tms_db_manager tms_db_manager.launch.py db_host:=localhost db_port:=
3434

3535
## 2. Run tms_sd_terrain
3636

37-
After the below command, a node is executed that subscribes PointCloud2 and publishes TmsdbGridFS including the .pcd file info converted from the PointCloud2.
37+
Detail description is [here](../../tms_sd/tms_sd_terrain)
38+
39+
Relay static terrain's PointCloud2 msg to tms_ss_terrain_static.
3840

3941
```
40-
ros2 launch tms_sd_terrain tms_sd_terrain_launch.py input/terrain/static/pointcloud2:=/topic/of/static/pointcloud2 input/terrain/dynamic/pointcloud2:=/topic/of/dynamic/pointcloud2 filename:=demo.pcd
42+
ros2 launch tms_sd_terrain tms_sd_terrain_launch.py input/terrain/static/pointcloud2:=/topic/of/static/pointcloud2 input/terrain/dynamic/pointcloud2:=/topic/of/dynamic/pointcloud2
4143
```
4244

4345
### Inputs / Outputs
@@ -60,3 +62,11 @@ ros2 launch tms_sd_terrain tms_sd_terrain_launch.py input/terrain/static/pointcl
6062
| Name | Type | Default Value | Description |
6163
| ------------------- | ------ | --------------------- | ----------------------------------------------------------- |
6264
| `filename` | string | `filename` | .pcd file name of static terrain converted from PointCloud2 |
65+
66+
## 3. Run tms_ss_terrain_static
67+
68+
After the following command, a node is executed that subscribes PointCloud2 and publishes TmsdbGridFS including the .pcd or .ply file info converted from the PointCloud2.
69+
70+
```
71+
ros2 launch tms_ss_terrain_static tms_ss_terrain_static_launch.py filename:=demo.pcd filename_mesh:=demo.ply voxel_size:=0.1 octree_depth:=8 density_th:=0.1
72+
```
+69-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,75 @@
11
# tms_ss_terrain_static
22

3+
tms_ss_terrain_static is a package for handling point cloud data of static terrain.
4+
5+
- tms_ss_terrain_static
6+
7+
tms_ss_terrain_static converts PointCloud2 msg to .pcd file and sends the file info to [tms_db_writer_gridfs](../../tms_db/tms_db_manager).
8+
9+
- tms_ss_terrain_static_mesh
10+
11+
tms_ss_terrain_static_mesh converts PointCloud2 msg to .ply (mesh) file and sends the file info to [tms_db_writer_gridfs](../../tms_db/tms_db_manager).
12+
13+
The received PointCloud2 msg is a point cloud data of static terrain.
14+
315
# Usecase
416

17+
## 1. Run tms_db_writer_gridfs or tms_db_manager
18+
19+
Detail description is [here](../../tms_db/tms_db_manager).
20+
21+
Receive TmsdbGridFS from tms_ss_terrain_static and store them in ROS2-TMS database.
22+
23+
### Writer
24+
25+
```
26+
ros2 launch tms_db_manager tms_db_writer.launch.py db_host:=localhost db_port:=27017 init_db:=true
27+
```
28+
29+
### Reader and Writer
30+
31+
```
32+
ros2 launch tms_db_manager tms_db_manager.launch.py db_host:=localhost db_port:=27017 init_db:=true
33+
```
34+
35+
## 2. Run tms_sd_terrain
36+
37+
Detail description is [here](../../tms_sd/tms_sd_terrain)
38+
39+
Relay static terrain's PointCloud2 msg to tms_ss_terrain_static.
40+
41+
```
42+
ros2 launch tms_sd_terrain tms_sd_terrain_launch.py input/terrain/static/pointcloud2:=/topic/of/static/pointcloud2 input/terrain/dynamic/pointcloud2:=/topic/of/dynamic/pointcloud2
43+
```
44+
45+
## 3. Run tms_ss_terrain_static
46+
47+
After the following command, a node is executed that subscribes PointCloud2 and publishes TmsdbGridFS including the .pcd or .ply file info converted from the PointCloud2.
48+
549
```
650
ros2 launch tms_ss_terrain_static tms_ss_terrain_static_launch.py filename:=demo.pcd filename_mesh:=demo.ply voxel_size:=0.1 octree_depth:=8 density_th:=0.1
7-
```
51+
```
52+
53+
### Inputs / Outputs
54+
55+
**Inputs**
56+
57+
| Name | Type | Description |
58+
| ------------------------- | ------------------------------- | ----------------------------------- |
59+
| `/tms_sd_terrain_static` | `sensor_msgs::msg::PointCloud2` | point cloud data of static terrain |
60+
61+
**Outputs**
62+
63+
| Name | Type | Description |
64+
| --------------------- | ------------------------------ | ----------------------------------------------------------------- |
65+
| `/tms_db_gridfs_data` | `tms_msg_db::msg::TmsdbGridFS` | .pcd or .ply file info of static terrain or static terrain's mesh |
66+
67+
### Parameters
68+
69+
| Name | Type | Default Value | Description |
70+
| --------------- | ------ | ------------------- | -------------------------------------------------------------------------- |
71+
| `filename` | string | `filename.pcd` | .pcd file name of static terrain converted from PointCloud2 |
72+
| `filename_mesh` | string | `filename_mesh.ply` | .ply file name of static terrain's mesh converted from PointCloud2 |
73+
| `voxel_size` | float | `0.0` | voxel size of downsampling |
74+
| `octree_depth` | int | `2` | octree depth to generate mesh |
75+
| `density_th` | float | `0.1` | density threshold to remove vertices and triangles that have a low support |

tms_ur/tms_ur_construction/README.md

+24-19
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,28 @@ After the below command, nodes are executed that request data to a service node
3232
ros2 launch tms_ur_construction tms_ur_construction_launch.py output/occupancy_grid:=/topic/of/occupancy_grid latest:=true filename:=cloud.pcd voxel_size:=0.5
3333
```
3434

35-
#### Servers / Outputs
35+
#### Services / Actions / Outputs
3636

37-
**Servers**
37+
**Services**
3838

3939
| Name | Type | Description |
4040
| ---------------------- | ------------------------------------- | ------------------------------------------- |
4141
| `tms_db_reader` | `tms_msg_db::srv::TmsdbGetData` | get data stored in ROS2-TMS database |
42-
| `tms_db_reader_gridfs` | `tms_msg_db::srv::TmsdbGridFSGetData` | get GridFS data stored in ROS2-TMS database |
42+
43+
**Actions**
44+
45+
| Name | Type | Description |
46+
| ---------------------- | --------------------------------- | ------------------------------------------- |
47+
| `tms_db_reader_gridfs` | `tms_msg_db::action::TmsdbGridFS` | get GridFS data stored in ROS2-TMS database |
4348

4449
**Outputs**
4550

46-
| Name | Type | Description |
47-
| ------------------------------------- | ------------------------------- | ------------------------------------------ |
48-
| `/output/occupancy_grid` | `nav_msgs::msg::OccupancyGrid` | heatmap showing the hardness of the ground |
49-
| `/output/terrain/static/pointcloud2` | `sensor_msgs::msg::PointCloud2` | point cloud data of static terrain |
50-
| `/output/terrain/dynamic/pointcloud2` | `sensor_msgs::msg::PointCloud2` | point cloud data of dynamic terrain |
51-
| `/output/odom` | `nav_msgs::msg::Odometry` | location of machine |
51+
| Name | Type | Description |
52+
| ------------------------------------- | ----------------------------------- | ----------------------------------------------------------- |
53+
| `/output/occupancy_grid` | `nav_msgs::msg::OccupancyGrid` | heatmap showing the hardness of the ground |
54+
| `/output/terrain/static_srv` | `tms_msg_db::srv::TerrainStaticSrv` | return point cloud data of static terrain to service client |
55+
| `/output/terrain/dynamic/pointcloud2` | `sensor_msgs::msg::PointCloud2` | point cloud data of dynamic terrain |
56+
| `/output/odom` | `nav_msgs::msg::Odometry` | location of machine |
5257

5358
#### Parameters
5459

@@ -60,25 +65,25 @@ ros2 launch tms_ur_construction tms_ur_construction_launch.py output/occupancy_g
6065

6166
### 2. construction_terrain_mesh
6267

63-
After the below command, a node is executed that requests .pcd file info to a service node and publishes Mesh converted from the file.
68+
After the below command, a node is executed that requests mesh's .ply file info to a action service node and publishes Mesh converted from the file.
6469

6570
```
66-
ros2 launch tms_ur_construction tms_ur_construction_terrain_mesh_launch.py output/mesh:=/topic/of/mesh filename:=cloud.pcd voxel_size:=0.5 alpha:=3.0
71+
ros2 launch tms_ur_construction tms_ur_construction_terrain_mesh_launch.py output/terrain/mesh_srv:=/srv/of/mesh filename_mesh:=mesh.ply
6772
```
6873

69-
#### Servers / Outputs
74+
#### Actions / Outputs
7075

71-
**Servers**
76+
**Actions**
7277

73-
| Name | Type | Description |
74-
| ---------------------- | ------------------------------------- | --------------------------------------- |
75-
| `tms_db_reader_gridfs` | `tms_msg_db::srv::TmsdbGridFSGetData` | GridFS data stored in ROS2-TMS database |
78+
| Name | Type | Description |
79+
| ---------------------- | --------------------------------- | ------------------------------------------- |
80+
| `tms_db_reader_gridfs` | `tms_msg_db::action::TmsdbGridFS` | get GridFS data stored in ROS2-TMS database |
7681

7782
**Outputs**
7883

79-
| Name | Type | Description |
80-
| -------------- | --------------------- | --------------- |
81-
| `/output/mesh` | shape_msgs::msg::Mesh | mesh of terrain |
84+
| Name | Type | Description |
85+
| -------------------------- | ------------------------------- | ---------------------------------------------------- |
86+
| `/output/terrain/mesh_srv` | `tms_msg_db::srv::ColoredMeshSrv` | return mesh data of static terrain to service client |
8287

8388
#### Parameters
8489

0 commit comments

Comments
 (0)