Skip to content

Commit a561762

Browse files
committed
update readme
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
1 parent 5088606 commit a561762

File tree

3 files changed

+87
-67
lines changed

3 files changed

+87
-67
lines changed

autoware_utils/README.md

-67
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ The ROS module provides utilities for working with ROS messages and nodes:
4747
- **`debug_publisher.hpp`**: A helper class for publishing debug messages with timestamps.
4848
- **`diagnostics_interface.hpp`**: An interface for publishing diagnostic messages.
4949
- **`logger_level_configure.hpp`**: Utility for configuring logger levels dynamically.
50-
- **`managed_transform_buffer.hpp`**: A managed buffer for handling static and dynamic transforms.
5150
- **`marker_helper.hpp`**: Helper functions for creating and manipulating visualization markers.
5251
- **`msg_covariance.hpp`**: Indices for accessing covariance matrices in ROS messages.
5352
- **`msg_operation.hpp`**: Overloaded operators for quaternion messages.
@@ -56,12 +55,10 @@ The ROS module provides utilities for working with ROS messages and nodes:
5655
- **`processing_time_publisher.hpp`**: Publishes processing times as diagnostic messages.
5756
- **`published_time_publisher.hpp`**: Tracks and publishes the time when messages are published.
5857
- **`self_pose_listener.hpp`**: Listens to the self-pose of the vehicle.
59-
- **`transform_listener.hpp`**: Manages transformation listeners.
6058
- **`update_param.hpp`**: Updates parameters from remote nodes.
6159
- **`uuid_helper.hpp`**: Utilities for generating and managing UUIDs.
6260
- **`wait_for_param.hpp`**: Waits for parameters from remote nodes.
6361
- **`debug_traits.hpp`**: Traits for identifying debug message types.
64-
- **`pcl_conversion.hpp`**: Efficient conversion and transformation of PointCloud2 messages to PCL point clouds.
6562

6663
#### System Module
6764

@@ -72,10 +69,6 @@ The system module provides low-level utilities for performance monitoring and er
7269
- **`stop_watch.hpp`**: Measures elapsed time for profiling.
7370
- **`time_keeper.hpp`**: Tracks and reports the processing time of various functions.
7471

75-
#### Transform Module
76-
77-
Efficient methods for transforming and manipulating point clouds.
78-
7972
## Usage
8073

8174
### Including Headers
@@ -140,36 +133,6 @@ int main() {
140133

141134
### Detailed Usage Examples
142135

143-
#### Transform Point Clouds with ManagedTransformBuffer
144-
145-
```cpp
146-
#include "autoware_utils/ros/managed_transform_buffer.hpp"
147-
#include "sensor_msgs/msg/point_cloud2.hpp"
148-
#include <rclcpp/rclcpp.hpp>
149-
150-
int main(int argc, char * argv[]) {
151-
rclcpp::init(argc, argv);
152-
auto node = rclcpp::Node::make_shared("transform_node");
153-
154-
// Initialize ManagedTransformBuffer
155-
autoware_utils::ManagedTransformBuffer transform_buffer(node, false);
156-
157-
// Load point cloud data
158-
sensor_msgs::msg::PointCloud2 cloud_in; // Assume this is populated with data
159-
sensor_msgs::msg::PointCloud2 cloud_out;
160-
161-
// Transform point cloud from "base_link" to "map" frame
162-
if (transform_buffer.transform_pointcloud("map", cloud_in, cloud_out)) {
163-
RCLCPP_INFO(node->get_logger(), "Point cloud transformed successfully.");
164-
} else {
165-
RCLCPP_ERROR(node->get_logger(), "Failed to transform point cloud.");
166-
}
167-
168-
rclcpp::shutdown();
169-
return 0;
170-
}
171-
```
172-
173136
#### Update Parameters Dynamically with update_param.hpp
174137

175138
```cpp
@@ -250,36 +213,6 @@ int main(int argc, char * argv[]) {
250213
}
251214
```
252215
253-
#### Efficient Point Cloud Conversion with pcl_conversion.hpp
254-
255-
```cpp
256-
#include "autoware_utils/ros/pcl_conversion.hpp"
257-
#include "sensor_msgs/msg/point_cloud2.hpp"
258-
#include <pcl/point_types.h>
259-
#include <pcl/PCLPointCloud2.h>
260-
#include <Eigen/Core>
261-
#include <rclcpp/rclcpp.hpp>
262-
263-
int main(int argc, char * argv[]) {
264-
rclcpp::init(argc, argv);
265-
auto node = rclcpp::Node::make_shared("pcl_conversion_node");
266-
267-
// Load point cloud data
268-
sensor_msgs::msg::PointCloud2 cloud_in; // Assume this is populated with data
269-
pcl::PointCloud<pcl::PointXYZ> pcl_cloud;
270-
271-
// Define transformation matrix
272-
Eigen::Matrix4f transform = Eigen::Matrix4f::Identity();
273-
// Populate transform matrix with actual values
274-
275-
// Convert and transform point cloud
276-
autoware_utils::transform_point_cloud_from_ros_msg(cloud_in, pcl_cloud, transform);
277-
278-
rclcpp::shutdown();
279-
return 0;
280-
}
281-
```
282-
283216
#### Handling Debug Message Types with debug_traits.hpp
284217
285218
```cpp

autoware_utils_geometry/README.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# autoware_utils_geometry
2+
3+
## Overview
4+
5+
The **autoware_utils** library is a comprehensive toolkit designed to facilitate the development of autonomous driving applications.
6+
This package provides essential utilities for geometry.
7+
It is extensively used in the Autoware project to handle common tasks such as geometric calculations and message conversions.
8+
9+
## Design
10+
11+
- **`transform_listener.hpp`**: Manages transformation listeners.

autoware_utils_pcl/README.md

+76
Original file line numberDiff line numberDiff line change
@@ -1 +1,77 @@
11
# autoware_utils_pcl
2+
3+
## Overview
4+
5+
The **autoware_utils** library is a comprehensive toolkit designed to facilitate the development of autonomous driving applications.
6+
This package provides essential utilities for point cloud.
7+
It is extensively used in the Autoware project to handle common tasks such as point cloud transformations.
8+
9+
## Design
10+
11+
- **`managed_transform_buffer.hpp`**: A managed buffer for handling static and dynamic transforms.
12+
- **`pcl_conversion.hpp`**: Efficient conversion and transformation of PointCloud2 messages to PCL point clouds.
13+
- **`transforms.hpp`**: Efficient methods for transforming and manipulating point clouds.
14+
15+
## Example Code Snippets
16+
17+
### Transform Point Clouds with ManagedTransformBuffer
18+
19+
```cpp
20+
#include <autoware_utils_pcl/managed_transform_buffer.hpp>
21+
#include <sensor_msgs/msg/point_cloud2.hpp>
22+
#include <rclcpp/rclcpp.hpp>
23+
24+
int main(int argc, char * argv[])
25+
{
26+
rclcpp::init(argc, argv);
27+
auto node = rclcpp::Node::make_shared("transform_node");
28+
29+
// Initialize ManagedTransformBuffer
30+
autoware_utils::ManagedTransformBuffer transform_buffer(node, false);
31+
32+
// Load point cloud data
33+
sensor_msgs::msg::PointCloud2 cloud_in; // Assume this is populated with data
34+
sensor_msgs::msg::PointCloud2 cloud_out;
35+
36+
// Transform point cloud from "base_link" to "map" frame
37+
if (transform_buffer.transform_pointcloud("map", cloud_in, cloud_out)) {
38+
RCLCPP_INFO(node->get_logger(), "Point cloud transformed successfully.");
39+
} else {
40+
RCLCPP_ERROR(node->get_logger(), "Failed to transform point cloud.");
41+
}
42+
43+
rclcpp::shutdown();
44+
return 0;
45+
}
46+
```
47+
48+
### Efficient Point Cloud Conversion with pcl_conversion.hpp
49+
50+
```cpp
51+
#include <autoware_utils_pcl/pcl_conversion.hpp>
52+
#include <sensor_msgs/msg/point_cloud2.hpp>
53+
#include <pcl/point_types.h>
54+
#include <pcl/PCLPointCloud2.h>
55+
#include <Eigen/Core>
56+
#include <rclcpp/rclcpp.hpp>
57+
58+
int main(int argc, char * argv[])
59+
{
60+
rclcpp::init(argc, argv);
61+
auto node = rclcpp::Node::make_shared("pcl_conversion_node");
62+
63+
// Load point cloud data
64+
sensor_msgs::msg::PointCloud2 cloud_in; // Assume this is populated with data
65+
pcl::PointCloud<pcl::PointXYZ> pcl_cloud;
66+
67+
// Define transformation matrix
68+
Eigen::Matrix4f transform = Eigen::Matrix4f::Identity();
69+
// Populate transform matrix with actual values
70+
71+
// Convert and transform point cloud
72+
autoware_utils::transform_point_cloud_from_ros_msg(cloud_in, pcl_cloud, transform);
73+
74+
rclcpp::shutdown();
75+
return 0;
76+
}
77+
```

0 commit comments

Comments
 (0)