clang-format
This commit is contained in:
parent
18d2772cef
commit
6eee02bacc
17 changed files with 1299 additions and 1346 deletions
|
@ -3,61 +3,43 @@
|
|||
namespace env_interface
|
||||
{
|
||||
|
||||
CallbackReturn
|
||||
EnvInterfaceBase::init(
|
||||
const std::string& t_env_name,
|
||||
const std::string & t_namespace,
|
||||
const rclcpp::NodeOptions & t_node_options)
|
||||
CallbackReturn EnvInterfaceBase::init(const std::string& t_env_name, const std::string& t_namespace,
|
||||
const rclcpp::NodeOptions& t_node_options)
|
||||
{
|
||||
m_node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(
|
||||
t_env_name, t_namespace, t_node_options, false);
|
||||
m_node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(t_env_name, t_namespace, t_node_options, false);
|
||||
|
||||
if (on_init() == CallbackReturn::FAILURE)
|
||||
{
|
||||
return CallbackReturn::FAILURE;
|
||||
}
|
||||
if (on_init() == CallbackReturn::FAILURE)
|
||||
{
|
||||
return CallbackReturn::FAILURE;
|
||||
}
|
||||
|
||||
m_node->register_on_configure(
|
||||
std::bind(&EnvInterfaceBase::on_configure, this, std::placeholders::_1)
|
||||
);
|
||||
m_node->register_on_activate(
|
||||
std::bind(&EnvInterfaceBase::on_activate, this, std::placeholders::_1)
|
||||
);
|
||||
m_node->register_on_cleanup(
|
||||
std::bind(&EnvInterfaceBase::on_cleanup, this, std::placeholders::_1)
|
||||
);
|
||||
m_node->register_on_deactivate(
|
||||
std::bind(&EnvInterfaceBase::on_deactivate, this, std::placeholders::_1)
|
||||
);
|
||||
m_node->register_on_error(
|
||||
std::bind(&EnvInterfaceBase::on_error, this, std::placeholders::_1)
|
||||
);
|
||||
m_node->register_on_shutdown(
|
||||
std::bind(&EnvInterfaceBase::on_shutdown, this, std::placeholders::_1)
|
||||
);
|
||||
m_node->register_on_configure(std::bind(&EnvInterfaceBase::on_configure, this, std::placeholders::_1));
|
||||
m_node->register_on_activate(std::bind(&EnvInterfaceBase::on_activate, this, std::placeholders::_1));
|
||||
m_node->register_on_cleanup(std::bind(&EnvInterfaceBase::on_cleanup, this, std::placeholders::_1));
|
||||
m_node->register_on_deactivate(std::bind(&EnvInterfaceBase::on_deactivate, this, std::placeholders::_1));
|
||||
m_node->register_on_error(std::bind(&EnvInterfaceBase::on_error, this, std::placeholders::_1));
|
||||
m_node->register_on_shutdown(std::bind(&EnvInterfaceBase::on_shutdown, this, std::placeholders::_1));
|
||||
|
||||
return CallbackReturn::SUCCESS;
|
||||
return CallbackReturn::SUCCESS;
|
||||
}
|
||||
|
||||
const rclcpp_lifecycle::State&
|
||||
EnvInterfaceBase::configure()
|
||||
const rclcpp_lifecycle::State& EnvInterfaceBase::configure()
|
||||
{
|
||||
return getNode()->configure();
|
||||
return getNode()->configure();
|
||||
}
|
||||
|
||||
std::shared_ptr<rclcpp_lifecycle::LifecycleNode>
|
||||
EnvInterfaceBase::getNode()
|
||||
std::shared_ptr<rclcpp_lifecycle::LifecycleNode> EnvInterfaceBase::getNode()
|
||||
{
|
||||
if (!m_node.get())
|
||||
{
|
||||
throw std::runtime_error("Lifecycle node hasn't been initialized yet");
|
||||
}
|
||||
return m_node;
|
||||
if (!m_node.get())
|
||||
{
|
||||
throw std::runtime_error("Lifecycle node hasn't been initialized yet");
|
||||
}
|
||||
return m_node;
|
||||
}
|
||||
|
||||
const rclcpp_lifecycle::State & EnvInterfaceBase::getState() const
|
||||
const rclcpp_lifecycle::State& EnvInterfaceBase::getState() const
|
||||
{
|
||||
return m_node->get_current_state();
|
||||
return m_node->get_current_state();
|
||||
}
|
||||
|
||||
} // namespace env_interface
|
||||
} // namespace env_interface
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue