Skip to content
Snippets Groups Projects
Commit e48f0914 authored by Daniel Müller's avatar Daniel Müller
Browse files

Added header for easier creation of processing logs

parent 682d8f4f
No related branches found
No related tags found
1 merge request!5Extended RGBDFrame by adding vector of node processing summary entries, which...
---
Language: Cpp
# BasedOnStyle: WebKit
AccessModifierOffset: -4
AlignAfterOpenBracket: false
AlignEscapedNewlinesLeft: false
AlignOperands: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 2
NamespaceIndentation: Inner
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Never
...
......@@ -5,7 +5,7 @@ project(homer_msgs)
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
# roscpp
roscpp
# rospy
message_generation
geometry_msgs
......@@ -106,7 +106,7 @@ generate_messages(
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
# INCLUDE_DIRS include
INCLUDE_DIRS include
# LIBRARIES homer_msgs
CATKIN_DEPENDS message_runtime geometry_msgs sensor_msgs std_msgs
# DEPENDS system_lib
......@@ -118,9 +118,9 @@ catkin_package(
## Specify additional locations of header files
## Your package locations should be listed before other locations
# include_directories(include)
include_directories(
${catkin_INCLUDE_DIRS}
include
${catkin_INCLUDE_DIRS}
)
## Declare a cpp library
......
#pragma once
#include <ros/ros.h>
#include <homer_msgs/NodeProcessingSummary.h>
#include <homer_msgs/ProcessingInfo.h>
namespace processing_log
{
/**
* This message should be called on msg receival.
*/
homer_msgs::NodeProcessingSummary& create_entry_for_this_node(homer_msgs::RGBDFrame& frame)
{
const auto receiving_time = ros::Time::now();
frame.processing_log.emplace_back();
auto& log = frame.processing_log.back();
log.receiving_time = receiving_time;
log.node_name = ros::this_node::getName();
return log;
};
homer_msgs::ProcessingInfo& create_new_task(homer_msgs::NodeProcessingSummary& summary)
{
summary.tasks.emplace_back();
return summary.tasks.back();
}
} // namespace processing_log
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment