Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
Signed-off-by: Ryohsuke Mitsudome <[email protected]>
  • Loading branch information
mitsudome-r committed Jan 15, 2025
1 parent d135b11 commit 90e7791
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions common/autoware_component_interface_specs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,23 @@ The package contains interface specifications for various components, including:
To use these interface specifications in your component:

1. Add this package as a dependency in your package.xml:

```xml
<depend>autoware_component_interface_specs</depend>
```

2. Use the provided interfaces in your component code.

```cpp
#include <autoware/component_interface_specs/localization.hpp>

// Example: Creating a publisher using the interface specs
using KinematicState = autoware::component_interface_specs::localization::KinematicState;
rclcpp::Publisher<KinematicState::Message>::SharedPtr publisher_ =
create_publisher<KinematicState::Message>(
KinematicState::name,
KinematicState::get_qos());
autoware::component_interface_specs::get_qos(KinematicState));

// Example: Creating a subscription using the interface specs
auto subscriber_ = create_subscription<KinematicState::Message>(
KinematicState::name,
KinematicState::get_qos(),
autoware::component_interface_specs::get_qos(KinematicState),
std::bind(&YourClass::callback, this, std::placeholders::1));
```

0 comments on commit 90e7791

Please sign in to comment.