src
robot_element
decorators
log_decorator.cpp
Go to the documentation of this file.
1
#include "
robot_element/decorators/log_decorator.h
"
2
3
Log_decorator::Log_decorator
(std::unique_ptr<Abstract_robot_element> next)
4
:
Abstract_robot_element_decorator
(std::move(next))
5
{
6
ROS_INFO(
"LOG Decorator: %s"
,
next_
->
name
().c_str());
7
}
8
9
void
Log_decorator::input_filter
() {
10
ROS_INFO(
"--- Debug: %s --- State: PRE UPDATE"
,
next_
->
name
().c_str());
11
ROS_INFO(
"=> Debug: pos('%f', '%f', '%f')"
,
world_tf
().getOrigin().getX(),
world_tf
().getOrigin().getY(),
world_tf
().getOrigin().getZ());
12
ROS_INFO(
"=> Debug: orientation('%f', '%f', '%f', '%f')"
,
world_tf
().getRotation().getX(),
world_tf
().getRotation().getY(),
world_tf
().getRotation().getZ(),
world_tf
().getRotation().getW());
13
}
14
15
void
Log_decorator::update
(tf2::Transform& tf) {
16
input_filter
();
17
Abstract_robot_element_decorator::update
(tf);
18
output_filter
();
19
}
20
21
void
Log_decorator::output_filter
() {
22
ROS_INFO(
"--- Debug: %s --- State: POST UPDATE"
,
next_
->
name
().c_str());
23
ROS_INFO(
"=> Debug: pos('%f', '%f', '%f')"
,
world_tf
().getOrigin().getX(),
world_tf
().getOrigin().getY(),
world_tf
().getOrigin().getZ());
24
ROS_INFO(
"=> Debug: orientation('%f', '%f', '%f', '%f')"
,
world_tf
().getRotation().getX(),
world_tf
().getRotation().getY(),
world_tf
().getRotation().getZ(),
world_tf
().getRotation().getW());
25
}
26
Log_decorator::Log_decorator
Log_decorator(std::unique_ptr< Abstract_robot_element > next)
Definition:
log_decorator.cpp:3
Log_decorator::output_filter
void output_filter() override
Definition:
log_decorator.cpp:21
log_decorator.h
Log_decorator::update
void update(tf2::Transform &tf) override
Definition:
log_decorator.cpp:15
Abstract_robot_element::name
virtual std::string & name()=0
Abstract_robot_element_decorator
Definition:
impl/abstract_robot_element_decorator.h:7
Abstract_robot_element_decorator::update
void update(tf2::Transform &tf) override
Definition:
impl/abstract_robot_element_decorator.h:17
Abstract_robot_element_decorator::world_tf
tf2::Transform & world_tf() override
Definition:
robot_element/decorators/abstract_robot_element_decorator.h:21
Abstract_robot_element_decorator::next_
Abstract_robot_element * next_
Definition:
impl/abstract_robot_element_decorator.h:9
Log_decorator::input_filter
void input_filter() override
Definition:
log_decorator.cpp:9
multi_cell_builder
Author(s): MA
autogenerated on Thu Jan 12 2023 23:45:43