Attempt to use new plugin format for tree nodes.
Crude support for gazebo ignition
This commit is contained in:
15
src/ign_actor_plugin/CMakeLists.txt
Normal file
15
src/ign_actor_plugin/CMakeLists.txt
Normal 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
|
||||
)
|
||||
18
src/ign_actor_plugin/src/ActorSystem.cpp
Normal file
18
src/ign_actor_plugin/src/ActorSystem.cpp
Normal 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) {
|
||||
|
||||
}
|
||||
26
src/ign_actor_plugin/src/ActorSystem.h
Normal file
26
src/ign_actor_plugin/src/ActorSystem.h
Normal 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
|
||||
Reference in New Issue
Block a user