update file costmap_2d_robot and file config params
This commit is contained in:
@@ -79,26 +79,19 @@ void InflationLayer::onInitialize()
|
||||
seen_ = NULL;
|
||||
seen_size_ = 0;
|
||||
need_reinflation_ = false;
|
||||
|
||||
std::string config_file_name = name_ + ".yaml";
|
||||
std::cout << "InflationLayer: " << config_file_name << std::endl;
|
||||
getParams(config_file_name);
|
||||
}
|
||||
|
||||
matchSize();
|
||||
}
|
||||
|
||||
bool InflationLayer::getParams()
|
||||
bool InflationLayer::getParams(const std::string& config_file_name)
|
||||
{
|
||||
try {
|
||||
std::string config_file_name = "config.yaml";
|
||||
std::string folder = COSTMAP_2D_DIR;
|
||||
std::string path_source = getSourceFile(folder,config_file_name);
|
||||
if(path_source != " ")
|
||||
{
|
||||
std::cout << "Path source: " << path_source << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "/cfg folder not found!" << std::endl;
|
||||
}
|
||||
|
||||
YAML::Node config = YAML::LoadFile(path_source);
|
||||
YAML::Node layer = config["inflation_layer"];
|
||||
|
||||
Reference in New Issue
Block a user