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

Generate a window manually with GLFW when using irrlicht #1071

Merged
merged 12 commits into from
May 10, 2023

Conversation

S-Dafarra
Copy link
Contributor

This should fix #1070

I have tested it on Ubuntu 20 and on Windows 11 with a fresh installation and it seems to work. On Windows it works only when using SDL.

I needed to add a good amount of code to process the mouse inputs since with the external window, irrlicht was not detecting the events anymore.

@S-Dafarra S-Dafarra requested a review from traversaro May 5, 2023 17:01
@CLAassistant
Copy link

CLAassistant commented May 5, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ traversaro
✅ S-Dafarra
❌ ergoCub


ergoCub seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@S-Dafarra
Copy link
Contributor Author

I realized now that the additional FindGLFW3.cmake file could be an issue for projects using iDynTree, does it?

@traversaro
Copy link
Member

I realized now that the additional FindGLFW3.cmake file could be an issue for projects using iDynTree, does it?

No problem! Anyhow I got rid of the Find script in S-Dafarra#1 , as it is not necessary in Ubuntu >= 20.04 .

traversaro and others added 4 commits May 9, 2023 16:27
Made more clear that glfw instances counter is reduced only when closing the window. Anyhow, this was not an issue before thanks to the flag initialized that was set to false after the first call to close.
@traversaro
Copy link
Member

Ok, CI seems happy with the latest change. At this point, I think we need to ask help to @antonellopaolino to check if this new version of iDynTree does not interfere with his visualization workflow on Windows. For doing that, I already prepared some binaries at conda-forge/idyntree-feedstock#59 . However, there is a binary for each different version of Python, so to minimize the changes, I would like to ask to @antonellopaolino to provide us the output of mamba list of his existing environment, so that I can provide instructions on how to the the binary corresponding to this PR.

@antonellopaolino
Copy link

Hi, @traversaro! This is the output of the mamba list command on the environment in which I usually run idyntree:

