update file costmap_2d_robot and file config params
This commit is contained in:
@@ -65,24 +65,16 @@ void StaticLayer::onInitialize()
|
||||
current_ = true;
|
||||
|
||||
global_frame_ = layered_costmap_->getGlobalFrameID();
|
||||
getParams();
|
||||
std::string config_file_name = name_ + ".yaml";
|
||||
getParams(config_file_name);
|
||||
|
||||
}
|
||||
|
||||
bool StaticLayer::getParams()
|
||||
bool StaticLayer::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);
|
||||
|
||||
Reference in New Issue
Block a user