Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESmini simulator #223

Merged
merged 20 commits into from
Mar 27, 2024
Merged

Add ESmini simulator #223

merged 20 commits into from
Mar 27, 2024

Conversation

cassava
Copy link
Contributor

@cassava cassava commented Mar 20, 2024

Still needs to be rebased, but otherwise ready for review.

@cassava cassava changed the title Ben/esmini simulator Add ESmini simulator Mar 20, 2024
@cassava cassava force-pushed the ben/esmini-simulator branch from 11d76de to 593a8f9 Compare March 25, 2024 10:11
@cassava cassava marked this pull request as ready for review March 26, 2024 20:40
@cassava cassava requested a review from tobifalk as a code owner March 26, 2024 20:40
@cassava cassava force-pushed the ben/esmini-simulator branch from 30aec1e to 0ad5fc9 Compare March 27, 2024 07:46
Copy link
Contributor Author

@cassava cassava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I am placing this PR, I cannot approve. But I did review all the code from Tobias and fixed several findings I had. In all, looks good!

osi/CMakeLists.txt Outdated Show resolved Hide resolved
osi/include/cloe/component/osi_sensor.hpp Outdated Show resolved Hide resolved
@cassava cassava force-pushed the ben/esmini-simulator branch from da6de28 to 358d004 Compare March 27, 2024 09:19
@cassava cassava added this to the 0.22.0 milestone Mar 27, 2024
@cassava cassava added the enhancement New feature or request label Mar 27, 2024
@cassava cassava self-assigned this Mar 27, 2024
@cassava cassava force-pushed the ben/esmini-simulator branch from 1d40600 to d6edb3d Compare March 27, 2024 13:32
Copy link

@hvolx hvolx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

osi_transceiver_tcp needs to be fixed but for for EsMini it does not matter currently --> osi_transceiver_tcp may be fixed in the future!

std::vector<std::shared_ptr<osi3::SensorData>> receive_sensor_data() override {
std::vector<std::shared_ptr<osi3::SensorData>> msgs;
bool has_sensor_view() const override {
return this->tcp_available_data() >= static_cast<std::streamsize>(sizeof(osi3::SensorView));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isnt sizeof(osi3::SensorView) the size of the deserialized protobuf message whereas the size of the message in the tcp buffer is serialized?
In my point of view the amount of data in the buffer does not give any information on which osi message is in the buffer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this does look sketchy.

cassava and others added 5 commits March 27, 2024 15:34
The optional directory contains projects that are hard to build. ESMini does not
fall into this category, since the sources are freely available.

This commit does the following:

- Move optional/esmini to plugins/esmini
- Move optional/osi to osi
- Replace Conan recipe for vendor/esmini and vendor/esmini-data
- Replace Conan recipe for vendor/open-simulation-interface
- Patch the esmini and osi Cloe libraries for compatibility with new open-simulation-interface.
  In particular, the generated headers are now namespaced with osi3/
- Fix several findings in esmini and osi Cloe libraries highlighted by clang-tidy.

The vendored libraries are written in a manner similar to how it is done in
the Conan-Center-Index.
@cassava cassava force-pushed the ben/esmini-simulator branch from d6edb3d to 375afa8 Compare March 27, 2024 14:34
@cassava cassava merged commit a2283b9 into master Mar 27, 2024
7 checks passed
@cassava cassava deleted the ben/esmini-simulator branch March 27, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants