Skip to content

Commit

Permalink
docs: Update documentation for 0.25.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
cassava committed Jul 15, 2024
1 parent 3099b08 commit 4fe8afa
Show file tree
Hide file tree
Showing 36 changed files with 349 additions and 30 deletions.
2 changes: 1 addition & 1 deletion cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[project]
name = "cloe-launch"
version = "0.24.0"
version = "0.25.0"
description = "Launch cloe-engine with Conan profiles."
license = { text = "Apache-2.0" }
authors = [
Expand Down
65 changes: 65 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,71 @@ readable perspective on new releases.

Note that the most recent release is at the *top* of the document.


0.25.0 (2024-07-15)
-------------------

This is the first Cloe release that contains the Lua and DataBroker integration.
Read all about the changes :doc:`here <news/release-0.25.0>`.

**Engine:**

- engine: Make probe output trigger schema `[6c6c71cb] <https://github.com/eclipse/cloe/commit/6c6c71cb7e539f1f3e74ab10759b041ee522e7bb>`_
- engine: Add probe subcommand `[4be46cb1] <https://github.com/eclipse/cloe/commit/4be46cb158411d4fc4b78d60048b4b7e7b5c27e9>`_
- engine: Fix some findings from clang-tidy `[58382a67] <https://github.com/eclipse/cloe/commit/58382a670fabb556bc339fbc2617856ddf6af45c>`_
- engine: Add --output-path to cloe-engine `[4fc65ac9] <https://github.com/eclipse/cloe/commit/4fc65ac906dcc24cb639c6979807347d0e1329c8>`_
- engine: Replace boost::filesystem with std::filesystem `[71844110] <https://github.com/eclipse/cloe/commit/71844110d79f9eea9fdcba20fe8acf5eb50927e9>`_
- engine: Replace boost::optional with std::optional `[8b0acb2f] <https://github.com/eclipse/cloe/commit/8b0acb2f4375e9ce9405a6a14008801ce96e0092>`_
- engine: Add LRDB debugging support `[c60a3ef9] <https://github.com/eclipse/cloe/commit/c60a3ef9a70d3c9acefd7e71bceddbb7450d61b0>`_
- engine: Add Lua scripting support `[d182d035] <https://github.com/eclipse/cloe/commit/d182d035b7608b3207f0ab98f1216f92fb97b098>`_
- engine: Vendor linenoise library `[12fb330c] <https://github.com/eclipse/cloe/commit/12fb330c0528901406ef70f623a9a03b96d3717b>`_
- engine: Restructure code for better compilation times `[a1137367] <https://github.com/eclipse/cloe/commit/a113736729b097ddc6fa5442ec8c1d2df1734360>`_
- engine: Extract SimulationProgress into simulation_progress.hpp `[30b05f5f] <https://github.com/eclipse/cloe/commit/30b05f5f836c7bb06241438d8b4dbfed95fdfb72>`_
- engine: Set stack options in own scope `[5e3d4efe] <https://github.com/eclipse/cloe/commit/5e3d4efe479761508755449ecdc22f28610f20cf>`_
- engine: Remove --distinct option from check command `[fa7d2586] <https://github.com/eclipse/cloe/commit/fa7d258628b4f22ada0442b2307e5d911de31676>`_
- tests: Add test for cloe-engine --write-output and --output-path `[d9fcd704] <https://github.com/eclipse/cloe/commit/d9fcd704103a2d6272c51633d68a424f81013578>`_

**Core Libraries:**

- all: Improve DataBroker interface for common types `[0d9509cc] <https://github.com/eclipse/cloe/commit/0d9509cc9ff3d7c209869ff36c4e340897895314>`_
- all: Add DataBroker and Signals concepts `[34fcf16d] <https://github.com/eclipse/cloe/commit/34fcf16d99adaca1a985ae26105ea73859d7a9c1>`_

- fable: Implement clang-tidy suggestions `[3f017f36] <https://github.com/eclipse/cloe/commit/3f017f36141cbfcbf7eef26e63f184d5ea098914>`_

- runtime: Fix duplicate definitions in set_action.hpp `[1cf804f6] <https://github.com/eclipse/cloe/commit/1cf804f6b6832d9ae30b1fb6f09699effcb5d9c7>`_
- runtime: Replace boost::filesystem with std::filesystem `[aec4bce1] <https://github.com/eclipse/cloe/commit/aec4bce148003c1cf5045317099cd13443dadcc1>`_
- runtime: Add CallbackResult return value to all action operator() `[51f3c0ae] <https://github.com/eclipse/cloe/commit/51f3c0aebd507f3e7ee42df33c49a0929ebb8a67>`_

- stack: Refactor stack into its own library `[55dc93e5] <https://github.com/eclipse/cloe/commit/55dc93e59f543a5da4e14759b254a4c538185d4d>`_

- osi: Fix compatiblity with protobuf > v25 `[3b7bf9d7] <https://github.com/eclipse/cloe/commit/3b7bf9d751a384aaddb2590e6d1d3507d38277f9>`_

**Plugins:**

- basic: Replace boost::optional with std::optional `[e59a6360] <https://github.com/eclipse/cloe/commit/e59a63600d22268391a39b06dd5aa1b6b8352b3b>`_

- speedometer: Implement data broker `[a29afa6a] <https://github.com/eclipse/cloe/commit/a29afa6a56eaf7c3dbe3efb0710b66e4ba371bea>`_

- mocks: Add delay action to demo_stuck `[984fda42] <https://github.com/eclipse/cloe/commit/984fda421aaa9cd657533fb59a5041eb95dce1b9>`_

**Tooling & Dependencies:**

- tests: Add (disabled) test combining cloe with external package `[e401c0f7] <https://github.com/eclipse/cloe/commit/e401c0f7fc1aba154ca7f426a60170daafee5be1>`_

- ci: Reduce number of jobs run for branches `[906a6a21] <https://github.com/eclipse/cloe/commit/906a6a214072cbc9c2ac49b4b4f9c17e683e24c0>`_
- ci: Enable Github workflows for important branches `[dbfefddd] <https://github.com/eclipse/cloe/commit/dbfefddd6489751943e3959605b63e26321576a5>`_

- tooling: Add Bazel support `[73d24a43] <https://github.com/eclipse/cloe/commit/73d24a4333a11a5875c18a67d347f873daeb840a>`_
- tooling: Disable dependabot for the UI `[c22e9d74] <https://github.com/eclipse/cloe/commit/c22e9d746df9b3c537bbd7e7872cfada2c82d8b1>`_
- tooling: Improve grep-uuids to better show duplicates `[e58c48fe] <https://github.com/eclipse/cloe/commit/e58c48fe96cfeb5d6eb10a42b223681f4e3427d3>`_
- tooling: Add VS Code project configuration `[6c03bd5f] <https://github.com/eclipse/cloe/commit/6c03bd5fb86954b63429ac7cfb4c2d0dfb8286ce>`_
- tooling: Update deploy-all to simply call cloe-launch deploy `[29eed02f] <https://github.com/eclipse/cloe/commit/29eed02fa015087c0a27353db6676031cab0d710>`_
- tooling: Fix interspersed $() and ${} in Makefiles `[a2494825] <https://github.com/eclipse/cloe/commit/a24948251dbd2dc1f97091512fd3a832d726694c>`_
- tooling: Move tests into project root tests directory `[1a9436dd] <https://github.com/eclipse/cloe/commit/1a9436dd3c07fd38229e30a32afd4864fe0704be>`_
- tooling: Make cloe a super-build of all packages `[65a4aef8] <https://github.com/eclipse/cloe/commit/65a4aef8542b4968e3fb10e42507ac06585cc06c>`_

- vendor/open-simulation-interface: Add full_package_mode `[d5f33148] <https://github.com/eclipse/cloe/commit/d5f33148a21359f80836fccd6c8587b43de8565d>`_

0.24.0 (2024-05-06)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/creating-a-new-release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Run ``conan search`` to check that your cache only has the expected packages.

Then, compile the entire project locally::

make purge-all export-vendor export smoketest-deps smoketest
make purge-all export-cli export-vendor export-all smoketest-deps smoketest

This should run through without errors. Then make sure to do the same with
the optional packages::
Expand Down
22 changes: 22 additions & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,35 @@ News
:hidden:
:maxdepth: 1

news/release-0.25.0
news/release-0.24.0
news/release-0.23.0
news/release-0.22.0
news/release-0.21.0
news/release-0.20.0
news/release-0.19.0

:doc:`Version 0.25.0 Release <news/release-0.25.0>`
---------------------------------------------------

This release contains the initial implementation of Lua support with the new
DataBroker and Signals concept.

- New command ``shell`` for cloe-engine allows running Lua scripts and/or
provides an interactive shell prompt (similar to the ``lua`` command).
- New command ``probe`` for cloe-engine dumps available triggers, signals, and
other metadata for a simulation without running the simulation in its entirety.

The Cloe build has been streamlined and simplified:

- Discontinue `cloe` meta-package. It was not possible to continue using this
with Conan 1 due to technical limitations.
(The `conanfile.py` in the repo root is now a superbuild of cloe for
development purposes only.)
- Move tests from various sub-directories into a single unified tests directory.
- Add experimental Bazel build tooling configuration.

Read more about these changes and more :doc:`here <news/release-0.25.0>`.

:doc:`Version 0.24.0 Release <news/release-0.24.0>`
---------------------------------------------------
Expand Down
220 changes: 220 additions & 0 deletions docs/news/release-0.25.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
# Version 0.25.0 Release

This release contains the initial implementation of Lua support with the new
DataBroker and Signals concept.

## Add Lua support

Lua is a lightweight embedded language that can now be used to define simulation
configuration and test execution.

For example:

```lua
cloe = require("cloe")
proj = require("project")
cloe.load_stackfile("existing_configuration.json")
cloe.schedule_test {
id = "e03fc31f-586b-4e57-80fa-ff2cba5ff9dd",
on = events.start(),
run = function(test, sync)
cloe.log("info", "Entering test")
test:wait_duration("1s")

-- Enable Cruise Control
proj.enable_hmi()
test:wait_duration("4s")

-- Set speed and increase
local speed = cloe.signal(proj.Signals.VehicleSpeed).kmph()
proj.buttons.plus.push("1500ms")
test:wait_duration("4s")

-- Check that new speed is higher than before but lower than
-- the speed-limit.
local new_speed = cloe.signal(proj.Signals.VehicleSpeed).kmph()
test:assert_gt(new_speed, speed)
test:assert_le(new_speed, proj.scenario.speed_limit)
test:succeed()
end
}
```

The above test-case is a hypothetical, yet realistic way that such a test can
be written. The results are written to an output file and the terminal output
in JSON format, so they can be easily processed.

The engine comes with a new `shell` command, which allows you to launch an
interactive Lua session or just run Lua files.

A simulation with or without Lua can be run as before with the `run` command.
The JSON stackfile interface is still supported and can be mixed with Lua.
In particular, all the features in the stackfiles can be now used from Lua
in a backwards-compatible way. Your existing test files do not need to be
rewritten, but you can achieve better results by adding Lua or switching
completely.

## New probe sub-command

The new `probe` sub-command of `cloe-engine` allows you to probe a simulation
configuration with merged stack files.

In this mode, a simulation is set up and all the participants are connected,
probed, and then disconnected. That means:

- the simulation must be fully configured,
- failures may occur during connection phase, and
- scripts included must be correct.

The output of the probe is a JSON written to stdout:

```json
{
"http_endpoints": [ "/endpoints", ... ],
"plugins": {
"PLUGIN_NAME": "PLUGIN_PATH",
...
},
"signals": {
"SIGNAL_NAME": "DESCRIPTION",
...
},
"tests": {
}
"trigger_actions": [ "ACTION1", "..." ],
"trigger_events": [ "EVENT1", ... ],
"uuid": "UUID",
"vehicles": {
"NAME": [ "COMPONENT1", ... ]
}
}
```

The tests section is only defined if the simulation configuration
contains Lua that defines tests (via `cloe.schedule_test()` API).
You can use tools like `jq` to further filter and refine the output.

Examples:

cloe-engine probe tests/test_nop_smoketest.json
cloe-engine probe my_lua_test.lua | jq -r '.tests | keys | .[]'

## Engine changes

- Add `--output-path` option to ``run`` command.

This allows you to specify where output files should be written without having
to configure it in the stackfile.

- Remove `--distinct` flag from ``check`` command.

It wasn't used much and complicated the code. This old behavior can be easily
achieved with outside tooling, such as `xargs` and `find`, so there is no loss
in functionality overall.

## Tooling changes

The `cloe` Conan package was previously a meta-package containing all packages
created from this repository.

This package is being discontinued from this version of Cloe.
It was primarily meant for testing purposes, and thanks to new dependencies
in our project and the limitations of Conan 1, it no longer fulfills this role.

**Migration:**
> If you have been using the `cloe` package as a first-level dependency, then
> you will need to specify all the packages individually that you need.
>
> It is highly recommended to split your build Conanfile from your deployment
> Conanfile. For your controller build Conanfile, you generally only need:
>
> def requirements(self):
> def cloe_requires(dep):
> self.requires(f"{dep}/0.25.0@cloe/develop")
>
> cloe_requires("cloe-runtime")
> cloe_requires("cloe-models")
>
> And for your deployment Conanfile you should only include the plugins you
> actually use:
>
> def requirements(self):
> def cloe_requires(dep):
> self.requires(f"{dep}/0.25.0@cloe/develop")
>
> cloe_requires("cloe-engine")
> cloe_requires("cloe-plugin-clothoid-fit")
> cloe_requires("cloe-plugin-frustum-culling")
> cloe_requires("cloe-plugin-gndtruth-extractor")
> cloe_requires("cloe-plugin-noisy-sensor")
> cloe_requires("cloe-plugin-esmini")
> self.requires("your-plugin")
> self.requires("esmini-data/2.37.4@cloe/stable")
>
> # Override as needed:
> self.requires("esmini/2.37.4@cloe/stable", override=True)
> self.requires("fmt/9.1.0", override=True)
> self.requires("inja/3.4.0", override=True)
> self.requires("nlohmann_json/3.11.3", override=True)
> self.requires("incbin/cci.20211107", override=True)
> self.requires("boost/1.74.0", override=True)
> self.requires("zlib/1.2.13", override=True)
> self.requires("protobuf/3.21.12", override=True)
For developing Cloe, the root Conanfile is now a super-build of Cloe, which
provides a vastly simplified workflow for editing Cloe code:

echo "0.26.0-nightly" > VERSION
make editable

And then iterate changes and (re-)builds with

make all

This is a boon to development, as we make `cloe` editable and only have to work
with a single package. It also massively speeds up compilation:

- Conan and CMake configuration is only performed once.
- All cores can now be utilized much more effectively during the build process.

The main Makefile has been adjusted for this:

- `status` is now `status-all`
- `deploy` is now `deploy-all`
- `clean` is now `clean-all`
- `purge` is now `purge-all`

The following top-level Make targets just refer to `cloe` super-build package:

- `package`
- `smoketest`
- `smoketest-deps`
- `status`
- `export`

Finally, we moved all tests into project root tests directory.
We still support multiple profiles, but this makes it easier to support the
cloe super-build and should also make it easier to develop and maintain tests.

## Bazel Build

We have added experimental support for Bazel builds. Bazel is a promising
build system for enterprises, as it radically simplifies the build tooling
required. We have a single tool Bazel, instead of three or four layers of tools;
in our case: Make -> Conan -> CMake -> Make/Ninja.

The `.bazelrc.user` file needs to be configured in order for certain third-party
modules to be found (see repository `README.md`)

- `bazel build //...` builds everything in the project.
- `bazel test //...` runs all tests.
- `bazel run :cloe_shell` launches a shell wherein `cloe-engine` is available.

Full feature parity with Conan is not yet achieved. For example, there is
no Bazel build for VTD or ESmini yet. Contributions are welcomed! :-)

## Library changes

At various places, `boost::optional` and `boost::filesystem` types and methods are
replaced by their C++17 counterparts. This makes our libraries more lightweight
by reducing their dependence on Boost.
2 changes: 1 addition & 1 deletion docs/reference/plugins/basic.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: basic
Type: controller
Path: ~/.conan/data/cloe-plugin-basic/0.24.0/cloe/develop/package/b604e04f9a20730e6de510c8305e28e783869866/lib/cloe/controller_basic.so
Path: ~/.conan/data/cloe-plugin-basic/0.25.0/cloe/develop/package/722452d8f3bfc1eef1fc5de534638769b66120b8/lib/cloe/controller_basic.so
Usage: {
"acc": "object :: ACC configuration",
"aeb": "object :: AEB configuration",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/plugins/basic_schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "~/.conan/data/cloe-plugin-basic/0.24.0/cloe/develop/package/b604e04f9a20730e6de510c8305e28e783869866/lib/cloe/controller_basic.so",
"$id": "~/.conan/data/cloe-plugin-basic/0.25.0/cloe/develop/package/722452d8f3bfc1eef1fc5de534638769b66120b8/lib/cloe/controller_basic.so",
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"description": "very basic vehicle controller",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/plugins/clothoid_fit.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: clothoid_fit
Type: component
Path: ~/.conan/data/cloe-plugin-clothoid-fit/0.24.0/cloe/develop/package/8f9ac47c1ba762e10f909572a2501bc20131849f/lib/cloe/component_clothoid_fit.so
Path: ~/.conan/data/cloe-plugin-clothoid-fit/0.25.0/cloe/develop/package/8bbe28227abbfb1588c2b6b2f814b6f165c9c063/lib/cloe/component_clothoid_fit.so
Usage: {
"enable": "boolean :: enable or disable component",
"frustum_culling": "boolean :: enable or disable frustum culling"
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/plugins/clothoid_fit_schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "~/.conan/data/cloe-plugin-clothoid-fit/0.24.0/cloe/develop/package/8f9ac47c1ba762e10f909572a2501bc20131849f/lib/cloe/component_clothoid_fit.so",
"$id": "~/.conan/data/cloe-plugin-clothoid-fit/0.25.0/cloe/develop/package/8bbe28227abbfb1588c2b6b2f814b6f165c9c063/lib/cloe/component_clothoid_fit.so",
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"description": "fit clothoids to polylines",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/plugins/demo_printer.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: demo_printer
Type: controller
Path: ~/.conan/data/cloe-plugin-mocks/0.24.0/cloe/develop/package/b604e04f9a20730e6de510c8305e28e783869866/lib/cloe/controller_demo_printer.so
Path: ~/.conan/data/cloe-plugin-mocks/0.25.0/cloe/develop/package/722452d8f3bfc1eef1fc5de534638769b66120b8/lib/cloe/controller_demo_printer.so
Usage: null
Defaults: {}
2 changes: 1 addition & 1 deletion docs/reference/plugins/demo_printer_schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "~/.conan/data/cloe-plugin-mocks/0.24.0/cloe/develop/package/b604e04f9a20730e6de510c8305e28e783869866/lib/cloe/controller_demo_printer.so",
"$id": "~/.conan/data/cloe-plugin-mocks/0.25.0/cloe/develop/package/722452d8f3bfc1eef1fc5de534638769b66120b8/lib/cloe/controller_demo_printer.so",
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"description": "print a lot of information",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/plugins/demo_stuck.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: demo_stuck
Type: controller
Path: ~/.conan/data/cloe-plugin-mocks/0.24.0/cloe/develop/package/b604e04f9a20730e6de510c8305e28e783869866/lib/cloe/controller_demo_stuck.so
Path: ~/.conan/data/cloe-plugin-mocks/0.25.0/cloe/develop/package/722452d8f3bfc1eef1fc5de534638769b66120b8/lib/cloe/controller_demo_stuck.so
Usage: {
"halt_progress_at": "integer :: time in ns at which to halt all progress",
"progress_per_step": "integer :: progress to make each step"
Expand Down
Loading

0 comments on commit 4fe8afa

Please sign in to comment.