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

Debug cmake windows python problems #920

Open
wants to merge 22 commits into
base: improvements_logger
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
62f0cc9
Improved warning message when adding a channel without metadata in th…
S-Dafarra Aug 29, 2024
5f9686f
Added possibility to avoid logging text
S-Dafarra Aug 29, 2024
393f356
Added explicit log_text option in the logger configuration files
S-Dafarra Aug 29, 2024
e9564c8
Added prints on the current saving stage in the logger device
S-Dafarra Jan 10, 2025
aa2efb7
Improved the time diagnostic of recordVideo in the logger device
S-Dafarra Jan 10, 2025
d9955c2
Updated CHANGELOG
S-Dafarra Jan 10, 2025
ccce521
Removed useless "s"s when printing time in logger
S-Dafarra Jan 13, 2025
a81da33
Remvoed ROS1 device publisher and example device
S-Dafarra Jan 13, 2025
a9df589
Avoid using iCubGazeboV3 in baseEstimatorFromFootIMU
S-Dafarra Jan 13, 2025
a54f510
Attempt to fix BaseEstimatorFromFootIMU test
S-Dafarra Jan 13, 2025
570f1a9
Fixed YarpRobotLoggerDeviceTest
S-Dafarra Jan 13, 2025
a39eb13
Bump yarp version on CI
S-Dafarra Jan 13, 2025
4d86cef
Fixed generation of bindings in Windows
S-Dafarra Jan 13, 2025
d4fea39
Explicit the dependency between Math and System
S-Dafarra Jan 13, 2025
f067cc8
Update conda-forge-ci.yml
traversaro Jan 14, 2025
f082c57
Update conda-forge-ci.yml
traversaro Jan 14, 2025
5d64fd1
Update conda-forge-ci.yml
traversaro Jan 14, 2025
18cf9cd
Update conda-forge-ci.yml
traversaro Jan 14, 2025
d7d8fd3
Explicit tell cmake to use conda's Python in conda-forge Windows CI
traversaro Jan 14, 2025
267cadf
Update conda-forge-ci.yml
traversaro Jan 14, 2025
8f7b5d3
Merge branch 'improvements_logger' into debugpythoncmakewin
traversaro Jan 14, 2025
07d4bec
Update conda-forge-ci.yml
traversaro Jan 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
env:
vcpkg_robotology_TAG: v0.11.0
YCM_TAG: v0.15.3
YARP_TAG: v3.8.0
YARP_TAG: v3.10.1
iDynTree_TAG: v12.3.3
CasADi_TAG: 3.5.5.2
manif_TAG: 0.0.5
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/conda-forge-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Miniforge3
miniforge-version: latest
Expand Down Expand Up @@ -64,6 +64,7 @@ jobs:
if: contains(matrix.os, 'windows')
shell: cmd /C CALL {0}
run: |
rmdir /s /q C:\hostedtoolcache\windows\Python
:: Due to this https://github.com/conda-forge/icub-models-feedstock/issues/18
:: pcl is removed as a workaround for https://github.com/ami-iit/bipedal-locomotion-framework/pull/695#issuecomment-1632208836
:: pcl can be re-added once we have a ros humble build compatible with PCL 1.13.0
Expand Down Expand Up @@ -106,7 +107,9 @@ jobs:
run: |
mkdir -p build
cd build
cmake -GNinja -DBUILD_TESTING:BOOL=ON -DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=ON -DUSE_SYSTEM_Catch2:BOOL=ON -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
:: The option -DPython3_EXECUTABLE=%CONDA_PREFIX%\python.exe is passed explicitly as a workaround for https://github.com/ami-iit/bipedal-locomotion-framework/pull/910#issuecomment-2589862552
:: once that is not necessary anymore, drop it
cmake -GNinja -DBUILD_TESTING:BOOL=ON -DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=ON -DUSE_SYSTEM_Catch2:BOOL=ON -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library -DPython3_EXECUTABLE=%CONDA_PREFIX%\python.exe -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..

