Skip to content
This repository was archived by the owner on Jan 28, 2023. It is now read-only.

Commit 82767a6

Browse files
committed
add namespace and change class name
1 parent ba1d8b5 commit 82767a6

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

consai2r2_description/include/consai2r2_description/parameters.hpp

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,37 @@
3030

3131
using std::placeholders::_1;
3232

33-
struct Consai2r2Parameters
33+
34+
namespace consai2r2
35+
{
36+
37+
namespace description
38+
{
39+
40+
struct Parameters
3441
{
3542
public:
3643
int max_id;
3744
std::string our_side;
3845
std::string our_color;
3946

40-
Consai2r2Parameters()
47+
Parameters()
4148
{
4249
max_id = 15;
4350
our_side = "left";
4451
our_color = "blue";
4552
}
4653
};
4754

48-
class Consai2r2ParametersClient
55+
class ParametersClient
4956
{
5057
public:
51-
explicit Consai2r2ParametersClient(rclcpp::Node * node)
58+
explicit ParametersClient(rclcpp::Node * node)
5259
: client(node, "consai2r2_description")
5360
{
5461
}
5562

56-
void get_parameters(Consai2r2Parameters * consai2r2_parameters)
63+
void get_parameters(consai2r2::description::Parameters * consai2r2_parameters)
5764
{
5865
if (!client.wait_for_service(std::chrono::seconds(5))) {
5966
throw std::runtime_error("Wait for service timed out");
@@ -70,4 +77,8 @@ class Consai2r2ParametersClient
7077
rclcpp::SyncParametersClient client;
7178
};
7279

80+
} // namespace description
81+
82+
} // namespace consai2r2
83+
7384
#endif // CONSAI2R2_DESCRIPTION__PARAMETERS_HPP_

0 commit comments

Comments
 (0)