Skip to content

Commit

Permalink
feat: fix example code compile error
Browse files Browse the repository at this point in the history
Signed-off-by: JianKangEgon <[email protected]>
  • Loading branch information
JianKangEgon committed Jan 16, 2025
1 parent df8e23a commit 4609190
Showing 1 changed file with 2 additions and 41 deletions.
43 changes: 2 additions & 41 deletions autoware_utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,24 +130,6 @@ int main() {
}
```

#### Publishing Debug Messages with DebugPublisher
```cpp
#include "autoware_utils/ros/debug_publisher.hpp"
#include <rclcpp/rclcpp.hpp>

int main(int argc, char * argv[]) {
rclcpp::init(argc, argv);
auto node = rclcpp::Node::make_shared("debug_node");
autoware_utils::DebugPublisher debug_pub(node, "/debug");

// Publish a debug message
debug_pub.publish<std_msgs::msg::Float64>("example", 42.0);

rclcpp::shutdown();
return 0;
}
```
### Detailed Usage Examples

#### Transform Point Clouds with ManagedTransformBuffer
Expand Down Expand Up @@ -213,7 +195,7 @@ int main(int argc, char * argv[]) {
auto node = rclcpp::Node::make_shared("processing_time_node");

// Initialize ProcessingTimePublisher
autoware_utils::ProcessingTimePublisher processing_time_pub(node, "~/debug/processing_time_ms");
autoware_utils::ProcessingTimePublisher processing_time_pub(node.get(), "~/debug/processing_time_ms");

// Simulate some processing times
std::map<std::string, double> processing_times = {
Expand Down Expand Up @@ -305,25 +287,4 @@ int main(int argc, char * argv[]) {
rclcpp::shutdown();
return 0;
}
```
### Installation
To install the Autoware Utils library, follow these steps:
1. Clone the repository containing the library.
2. Ensure you have ROS 2 installed on your system.
3. Build the package using `colcon build`.
4. Source the setup file generated by the build process.
```bash
git clone https://github.com/your-repo/autoware-utils.git
cd autoware-utils
colcon build
source install/setup.bash
```

### Contributing
Contributions to the Autoware Utils library are welcome! Please open an issue or submit a pull request if you find any bugs or have suggestions for improvements.

---

For further information or contributions, please refer to the official [Autoware documentation](https://wwwtier4com) and repository.
```

0 comments on commit 4609190

Please sign in to comment.