adapted the environment for EnvInterfaceBase
This commit is contained in:
parent
71063b19aa
commit
18d2772cef
17 changed files with 447 additions and 74 deletions
|
@ -0,0 +1,14 @@
|
|||
#include "env_interface/env_interface_base.hpp"
|
||||
|
||||
namespace env_interface
|
||||
{
|
||||
class EnvInterface : public EnvInterfaceBase
|
||||
{
|
||||
public:
|
||||
EnvInterface() = default;
|
||||
virtual ~EnvInterface() = default;
|
||||
|
||||
};
|
||||
} // namespace env_interface
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
#include "rclcpp/rclcpp.hpp"
|
||||
#include "rclcpp_lifecycle/lifecycle_node.hpp"
|
||||
|
||||
namespace env_interface
|
||||
{
|
||||
|
||||
using CallbackReturn = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn;
|
||||
|
||||
class EnvInterfaceBase : public rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface
|
||||
{
|
||||
public:
|
||||
EnvInterfaceBase() = default;
|
||||
|
||||
virtual ~EnvInterfaceBase() = default;
|
||||
|
||||
virtual CallbackReturn init(
|
||||
const std::string& t_env_name,
|
||||
const std::string & t_namespace = "",
|
||||
const rclcpp::NodeOptions & t_node_options = rclcpp::NodeOptions()
|
||||
);
|
||||
|
||||
const rclcpp_lifecycle::State& configure();
|
||||
|
||||
virtual CallbackReturn on_init() = 0;
|
||||
|
||||
std::shared_ptr<rclcpp_lifecycle::LifecycleNode> getNode();
|
||||
std::shared_ptr<rclcpp_lifecycle::LifecycleNode> getNode() const;
|
||||
|
||||
const rclcpp_lifecycle::State & getState() const;
|
||||
|
||||
|
||||
|
||||
private:
|
||||
std::shared_ptr<rclcpp_lifecycle::LifecycleNode> m_node;
|
||||
|
||||
|
||||
};
|
||||
} // namespace env_interface
|
Loading…
Add table
Add a link
Reference in a new issue