Skip to content
Snippets Groups Projects
Commit 245b5b2f authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Added file with minimal knowledge to work with plugins

parent 11068f1f
No related branches found
No related tags found
No related merge requests found
# Overview
# Installing
## Installing wolf(core)
```
git clone https://gitlab.iri.upc.edu/mobile_robotics/wolf_projects/wolf_lib/plugins/core.git
cd core
mkdir build & cd build
cmake ..
make
make install
```
## Installing plugins
```
git clone https://gitlab.iri.upc.edu/mobile_robotics/wolf_projects/wolf_lib/plugins/<plugin name>.git
cd <plugin name>
mkdir build & cd build
cmake ..
make
make install
```
# Using wolf in your applications
If you want to use the core, you just need to have it installed and in your CMakeLists.txt put the following line
`find_package(wolf REQUIRED)`
If wolf is indeed installed, this will define two variables
`${wolf_INCLUDE_DIR}` which will contain the path to the wolf include directory
and `${wolf_LIBRARY}` which will contain the path to the wolf library
If you instead want to use some wolf plugin, you just follow the same procedure, changing the name
`find_package(wolf<plugin name> REQUIRED)`
If the pluging is indeed installed, this will define two variables
`${wolf<plugin name>_INCLUDE_DIR}` which will contain the path to the plugin's include directory
and `${wolf<plugin name>_LIBRARY}` which will contain the path to the plugin's library.
As an example, suppose that we want to use the _vision_ plugin. First, we will clone and install it
```
git clone https://gitlab.iri.upc.edu/mobile_robotics/wolf_projects/wolf_lib/plugins/vision.git
cd vision
mkdir build && cd build
cmake ..
make
sudo make install
```
Then, in the CMakeLists.txt of the application we are developing we will put the following line
```
find_package(wolfvision REQUIRED)
```
if the plugin has been correctly installed, and thus find_package succeeds, then it will define two variables
- ${wolfvision_INCLUDE_DIR} which is the path to the includes. It should have the value `/usr/local/include/iri-algorithms/wolf/plugin_vision`
- ${wolfvision_LIBRARY} which is the path to the compiled (& linked) library. It should have the value `/usr/local/lib/iri-algorithms/libwolfvision.so`
*IMPORTANT NOTE* For the time being, each plugin is only responsible for finding their own includes and library. This means that for instance wolfvision, which obviously requires
the _core_ plugin, will not find its own dependencies. It is the responsibility of the programmer to do `find_package(wolf REQUIRED)` to get the includes and library. In the future these will change, and each plugin will be responsible for finding all the necessary dependencies.
# Creating your plugin
We provide a template to create your own plugin.
You can either clone it and restart the git history
```
git clone https://gitlab.iri.upc.edu/mobile_robotics/wolf_projects/wolf_lib/plugins/Template.git
cd Template
rm -rf .git
git init
```
or directly fork*(?)* the repository.
# Contributing
## Contributing your plugin to wolf
## Contributing to existing plugins
## Contributing to wolf core
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment