roboligo
Toggle main menu visibility
Loading...
Searching...
No Matches
roboligo_common
include
roboligo_common
connector
ConnectorBase.hpp
Go to the documentation of this file.
1
// Copyright 2026 Juan S. Cely G.
2
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
7
// https://www.apache.org/licenses/LICENSE-2.0
8
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#ifndef ROBOLIGO_COMMON_CLASSIFICATION__CONNECTORBASE_HPP_
16
#define ROBOLIGO_COMMON_CLASSIFICATION__CONNECTORBASE_HPP_
17
18
#include <string>
19
20
#include "rclcpp_lifecycle/lifecycle_node.hpp"
21
22
#include "
roboligo_common/types/PluginBase.hpp
"
23
#include "
roboligo_common/connector/Sensor.hpp
"
24
#include "
roboligo_common/connector/Commander.hpp
"
25
#include "
roboligo_common/types/RobotState.hpp
"
26
27
namespace
roboligo
28
{
37
class
ConnectorBase
:
public
PluginBase
38
{
39
public
:
43
ConnectorBase
() =
default
;
44
48
virtual
~ConnectorBase
() =
default
;
49
56
virtual
void
initialize
(
57
const
std::shared_ptr<rclcpp_lifecycle::LifecycleNode> parent_node,
58
const
std::string & plugin_name);
59
68
virtual
bool
set
(
RobotState
& robot_state);
69
78
virtual
bool
update
(
RobotState
& robot_state);
79
88
virtual
bool
exit
(
RobotState
& robot_state);
89
90
protected
:
98
virtual
void
on_set
([[maybe_unused]]
RobotState
& robot_state){}
99
107
virtual
void
on_update
([[maybe_unused]]
RobotState
& robot_state){}
108
116
virtual
void
on_exit
([[maybe_unused]]
RobotState
& robot_state){}
117
118
};
119
120
}
// namespace roboligo
121
#endif
// ROBOLIGO_COMMON_CLASSIFICATION__CONNECTORBASE_HPP_
Commander.hpp
PluginBase.hpp
RobotState.hpp
Sensor.hpp
roboligo::ConnectorBase::on_exit
virtual void on_exit(RobotState &robot_state)
Hook called during exit operation.
Definition
ConnectorBase.hpp:116
roboligo::ConnectorBase::update
virtual bool update(RobotState &robot_state)
Update robot state.
Definition
ConnectorBase.cpp:41
roboligo::ConnectorBase::on_update
virtual void on_update(RobotState &robot_state)
Hook called during update operation.
Definition
ConnectorBase.hpp:107
roboligo::ConnectorBase::~ConnectorBase
virtual ~ConnectorBase()=default
Virtual destructor.
roboligo::ConnectorBase::initialize
virtual void initialize(const std::shared_ptr< rclcpp_lifecycle::LifecycleNode > parent_node, const std::string &plugin_name)
Initialize the connector with a lifecycle node.
Definition
ConnectorBase.cpp:20
roboligo::ConnectorBase::ConnectorBase
ConnectorBase()=default
Default constructor.
roboligo::ConnectorBase::set
virtual bool set(RobotState &robot_state)
Set initial robot state.
Definition
ConnectorBase.cpp:34
roboligo::ConnectorBase::on_set
virtual void on_set(RobotState &robot_state)
Hook called during set operation.
Definition
ConnectorBase.hpp:98
roboligo::ConnectorBase::exit
virtual bool exit(RobotState &robot_state)
Exit and cleanup robot state.
Definition
ConnectorBase.cpp:48
roboligo::PluginBase::PluginBase
PluginBase()=default
Default constructor.
roboligo::RobotState
Represents the state and configuration of a robot.
Definition
RobotState.hpp:45
roboligo
Definition
ClassificationBase.hpp:28
Generated by
1.17.0