- name: Build [Windows]
if: contains(matrix.os, 'windows')
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ All notable changes to this project are documented in this file.
## [unreleased]
### Added
### Changed
- Some improvements on the YarpRobotLoggerDevice (https://github.com/ami-iit/bipedal-locomotion-framework/pull/910)
- Removed ROS1 device publisher and the corresponding example (https://github.com/ami-iit/bipedal-locomotion-framework/pull/910)
### Fixed
- Avoid using ``iCubGazeboV3`` model in ``BaseEstimatorFromFootIMU`` test (https://github.com/ami-iit/bipedal-locomotion-framework/pull/910)

## [0.20.0] - 2024-12-16
### Added
Expand Down
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ option(BUILD_SHARED_LIBS "Build libraries as shared as opposed to static" ON)
option(BUILD_TESTING "Create tests using CMake" OFF)
include(CTest)

option(BUILD_DEVICE_EXAMPLES "Create example devices using CMake" OFF)

# Check BipedalLocomotionFramework dependencies, find necessary libraries.
include(BipedalLocomotionFrameworkDependencies)

Expand Down
8 changes: 7 additions & 1 deletion bindings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if(FRAMEWORK_COMPILE_PYTHON_BINDINGS)
add_subdirectory(python)

# Create the __init__.py file
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/__init__.py "")
file(WRITE ${BLF_PYTHON_PACKAGE}/__init__.py "")

# If we are on Windows and BUILD_SHARED_LIBS is ON, handle the fact that
# the Python interpreter does not look into PATH to find dll (see https://docs.python.org/3.8/library/os.html#os.add_dll_directory)
Expand All @@ -68,6 +68,12 @@ if(FRAMEWORK_COMPILE_PYTHON_BINDINGS)
file(APPEND "${BLF_PYTHON_PACKAGE}/__init__.py" "if(library_dll_path != os.path.join(os.environ.get('CONDA_PREFIX', ''),'Library','bin') and library_dll_path != os.path.join(os.environ.get('CONDA_PREFIX', ''),'bin')):${NEW_LINE}")
file(APPEND "${BLF_PYTHON_PACKAGE}/__init__.py" " if(os.path.exists(library_dll_path)):${NEW_LINE}")
file(APPEND "${BLF_PYTHON_PACKAGE}/__init__.py" " os.add_dll_directory(library_dll_path)${NEW_LINE}")

# For running tests, we need to add also the path where the dependecies are installed.
# We add idyntree to update the dll path for the tests.
file(APPEND "${BLF_PYTHON_PACKAGE}/__init__.py" "import idyntree${NEW_LINE}")


endif()

file(APPEND "${BLF_PYTHON_PACKAGE}/__init__.py" "from .bindings import *${NEW_LINE}from . import utils${NEW_LINE}")
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ target_link_libraries(pybind11_blf PRIVATE
# # The generated Python dynamic module must have the same name as the pybind11
# # module, i.e. `bindings`.
set_target_properties(pybind11_blf PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${BLF_PYTHON_PACKAGE}"
LIBRARY_OUTPUT_DIRECTORY $<1:${BLF_PYTHON_PACKAGE}> # Prevent appending Release/Debug to the output path in Windows
OUTPUT_NAME "bindings")

if(FRAMEWORK_TEST_PYTHON_BINDINGS)
Expand Down
5 changes: 0 additions & 5 deletions cmake/AddBipedalLocomotionYARPDevice.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
# This software may be modified and distributed under the terms of the
# BSD-3-Clause license.

framework_dependent_option(FRAMEWORK_COMPILE_example_devices
"Compile example devices?" ON
"BUILD_DEVICE_EXAMPLES" OFF)


function(add_bipedal_yarp_device)
set(options )
set(oneValueArgs NAME)
Expand Down
12 changes: 4 additions & 8 deletions cmake/BipedalLocomotionFrameworkDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,6 @@ framework_dependent_option(FRAMEWORK_COMPILE_YarpUtilities
"Compile YarpHelper library?" ON
"FRAMEWORK_USE_YARP" OFF)

framework_dependent_option(FRAMEWORK_COMPILE_Ros1Publisher
"Compile YarpUtilities::RosPublisher class?" ON
"FRAMEWORK_USE_YARP" OFF)

framework_dependent_option(FRAMEWORK_COMPILE_RosImplementation
"Compile All the ROS implementations?" ON
"FRAMEWORK_USE_rclcpp" OFF)
Expand All @@ -157,10 +153,6 @@ framework_dependent_option(FRAMEWORK_COMPILE_TomlImplementation
"Compile All the TOML implementations?" ON
"FRAMEWORK_USE_tomlplusplus" OFF)

framework_dependent_option(FRAMEWORK_COMPILE_Math
"Compile Math library?" ON
"FRAMEWORK_USE_manif" OFF)

framework_dependent_option(FRAMEWORK_COMPILE_Estimators
"Compile Estimators library?" ON
"" OFF)
Expand All @@ -181,6 +173,10 @@ framework_dependent_option(FRAMEWORK_COMPILE_System
"Compile System library?" ON
"" OFF)

framework_dependent_option(FRAMEWORK_COMPILE_Math
"Compile Math library?" ON
"FRAMEWORK_USE_manif;FRAMEWORK_COMPILE_System" OFF)

framework_dependent_option(FRAMEWORK_COMPILE_Unicycle
"Compile the Unicycle Planner library?" ON
"FRAMEWORK_USE_UnicyclePlanner;FRAMEWORK_COMPILE_System;FRAMEWORK_COMPILE_Planners;FRAMEWORK_COMPILE_Contact" OFF)
Expand Down
5 changes: 0 additions & 5 deletions devices/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ add_subdirectory(JointTorqueControlDevice)
add_subdirectory(RobotDynamicsEstimatorDevice)
add_subdirectory(YarpRobotLoggerDevice)
add_subdirectory(VectorsCollectionWrapper)

if (FRAMEWORK_COMPILE_example_devices)
add_subdirectory(examples)
endif()

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ BSD-3-Clause license. -->
<param name="rgb_cameras_fps">(30)</param>
<param name="video_codec_code">mp4v</param>
<param name="port_prefix">/yarp-robot-logger</param>
<param name="log_text">true</param>
<param name="text_logging_subnames">("ergoCubGazeboV1/yarprobotinterface")</param>
<param name="maximum_admissible_time_step">1.0</param>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ BSD-3-Clause license. -->
<param name="rgb_cameras_fps">(30)</param>
<param name="video_codec_code">mp4v</param>
<param name="port_prefix">/yarp-robot-logger</param>
<param name="log_text">true</param>
<param name="text_logging_subnames">("ergoCubGazeboV1/yarprobotinterface")</param>
<param name="maximum_admissible_time_step">1.0</param>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ BSD-3-Clause license. -->

<param name="video_codec_code">mp4v</param>
<param name="port_prefix">/yarp-robot-logger</param>
<param name="log_text">true</param>
<param name="text_logging_subnames">("ergocub-torso/yarprobotinterface")</param>
<param name="code_status_cmd_prefixes">("ssh [email protected]" "ssh [email protected]")</param>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ BSD-3-Clause license. -->

<param name="video_codec_code">mp4v</param>
<param name="port_prefix">/yarp-robot-logger</param>
<param name="log_text">true</param>
<param name="text_logging_subnames">("ergoCubSN001/yarprobotinterface")</param>
<param name="code_status_cmd_prefixes">("ssh [email protected]" "ssh [email protected]")</param>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ BSD-3-Clause license. -->

<param name="video_codec_code">mp4v</param>
<param name="port_prefix">/yarp-robot-logger</param>
<param name="log_text">true</param>
<param name="text_logging_subnames">("ergocub-torso/yarprobotinterface")</param>
<param name="code_status_cmd_prefixes">("ssh [email protected]" "ssh [email protected]")</param>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ BSD-3-Clause license. -->
<param name="sampling_period_in_s">0.01</param>
<param name="port_prefix">/yarp-robot-logger</param>
<param name="maximum_admissible_time_step">1.0</param>
<param name="log_text">true</param>

<group name="Telemetry">
<param name="save_period">600.0</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ BSD-3-Clause license. -->
<param name="rgb_cameras_fps">(30)</param>
<param name="video_codec_code">mp4v</param>
<param name="port_prefix">/yarp-robot-logger</param>
<param name="log_text">true</param>
<param name="text_logging_subnames">("icub-head/yarprobotinterface")</param>
<param name="code_status_cmd_prefixes">("ssh [email protected]" "ssh [email protected]")</param>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ class YarpRobotLoggerDevice : public yarp::dev::DeviceDriver,
bool m_streamCartesianWrenches{false};
bool m_streamFTSensors{false};
bool m_streamTemperatureSensors{false};
bool m_logText{true};
std::vector<std::string> m_textLoggingSubnames;
std::vector<std::string> m_codeStatusCmdPrefixes;

Expand Down
Loading
Loading