Skip to content

Commit

Permalink
chore(coding_guidelines): match the example to the actual autoware_gn…
Browse files Browse the repository at this point in the history
…ss_poser (#603)

* Fixed class name of gnss_poser to the real one in autoware.universe

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>

* Fixed grammatical error.

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>

---------

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>
  • Loading branch information
TaikiYamada4 authored Sep 2, 2024
1 parent 3584a68 commit 9a1c6e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions docs/contributing/coding-guidelines/ros-nodes/class-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ namespace autoware::gnss_poser
#### `gnss_poser_node.hpp`

```cpp
class GNSSPoserNode : public rclcpp::Node
class GNSSPoser : public rclcpp::Node
{
public:
explicit GNSSPoserNode(const rclcpp::NodeOptions & node_options);
explicit GNSSPoser(const rclcpp::NodeOptions & node_options);
...
}
```
#### `gnss_poser_node.cpp`
```cpp
GNSSPoserNode::GNSSPoserNode(const rclcpp::NodeOptions & node_options)
GNSSPoser::GNSSPoser(const rclcpp::NodeOptions & node_options)
: Node("gnss_poser", node_options)
{
...
Expand All @@ -56,7 +56,7 @@ GNSSPoserNode::GNSSPoserNode(const rclcpp::NodeOptions & node_options)
} // namespace autoware::gnss_poser

#include <rclcpp_components/register_node_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::gnss_poser::GNSSPoserNode)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::gnss_poser::GNSSPoser)
```
- The component should be registered at the end of the `gnss_poser_node.cpp` file, outside the namespaces.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document describes the directory structure of ROS nodes within Autoware.

We'll use the package `autoware_gnss_poser` as an example.

**Note that this example does not reflect the actual `autoware_gnss_poser`, and has extra files and directories to demonstrate all possible package structure.**
**Note that this example does not reflect the actual `autoware_gnss_poser` and includes extra files and directories to demonstrate all possible package structures.**

## C++ package

Expand Down Expand Up @@ -96,7 +96,7 @@ ament_auto_add_library(${PROJECT_NAME} SHARED
)
rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "autoware::gnss_poser::GNSSPoserNode"
PLUGIN "autoware::gnss_poser::GNSSPoser"
EXECUTABLE ${PROJECT_NAME}_node
)
```
Expand All @@ -114,7 +114,7 @@ Use of standalone executables **should be limited** to cases where specific need

Assuming:

- `src/gnss_poser.cpp` has the `GNSSPoserNode` class.
- `src/gnss_poser.cpp` has the `GNSSPoser` class.
- `src/gnss_poser_node.cpp` has the `main` function.
- There is no composable node component registration.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ ros2 launch autoware_launch autoware_launch.launch.xml map_path:=<YOUR-MAP-PATH>
```

After launching Autoware, we need to initialize our vehicle on our map.
If you set [gnss_poser](https://autowarefoundation.github.io/autoware.universe/main/sensing/gnss_poser/) for your GNSS/INS sensor at `gnss.launch.xml`,
If you set [gnss_poser](https://autowarefoundation.github.io/autoware.universe/main/sensing/autoware_gnss_poser/) for your GNSS/INS sensor at `gnss.launch.xml`,
then gnss_poser will send pose for initialization.
If you don't have a GNSS sensor, then you need to set initial pose manually.

Expand Down

0 comments on commit 9a1c6e9

Please sign in to comment.