SMACC2
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
cl_nav2z::CpCostmapProxy Class Reference

#include <cp_costmap_switch.hpp>

Collaboration diagram for cl_nav2z::CpCostmapProxy:
Collaboration graph

Public Member Functions

 CpCostmapProxy (std::string costmap_name, std::string enablePropertyName, rclcpp::Node::SharedPtr nh)
 
void setCostmapEnabled (bool value)
 

Private Member Functions

rclcpp::Node::SharedPtr getNode ()
 

Private Attributes

std::string costmapName_
 
rclcpp::Node::SharedPtr nh_
 

Detailed Description

Definition at line 78 of file cp_costmap_switch.hpp.

Constructor & Destructor Documentation

◆ CpCostmapProxy()

cl_nav2z::CpCostmapProxy::CpCostmapProxy ( std::string  costmap_name,
std::string  enablePropertyName,
rclcpp::Node::SharedPtr  nh 
)

Definition at line 118 of file cp_costmap_switch.cpp.

120: nh_(nh)
121{
122 // this->costmapName_ = costmap_name + "/set_parameters";
123 // dynamic_reconfigure::BoolParameter enableField;
124 // enableField.name = "enabled";
125 // enableField.value = true;
126
127 // enableReq.bools.push_back(enableField);
128
129 // enableField.value = false;
130 // disableReq.bools.push_back(enableField);
131 RCLCPP_ERROR(nh->get_logger(), "costmap switch not implemented %s", costmapName_.c_str());
132}
rclcpp::Node::SharedPtr nh_

References costmapName_.

Member Function Documentation

◆ getNode()

rclcpp::Node::SharedPtr cl_nav2z::CpCostmapProxy::getNode ( )
inlineprivate

Definition at line 90 of file cp_costmap_switch.hpp.

90{ return nh_; }

References nh_.

◆ setCostmapEnabled()

void cl_nav2z::CpCostmapProxy::setCostmapEnabled ( bool  value)

Definition at line 134 of file cp_costmap_switch.cpp.

135{
136 // dynamic_reconfigure::ReconfigureRequest srv_req;
137 // dynamic_reconfigure::ReconfigureResponse srv_resp;
138
139 // if (value)
140 // srv_req.config = enableReq;
141 // else
142 // srv_req.config = disableReq;
143
144 // if (ros::service::exists(costmapName_, true))
145 // {
146 // RCLCPP_INFO(getLogger(),"sending dynamic reconfigure request: %s", costmapName_.c_str());
147 // ros::service::call(costmapName_, srv_req, srv_resp);
148 // }
149 // else
150 // {
151 // RCLCPP_WARN(getLogger(),"could not call dynamic reconfigure server. It does not exist: %s", costmapName_.c_str());
152 // }
153
154 RCLCPP_ERROR(nh_->get_logger(), "costmap switch not implemented %s", costmapName_.c_str());
155}

References costmapName_, and nh_.

Member Data Documentation

◆ costmapName_

std::string cl_nav2z::CpCostmapProxy::costmapName_
private

Definition at line 87 of file cp_costmap_switch.hpp.

Referenced by CpCostmapProxy(), and setCostmapEnabled().

◆ nh_

rclcpp::Node::SharedPtr cl_nav2z::CpCostmapProxy::nh_
private

Definition at line 88 of file cp_costmap_switch.hpp.

Referenced by getNode(), and setCostmapEnabled().


The documentation for this class was generated from the following files: