File tree Expand file tree Collapse file tree 5 files changed +18
-5
lines changed
devices/YarpRobotLoggerDevice
include/BipedalLocomotion Expand file tree Collapse file tree 5 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 2626 tomlplusplus_TAG : v2.5.0
2727 icub_models_TAG : v1.23.3
2828 UnicyclePlanner_TAG : d3f6c80afe21a9958da769c8dd8a2bbfee5ea922
29- telemetry_TAG : v0.5.1
29+ telemetry_TAG : v1.2.0
3030
3131 # Overwrite the VCPKG_INSTALLATION_ROOT env variable defined by GitHub Actions to point to our vcpkg
3232 VCPKG_INSTALLATION_ROOT : C:\robotology\vcpkg
Original file line number Diff line number Diff line change 3737 # Compilation related dependencies
3838 mamba install cmake compilers make ninja pkg-config
3939 # Actual dependencies
40- mamba install "idyntree>=8.0.0" "yarp>=3.5.0" libmatio libmatio-cpp \
40+ mamba install "idyntree>=8.0.0" "yarp>=3.5.0" libmatio libmatio-cpp librobometry \
4141 liblie-group-controllers eigen qhull "casadi>=3.5.5" cppad spdlog "catch2=2" \
4242 nlohmann_json manif manifpy pybind11 numpy pytest scipy opencv pcl \
4343 tomlplusplus libunicycle-footstep-planner "icub-models>=1.23.4" \
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ All notable changes to this project are documented in this file.
77### Changed
88
99### Fix
10+ - Fix the compilation of the ` YarpRobotLoggerDevice ` in ` Windows ` and ` macOS ` (https://github.com/ami-iit/bipedal-locomotion-framework/pull/580 )
1011
1112## [ 0.11.0] - 2022-12-17
1213### Added
Original file line number Diff line number Diff line change 77#define BIPEDAL_LOCOMOTION_FRAMEWORK_YARP_ROBOT_LOGGER_DEVICE_YARP_TEXT_LOGGING_UTILITIES_H
88
99#include < string>
10+ #include < cstdint>
1011
1112#include < yarp/os/Bottle.h>
1213
@@ -29,7 +30,7 @@ struct TextLoggingEntry
2930 std::string cmd;
3031 std::string args;
3132 int pid{0 };
32- long thread_id{0 };
33+ std:: int64_t thread_id{0 };
3334 std::string component;
3435 std::string id;
3536 double systemtime{0.0 };
Original file line number Diff line number Diff line change @@ -554,10 +554,21 @@ bool YarpRobotLoggerDevice::attachAll(const yarp::dev::PolyDriverList& poly)
554554
555555 if (ok)
556556 {
557- for (auto & [cameraName, writer] : m_videoWriters)
557+ // using C++17 it is not possible to use a structured binding in the for loop, i.e. for
558+ // (auto& [key, val] : m_videoWriters) since Lambda implicit capture fails with variable
559+ // declared from structured binding.
560+ // As explained in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0588r1.html
561+ // If a lambda-expression [...] captures a structured binding (explicitly or
562+ // implicitly), the program is ill-formed.
563+ // you can find further information here:
564+ // https://stackoverflow.com/questions/46114214/lambda-implicit-capture-fails-with-variable-declared-from-structured-binding
565+ // Note if one day we will support c++20 we can use structured binding see
566+ // https://en.cppreference.com/w/cpp/language/structured_binding
567+ for (auto iter = m_videoWriters.begin (); iter != m_videoWriters.end (); ++iter)
558568 {
559569 // start a separate the thread for each camera
560- writer.videoThread = std::thread ([&] { this ->recordVideo (cameraName, writer); });
570+ iter->second .videoThread
571+ = std::thread ([this , iter] { this ->recordVideo (iter->first , iter->second ); });
561572 }
562573 }
563574 }
You can’t perform that action at this time.
0 commit comments