# Name                    Version                   Build  Channel
ace                       7.0.11               h63175ca_0    conda-forge
aom                       3.5.0                h63175ca_0    conda-forge
assimp                    5.2.5                h4dcb625_0    conda-forge
blockfactory              0.8.3               h63175ca_78    robotology
blosc                     1.21.3               hdccc3a2_0    conda-forge
boost-cpp                 1.78.0               h9f4b32c_1    conda-forge
bullet-cpp                3.21                 h1c4a608_4    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
c-compiler                1.5.2                hcfcfb64_0    conda-forge
ca-certificates           2022.12.7            h5b45459_0    conda-forge
cairo                     1.16.0            hd694305_1014    conda-forge
cfitsio                   4.2.0                h9ebe7e4_0    conda-forge
clangdev                  5.0.0                   flang_3    conda-forge
cmake                     3.25.2               h1537add_0    conda-forge
compilers                 1.5.2                h57928b3_0    conda-forge
console_bridge            1.0.2                h5362a0b_1    conda-forge
cppzmq                    4.9.0                h449d27f_0    conda-forge
curl                      7.88.1               h68f0423_0    conda-forge
cxx-compiler              1.5.2                h91493d7_0    conda-forge
cython                    0.29.33         py310h00ffb61_0    conda-forge
dartsim                   6.12.2               he40511e_3    conda-forge
dirent                    1.21                          0    conda-forge
dlfcn-win32               1.3.0                h0e60522_0    conda-forge
eigen                     3.4.0                h2d74725_0    conda-forge
expat                     2.5.0                h1537add_0    conda-forge
fcl                       0.7.0                h2475031_2    conda-forge
ffmpeg                    5.1.2           gpl_h5b1d025_106    conda-forge
flang                     5.0.0           he025d50_20180525    conda-forge
flang_win-64              5.0.0           h13ae965_20180526    conda-forge
flann                     1.9.1             h23a95e4_1011    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.2               hbde0cde_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fortran-compiler          1.5.2                h9655429_0    conda-forge
freeglut                  3.2.2                h0e60522_1    conda-forge
freeimage                 3.18.0              h30d40d2_12    conda-forge
freetype                  2.12.1               h546665d_1    conda-forge
freexl                    1.0.6                h67ca5e6_1    conda-forge
fribidi                   1.0.10               h8d14728_0    conda-forge
gazebo                    11.12.0              h0516dcc_8    conda-forge
gazebo-yarp-plugins       4.6.0               hd2d89ca_78    robotology
geos                      3.11.1               h1537add_0    conda-forge
geotiff                   1.7.1                hc256dc0_6    conda-forge
getopt-win32              0.1                  h8ffe710_0    conda-forge
gettext                   0.21.1               h5728263_0    conda-forge
glib                      2.74.1               h12be248_1    conda-forge
glib-tools                2.74.1               h12be248_1    conda-forge
graphite2                 1.3.13                     1000    conda-forge
graphviz                  6.0.2                hb5dec95_0    conda-forge
gsl                       2.7                  hdfb1a43_0    conda-forge
gst-plugins-base          1.22.0               h001b923_0    conda-forge
gstreamer                 1.22.0               h6b5321d_0    conda-forge
gts                       0.7.6                h7c369d9_2    conda-forge
harfbuzz                  6.0.0                he256f1b_0    conda-forge
hdf4                      4.2.15               h1b1b6ef_5    conda-forge
hdf5                      1.12.2          nompi_h57737ce_101    conda-forge
icu                       70.1                 h0e60522_0    conda-forge
icub-firmware-shared      1.29.0              h63175ca_78    robotology
icub-main                 2.0.2           py310h70c1692_78    robotology
icub-models               1.26.0          py310h00ffb61_0    conda-forge
idyntree                  8.1.0           py310h666c5ba_0    conda-forge
idyntree-matlab-bindings  8.1.0               h63175ca_78    robotology
imath                     3.1.6                h12be248_1    conda-forge
intel-openmp              2023.0.0         h57928b3_25922    conda-forge
ipopt                     3.14.10              ha9547d1_0    conda-forge
irrlicht                  1.8.5                h739eaf8_2    conda-forge
jasper                    2.0.33               hc2e4405_1    conda-forge
jpeg                      9e                   hcfcfb64_3    conda-forge
jsoncpp                   1.9.5                h2d74725_1    conda-forge
jxrlib                    1.1                  h8ffe710_2    conda-forge
kealib                    1.5.0                h61be68b_0    conda-forge
krb5                      1.20.1               heb0366b_0    conda-forge
lcms2                     2.14                 ha5c8aab_1    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libaec                    1.0.6                h63175ca_1    conda-forge
libblas                   3.9.0              16_win64_mkl    conda-forge
libcblas                  3.9.0              16_win64_mkl    conda-forge
libccd-double             2.1                  h0e60522_3    conda-forge
libclang                  15.0.7          default_h77d9078_1    conda-forge
libclang13                15.0.7          default_h77d9078_1    conda-forge
libcurl                   7.88.1               h68f0423_0    conda-forge
libdeflate                1.17                 hcfcfb64_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libflang                  5.0.0           h6538335_20180525    conda-forge
libgd                     2.3.3                hf5a96e7_4    conda-forge
libgdal                   3.6.2                h329cd9e_7    conda-forge
libglib                   2.74.1               he8f3873_1    conda-forge
libhwloc                  2.9.0                h51c2c0f_0    conda-forge
libiconv                  1.17                 h8ffe710_0    conda-forge
libignition-cmake2        2.16.0               h63175ca_1    conda-forge
libignition-common3       3.15.1               hc27e538_1    conda-forge
libignition-fuel-tools4   4.6.0                h4cc2e26_0    conda-forge
libignition-math6         6.13.0          py310h595d6f7_1    conda-forge
libignition-msgs5         5.9.0                hc6328b4_1    conda-forge
libignition-tools1        1.5.0                h63175ca_2    conda-forge
libignition-transport8    8.3.0                h252ff3b_1    conda-forge
libkml                    1.3.0             hf2ab4e4_1015    conda-forge
liblapack                 3.9.0              16_win64_mkl    conda-forge
liblapacke                3.9.0              16_win64_mkl    conda-forge
libnetcdf                 4.9.1           nompi_hc41bf00_101    conda-forge
libode                    0.16.2              h00ffb61_11    conda-forge
libogg                    1.3.4                h8ffe710_1    conda-forge
libopenblas               0.3.21          pthreads_hc140b1d_3    conda-forge
libopencv                 4.7.0           py310h90026ac_1    conda-forge
libopus                   1.3.1                h8ffe710_1    conda-forge
libosqp                   0.6.2                h63175ca_4    conda-forge
libpng                    1.6.39               h19919ed_0    conda-forge
libpq                     15.2                 ha9684e8_0    conda-forge
libprotobuf               3.21.12              h12be248_0    conda-forge
libqdldl                  0.1.5                h63175ca_1    conda-forge
libraw                    0.21.1               h3eb7d9d_0    conda-forge
librttopo                 1.1.0               he22b5cd_12    conda-forge
libsdformat               9.8.0                h5ba8b87_4    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libspatialite             5.0.1               hfdcade0_23    conda-forge
libsqlite                 3.40.0               hcfcfb64_0    conda-forge
libssh2                   1.10.0               h9a1e1f7_3    conda-forge
libtiff                   4.5.0                hf8721a0_2    conda-forge
libusb                    1.0.26             h8ffe710_100    conda-forge
libvorbis                 1.3.7                h0e60522_0    conda-forge
libwebp                   1.2.4                hcfcfb64_1    conda-forge
libwebp-base              1.2.4                h8ffe710_0    conda-forge
libxcb                    1.13              hcd874cb_1004    conda-forge
libxml2                   2.10.3               hc3477c8_0    conda-forge
libzip                    1.9.2                h519de47_1    conda-forge
libzlib                   1.2.13               hcfcfb64_4    conda-forge
llvm-meta                 5.0.0                         0    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
make                      4.3                  h3d2af85_1    conda-forge
matlab-whole-body-simulator 3.2.0               h63175ca_78    robotology
metis                     5.1.0             h0e60522_1006    conda-forge
mkl                       2022.1.0           h6a75c08_874    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
mumps-seq                 5.2.1               hb3f9cae_11    conda-forge
ninja                     1.11.1               h91493d7_0    conda-forge
numpy                     1.24.2          py310hd02465a_0    conda-forge
octomap                   1.9.8                h91493d7_0    conda-forge
ogre                      1.10.12             h7604e60_10    conda-forge
openal-soft               1.22.2               h2d74725_0    conda-forge
openblas                  0.3.21          pthreads_h1956dd5_3    conda-forge
opencv                    4.7.0           py310h5588dad_1    conda-forge
openexr                   3.1.5                hab3b255_1    conda-forge
openh264                  2.3.1                h63175ca_2    conda-forge
openjpeg                  2.5.0                ha2aaf27_2    conda-forge
openmp                    5.0.0                    vc14_1    conda-forge
openssl                   3.0.8                hcfcfb64_0    conda-forge
osqp-eigen                0.8.0                h63175ca_0    conda-forge
pango                     1.50.13              hdffb7b3_0    conda-forge
pcre2                     10.40                h17e33f8_0    conda-forge
pip                       23.0.1             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h8ffe710_0    conda-forge
pkg-config                0.29.2            h2bf4dc2_1008    conda-forge
poppler                   23.01.0              h183ae7b_0    conda-forge
poppler-data              0.4.12               hd8ed1ab_0    conda-forge
portaudio                 19.6.0               h63175ca_7    conda-forge
postgresql                15.2                 hd87cd2b_0    conda-forge
proj                      9.1.1                heca977f_2    conda-forge
pthread-stubs             0.4               hcd874cb_1001    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pugixml                   1.11.4               h0e60522_0    conda-forge
py-opencv                 4.7.0           py310hbbfc1a7_1    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
python                    3.10.9          h4de0772_0_cpython    conda-forge
python_abi                3.10                    3_cp310    conda-forge
qpoases                   3.2.1           py310h2c5aedd_2    conda-forge
qt-main                   5.15.8               h720456b_6    conda-forge
qwt                       6.2.0                h07be427_5    conda-forge
robot-testing-framework   2.0.1                h63175ca_1    conda-forge
ruby                      3.1.2                h8ed59c0_0    conda-forge
sdl                       1.2.60               h63175ca_0    conda-forge
sdl2                      2.26.3               h63175ca_0    conda-forge
setuptools                67.4.0             pyhd8ed1ab_0    conda-forge
simbody                   3.7                  hade3207_3    conda-forge
snappy                    1.1.9                hfb803bf_2    conda-forge
soxr                      0.1.3                hcfcfb64_3    conda-forge
sqlite                    3.40.0               hcfcfb64_0    conda-forge
svt-av1                   1.4.1                h63175ca_0    conda-forge
tbb                       2021.8.0             h91493d7_0    conda-forge
tbb-devel                 2021.8.0             h91493d7_0    conda-forge
tiledb                    2.13.2               h3132609_0    conda-forge
tiny-process-library      2.0.4                h63175ca_1    conda-forge
tinyxml                   2.6.2                h2d74725_2    conda-forge
tinyxml2                  9.0.0                h0e60522_2    conda-forge
tk                        8.6.12               h8ffe710_0    conda-forge
tzdata                    2022g                h191b570_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
urdfdom                   3.1.0                h33150cf_1    conda-forge
urdfdom_headers           1.1.0                h5362a0b_0    conda-forge
vc                        14.3                hb6edc58_10    conda-forge
vs2015_runtime            14.34.31931         h4c5c07a_10    conda-forge
vs2019_win-64             19.29.30139         hb9aee9d_10    conda-forge
vswhere                   3.1.1                h57928b3_0    conda-forge
wb-toolbox                5.6.0               h63175ca_78    robotology
wheel                     0.38.4             pyhd8ed1ab_0    conda-forge
whole-body-controllers    2.5.6               h63175ca_78    robotology
whole-body-estimators     0.9.1               h63175ca_78    robotology
x264                      1!164.3095           h8ffe710_2    conda-forge
x265                      3.5                  h2d74725_3    conda-forge
xerces-c                  3.2.4                h63175ca_1    conda-forge
xorg-kbproto              1.0.7             hcd874cb_1002    conda-forge
xorg-libice               1.0.10               hcd874cb_0    conda-forge
xorg-libsm                1.2.3             hcd874cb_1000    conda-forge
xorg-libx11               1.8.4                hcd874cb_0    conda-forge
xorg-libxau               1.0.9                hcd874cb_0    conda-forge
xorg-libxdmcp             1.1.3                hcd874cb_0    conda-forge
xorg-libxext              1.3.4                hcd874cb_2    conda-forge
xorg-libxpm               3.5.13               hcd874cb_0    conda-forge
xorg-libxt                1.2.1                hcd874cb_2    conda-forge
xorg-xextproto            7.3.0             hcd874cb_1003    conda-forge
xorg-xproto               7.0.31            hcd874cb_1007    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge
yarp-cxx                  3.7.2                h8a0a163_9    conda-forge
yarp-matlab-bindings      3.7.3               h63175ca_78    robotology
ycm-cmake-modules         0.15.1               h63175ca_1    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zlib                      1.2.13               hcfcfb64_4    conda-forge
zstd                      1.5.2                h12be248_6    conda-forge
zziplib                   0.13.69              h1d00b33_1    conda-forge

@traversaro
Copy link
Member

traversaro commented May 10, 2023

Actually I probably underestimated the effort for this test. The problem is that we have the binary corresponding to this PR in idyntree, but we do not have the corresponding idyntree-matlab-bindings package. At this point, probably we can just release idyntree 9 and do this tests after the release. In any case, even if the test fails the outcome will be that we debug the glfw version until it works, I think it would be improbably that we will not be able to fix eventual problems and that we need to go back to avoid the use of glfw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set resizable window on Windows
4 participants