Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/build/*
*.csv
/build*
_codeql_*
1 change: 1 addition & 0 deletions include/rosx_introspection/ros_message.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ struct MessageSchema {
FieldTree field_tree;
ROSMessage::Ptr root_msg;
RosMessageLibrary msg_library;
std::unique_ptr<ROSField> root_field;
};

//------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/ros_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ MessageSchema::Ptr BuildMessageSchema(const std::string& topic_name, const std::
}; // end of recursiveTreeCreator

// build root and start recursion
auto root_field = new ROSField(schema->root_msg->type(), topic_name);
schema->field_tree.root()->setValue(root_field);
schema->root_field = std::make_unique<ROSField>(schema->root_msg->type(), topic_name);
schema->field_tree.root()->setValue(schema->root_field.get());

recursiveTreeCreator(schema->root_msg, schema->field_tree.root());

Expand Down