Skip to content

Commit

Permalink
fix tutorial snippets with new doxygen wildcards (#316)
Browse files Browse the repository at this point in the history
Signed-off-by: Mabel Zhang <[email protected]>
  • Loading branch information
mabelzhang authored Dec 21, 2021
1 parent 0b57581 commit acf393d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 33 deletions.
16 changes: 1 addition & 15 deletions tutorials/05_plugin_loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,7 @@ lines for finding `ign-plugin` and `ign-physics` dependencies in Citadel release
After that, add the executable pointing to our file and add linking library so
that `cmake` can compile it.

[//]: # (TODO: \include does not work with .txt extension for some reason, so manually pasting this file: \include examples/hello_world_loader/CMakeLists.txt)
```cmake
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
set(IGN_PLUGIN_VER 1)
find_package(ignition-plugin${IGN_PLUGIN_VER} 1.1 REQUIRED COMPONENTS all)
set(IGN_PHYSICS_VER 6)
find_package(ignition-physics${IGN_PHYSICS_VER} REQUIRED)
add_executable(hello_world_loader hello_world_loader.cc)
target_link_libraries(hello_world_loader
ignition-plugin${IGN_PLUGIN_VER}::loader
ignition-physics${IGN_PHYSICS_VER}::ignition-physics${IGN_PHYSICS_VER})
```
\include examples/hello_world_loader/CMakeLists.txt

If you find CMake syntax difficult to understand, take a look at the official tutorial [here](https://cmake.org/cmake/help/latest/guide/tutorial/index.html).

Expand Down
16 changes: 1 addition & 15 deletions tutorials/07-implementing-a-physics-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,7 @@ plugin provides, i.e. `HelloWorldFeatureList`
Now create a file named `CMakeLists.txt` with your favorite editor and add these
lines for finding `ign-plugin` and `ign-physics` dependencies for the Fortress release:

[//]: # (TODO: \include does not work with .txt extension for some reason, so manually pasting this file: \include examples/hello_world_plugin/CMakeLists.txt)
```cmake
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
set(IGN_PLUGIN_VER 1)
find_package(ignition-plugin${IGN_PLUGIN_VER} 1.1 REQUIRED COMPONENTS all)
set(IGN_PHYSICS_VER 6)
find_package(ignition-physics${IGN_PHYSICS_VER} REQUIRED)
add_library(HelloWorldPlugin SHARED HelloWorldPlugin.cc)
target_link_libraries(HelloWorldPlugin
PRIVATE
ignition-physics${IGN_PHYSICS_VER}::ignition-physics${IGN_PHYSICS_VER})
```
\include examples/hello_world_plugin/CMakeLists.txt

## Build and run

Expand Down
3 changes: 0 additions & 3 deletions tutorials/08-implementing-a-custom-feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ will not run at the same time when requested.

With the requirements and restrictions above, we first need to define a feature template for the custom feature. In this case, this feature will be responsible for retrieving world pointer from the physics engine. The template is placed in [World.hh](https://github.com/ignitionrobotics/ign-physics/blob/main/dartsim/include/ignition/physics/dartsim/World.hh):

[//]: # (TODO: snippet does not render for some reason)
\snippet dartsim/include/ignition/physics/dartsim/World.hh feature template

The `RetrieveWorld` feature retrieves
Expand Down Expand Up @@ -174,7 +173,6 @@ implement the `RetrieveWorld` feature function using Dartsim API.
After defining the feature template, we can add it to a custom
\ref ignition::physics::FeatureList "FeatureList":

[//]: # (TODO: snippet does not render for some reason)
\snippet dartsim/src/CustomFeatures.hh add to list

The custom feature `RetrieveWorld` is added to `CustomFeatureList`, other custom
Expand All @@ -189,7 +187,6 @@ custom feature with \ref ignition::physics::FeaturePolicy3d "FeaturePolicy3d"
We will then implement the actual function with Dartsim API in [CustomFeatures.cc](https://github.com/ignitionrobotics/ign-physics/blob/ign-physics2/dartsim/src/CustomFeatures.cc) to override the member function
declared in the custom feature header file:

[//]: # (TODO: snippet does not render for some reason)
\snippet dartsim/src/CustomFeatures.cc implementation

Here, we implement the behavior of `GetDartsimWorld` with Dartsim API to return the
Expand Down

0 comments on commit acf393d

Please sign in to comment.