Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(coding_guidelines): match the example to the actual autoware_gnss_poser #603

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading