Attempt to use new plugin format for tree nodes.

Crude support for gazebo ignition
This commit is contained in:
Bastian Hofmann
2022-09-12 13:26:25 +02:00
parent 7f9b30083f
commit a7b8389557
10 changed files with 434 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.24)
project(ActorPlugin)
set(IGN_PLUGIN_VER 0)
find_package(ignition-cmake2 REQUIRED)
find_package(ignition-gazebo5 REQUIRED)
ign_find_package(ignition-plugin1 REQUIRED COMPONENTS register)
set(IGN_PLUGIN_VER ${ignition-plugin1_VERSION_MAJOR})
# Add sources for each plugin to be registered.
add_library(SampleSystem src/ActorSystem.cpp)
set_property(TARGET SampleSystem PROPERTY CXX_STANDARD 17)
target_link_libraries(SampleSystem
ignition-plugin${IGN_PLUGIN_VER}::ignition-plugin${IGN_PLUGIN_VER}
ignition-gazebo5::ignition-gazebo5
)

View File

@@ -0,0 +1,18 @@
//
// Created by bastian on 31.08.22.
//
#include "ActorSystem.h"
IGNITION_ADD_PLUGIN(
ActorSystem,
ignition::gazebo::System,
ActorSystem::ISystemPreUpdate)
ActorSystem::ActorSystem() = default;
ActorSystem::~ActorSystem() = default;
void ActorSystem::PreUpdate(const ignition::gazebo::UpdateInfo &_info, ignition::gazebo::EntityComponentManager &_ecm) {
}

View File

@@ -0,0 +1,26 @@
//
// Created by bastian on 31.08.22.
//
#ifndef BUILD_ACTORSYSTEM_H
#define BUILD_ACTORSYSTEM_H
#include <ignition/gazebo/System.hh>
#include <ignition/plugin/Register.hh>
class ActorSystem:
public ignition::gazebo::System,
public ignition::gazebo::ISystemPreUpdate {
public:
ActorSystem();
public:
~ActorSystem() override;
public: void PreUpdate(const ignition::gazebo::UpdateInfo &_info,
ignition::gazebo::EntityComponentManager &_ecm) override;
};
#endif //BUILD_ACTORSYSTEM_H