Skip to content

Commit

Permalink
Merge pull request #8 from angeltop/master
Browse files Browse the repository at this point in the history
tree_generator: replace - with _ for tree node parameters in .json file
  • Loading branch information
Diogo Almeida authored May 22, 2017
2 parents 580b6c1 + 6ac8b64 commit bb0a252
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tree_generator/src/TreeFromKF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ namespace tree_generator {

for (int i = 0; i < keyframes_list.size(); i++) // cycle through the keyframes and initialize the pre-defined subtrees
{
subtree_parser_.loadLabel(keyframes_list[i].label); // TODO: I am assuming an ordered list. Will this always be the case?
std::string label = keyframes_list[i].label;
tree_generator::replaceWithUnderscore(label);
subtree_parser_.loadLabel(label); // TODO: I am assuming an ordered list. Will this always be the case?
json subtree = subtree_parser_.createSubTree(indices_);

// HACK: Add the idx to the subtree root to make it unique. Ideally I would check for uniqueness independently of the idx
Expand All @@ -149,7 +151,7 @@ namespace tree_generator {

// HACK: Add a loader for just the idx parameters. In the future, this can be extended to a generic storage of arbitrary parameters
json loader_node, loader_tree, merged_tree;
std::string param_address = std::string("/sarafun/") + keyframes_list[i].label + std::string("/idx");
std::string param_address = std::string("/sarafun/") + label + std::string("/idx");

loader_node["id"] = "loader";
loader_node["type"] = "Loader";
Expand Down

0 comments on commit bb0a252

Please sign in to comment.