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

Commit

Permalink
add namespace and change class name
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralray committed May 30, 2020
1 parent eec2fcb commit a649f19
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions consai2r2_description/include/consai2r2_description/parameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,37 @@

using std::placeholders::_1;

struct Consai2r2Parameters

namespace consai2r2
{

namespace description
{

struct Parameters
{
public:
int max_id;
std::string our_side;
std::string our_color;

Consai2r2Parameters()
Parameters()
{
max_id = 15;
our_side = "left";
our_color = "blue";
}
};

class Consai2r2ParametersClient
class ParametersClient
{
public:
explicit Consai2r2ParametersClient(rclcpp::Node * node)
explicit ParametersClient(rclcpp::Node * node)
: client(node, "consai2r2_description")
{
}

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

} // namespace description

} // namespace consai2r2

#endif // CONSAI2R2_DESCRIPTION__PARAMETERS_HPP_

0 comments on commit a649f19

Please sign in to comment.