Giter VIP home page Giter VIP logo

Comments (23)

aosmw avatar aosmw commented on August 26, 2024 1

See Work In Progress #156

from fields2cover.

pl3703 avatar pl3703 commented on August 26, 2024 1

For iron version build, I'm able to build the v2.0.0 after installing dependencies by apt install swig gnuplot libfftw3-dev.

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on August 26, 2024

@aosmw, do you have any idea how to fix this?

from fields2cover.

wimos-ai avatar wimos-ai commented on August 26, 2024

In the package.xml, comment out the line that says, "libabsl-dev". At least that works for me

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on August 26, 2024

Let's try that

from fields2cover.

aosmw avatar aosmw commented on August 26, 2024

It might have something to do with the use of https://cmake.org/cmake/help/latest/variable/LIBRARY_OUTPUT_PATH.html

It is used in swig/python/CMakeLists.txt and also in the spline dependency.

Copy and pasting comment made in opennav_coverage here too

The main problem of using the Fields2Cover package, (2.0.0-13noble.20240514.144256) right now is the command line flags that the ros buildfarm uses and what they do to the locations of where things get installed prior to creating the debian package.

Fields2Cover does not use ament_cmake and I when I started trying to help, I tried to workaround what was there. I introduced the use of cmake include(GNUInstallDirs) and used the variable CMAKE_INSTALL_LIBDIR which is overriden by the ros packaging command in a way that is not playing nicely.

Digging down into it the command that is getting run by the ros build farm to create the package - https://build.ros2.org/job/Rbin_uN64__fields2cover__ubuntu_noble_amd64__binary/77/console and wrapping it in a script to reproduce locally

#!/bin/bash

mkdir -p build
cd build
DEB_PYTHON_INSTALL_LAYOUT=deb cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-GUnix Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu -DBUILD_TESTING:BOOL=OFF -DCMAKE_INSTALL_PREFIX=/optmw/ros/rolling -DCMAKE_PREFIX_PATH=/optmw/ros/rolling -DBUILD_TESTING=OFF -DFETCHCONTENT_FULLY_DISCONNECTED=OFF ..

make -j8
sudo make install

Notice the -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu
Notice that i tweak the install prefix to /optmw isolate it on my local dev system.

I have some ideas to get it to play nicely (in a ros package install) that I am playing around with.

My aim is to find a way to get the ortools sfuff installed in /opt/ros/rolling/opt/f2c_ortools while still working for a non-ros/non-ament build.

THIS #146 (remove libabsl-dev from Fields2Cover/package.xml) might be a simple fix for now but the way the Fields2Cover package is dumping ortools artifacts into /opt/ros/rolling should really be improved so I will keep plugging away at it.

from fields2cover.

rovo89 avatar rovo89 commented on August 26, 2024

#156 has been merged, but still I'm getting the exact same error as above (with the duplicate "lib" directory in the path). Is that known and are investigations still ongoing?

I can work around the issue by creating symlinks:

sudo ln -s ../bin /opt/ros/iron/lib/bin
sudo ln -s ../include /opt/ros/iron/lib/include
sudo ln -s x86_64-linux-gnu /opt/ros/iron/lib/lib

With that, the build is able to complete, but it's obviously very hacky.

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on August 26, 2024

Hi @rovo89,
it usually takes a few days between the merging on our side and the ROS release. I've checked ROS iron and humble and they should be fine now.
Can you try again please?

from fields2cover.

rovo89 avatar rovo89 commented on August 26, 2024

I'm trying to compile it within another project. Inside the workspace, they have this repo's main branch checked out to src/lib/fields2cover (along with other dependencies). And then have colcon build --base-paths "src/lib/*" in their Makefile to compile it. This still fails with the error above, while changing into the directory and running colcon build there works fine (except for some python warnings and taking more than 3 minutes to compile).

from fields2cover.

pl3703 avatar pl3703 commented on August 26, 2024

I'm able to reproduce the error quite easily. Please find the steps

  1. Install a brand new Ubuntu 22.04
  2. Install ros2 iron
  3. Install navigation2
  4. Install fields2cover using sudo apt install ros-iron-fields2cover
  5. Clone opennav_coverage repo, then build it using colon build, you can see the error of libabsl_log_severity.a missing

from fields2cover.

wimos-ai avatar wimos-ai commented on August 26, 2024

I was also able to get it to compile and run by running rosdep install -i --from-path ./libraries/Fields2Cover --rosdistro humble -y to install lib_absl. After that it compiled fine.

from fields2cover.

pl3703 avatar pl3703 commented on August 26, 2024

I was also able to get it to compile and run by running rosdep install -i --from-path ./libraries/Fields2Cover --rosdistro humble -y to install lib_absl. After that it compiled fine.

Thanks for sharing the info! Is ./libraries/Fields2Cover the source cloned from this repo, or only the packed installed using apt?

from fields2cover.

wimos-ai avatar wimos-ai commented on August 26, 2024

I was also able to get it to compile and run by running rosdep install -i --from-path ./libraries/Fields2Cover --rosdistro humble -y to install lib_absl. After that it compiled fine.

Thanks for sharing the info! Is ./libraries/Fields2Cover the source cloned from this repo, or only the packed installed using apt?

Yah, sorry, should have specified. I cloned the repo.

from fields2cover.

pl3703 avatar pl3703 commented on August 26, 2024

I was also able to get it to compile and run by running rosdep install -i --from-path ./libraries/Fields2Cover --rosdistro humble -y to install lib_absl. After that it compiled fine.

Thanks for sharing the info! Is ./libraries/Fields2Cover the source cloned from this repo, or only the packed installed using apt?

Yah, sorry, should have specified. I cloned the repo.

Got it, did you install OR-tools by following the google's instructions?

from fields2cover.

wimos-ai avatar wimos-ai commented on August 26, 2024

from fields2cover.

pl3703 avatar pl3703 commented on August 26, 2024

Nope. Didn't do that. I think in the latest CMakes it downloads them automatically if needed. Though I admit I had gotten it running before on that computer so it may just have been seeing my previously downloaded version.

On Mon, Jul 22, 2024, 10:27 AM pl3703 @.> wrote: I was also able to get it to compile and run by running rosdep install -i --from-path ./libraries/Fields2Cover --rosdistro humble -y to install lib_absl. After that it compiled fine. Thanks for sharing the info! Is ./libraries/Fields2Cover the source cloned from this repo, or only the packed installed using apt? Yah, sorry, should have specified. I cloned the repo. Got it, did you install OR-tools https://developers.google.com/optimization by following the google's instructions? — Reply to this email directly, view it on GitHub <#146 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUBGCZJBC2NC2PT5OW2CG7TZNUQHLAVCNFSM6AAAAABIH25GSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBTGIZTONJQGU . You are receiving this because you commented.Message ID: @.>

Thanks! I got new errors if I try to build it, with such steps

  1. git clone Fields2Cover repo, and put it into ./fields2cover_repo/src
  2. install rosdep install -i --from-path ./src/Fields2Cover --rosdistro iron -y
  3. in the ./fields2cover run colcon build, the errors of (
--- stderr: fields2cover                              
/home/repos/complete_coverate/build/fields2cover/swig/python/setup.py:2: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.sysconfig import get_python_lib
/home/repos/complete_coverate/build/fields2cover/swig/python/setup.py:2: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
  from distutils.sysconfig import get_python_lib
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(

)

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on August 26, 2024

Hi @pl3703, those are warnings, not the actual error.

from fields2cover.

pl3703 avatar pl3703 commented on August 26, 2024

Hi @pl3703, those are warnings, not the actual error.

Sorry, let me clarify my question. When I tried to build opennav_coverage package using Fields2Cover as dependency, it gave such error. I clone both (Fields2Cover and opennav_coverage) in src/ folder and run colcon build on the outside of src/. Then I found Fields2Cover is able to build (using colcon build --packages-select fields2cover), but the opennav_coverage (who depends on Fields2Cover) failed.

CMake Error at /usr/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  Could not find a package configuration file provided by "ortools" with any
  of the following names:

    ortoolsConfig.cmake
    ortools-config.cmake

  Add the installation prefix of "ortools" to CMAKE_PREFIX_PATH or set
  "ortools_DIR" to a directory containing one of the above files.  If
  "ortools" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  /home/repos/complete_coverate/install/fields2cover/lib/cmake/fields2cover/Fields2CoverConfig.cmake:18 (find_dependency)
  CMakeLists.txt:18 (find_package)

from fields2cover.

Jakubach avatar Jakubach commented on August 26, 2024

I had the same issue on ROS2 Humble and I managed to fix that with below steps:

To fix ortools error I had to remove fields2cover from /usr (I installed it previosly with rosdep):
find / -type f -iname "*fields2cover*" and then remove eveything related to that.

Then make a new installation:

  1. Download https://github.com/Fields2Cover/Fields2Cover/releases/tag/v1.2.1 and put it into ros2 workspace ros2_ws into src (git clone with selected branch doesn't work since there is no branch v1.2.1).
  2. (Optional) Remove nested directory and rename to Fields2Cover.
  3. Download opennav_coverage into src: git clone https://github.com/open-navigation/opennav_coverage.git -b humble
  4. Install Fields2Cover
cd ~/ros2_ws/src/Fields2Cover`
mkdir -p build; 
cd build; cmake -DCMAKE_BUILD_TYPE=Release ..; 
make -j$(nproc); 
sudo make install;
  1. Build packages (from ros2_ws directory):
colcon build --packages-select opennav_coverage opennav_coverage_bt opennav_coverage_demo opennav_coverage_msgs opennav_coverage_navigator backported_bt_navigator opennav_row_coverage fields2cover 

from fields2cover.

pl3703 avatar pl3703 commented on August 26, 2024

I had the same issue on ROS2 Humble and I managed to fix that with below steps:

To fix ortools error I had to remove fields2cover from /usr (I installed it previosly with rosdep): find / -type f -iname "*fields2cover*" and then remove eveything related to that.

Then make a new installation:

  1. Download https://github.com/Fields2Cover/Fields2Cover/releases/tag/v1.2.1 and put it into ros2 workspace ros2_ws into src (git clone with selected branch doesn't work since there is no branch v1.2.1).
  2. (Optional) Remove nested directory and rename to Fields2Cover.
  3. Download opennav_coverage into src: git clone https://github.com/open-navigation/opennav_coverage.git -b humble
  4. Install Fields2Cover
cd ~/ros2_ws/src/Fields2Cover`
mkdir -p build; 
cd build; cmake -DCMAKE_BUILD_TYPE=Release ..; 
make -j$(nproc); 
sudo make install;
  1. Build packages (from ros2_ws directory):
colcon build --packages-select opennav_coverage opennav_coverage_bt opennav_coverage_demo opennav_coverage_msgs opennav_coverage_navigator backported_bt_navigator opennav_row_coverage fields2cover 

Thanks! I'll try it today. BTW, did you install ortools before step 4?

from fields2cover.

Jakubach avatar Jakubach commented on August 26, 2024

No, I didn't. Checked to be sure with find / -type f -iname "*ortools*" and it's not installed.
Please let me know if this steps will work for you after you try.

from fields2cover.

pl3703 avatar pl3703 commented on August 26, 2024

No, I didn't. Checked to be sure with find / -type f -iname "*ortools*" and it's not installed. Please let me know if this steps will work for you after you try.

Thanks a lot! The humble version can be built successfully. Have you ever tried to build the iron with v2.0.0 Fields2cover? I'm still having the issue to complete this step

cd ~/ros2_ws/src/Fields2Cover`
mkdir -p build; 
cd build; cmake -DCMAKE_BUILD_TYPE=Release ..; 
make -j$(nproc); 
sudo make install;

Error is

CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR) (Required is at
  least version "4.0")
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.22/Modules/FindSWIG.cmake:153 (find_package_handle_standard_args)
  swig/CMakeLists.txt:1 (find_package)

from fields2cover.

Jakubach avatar Jakubach commented on August 26, 2024

For iron version build, I'm able to build the v2.0.0 after installing dependencies by apt install swig gnuplot libfftw3-dev.

How did you manage to solve ortools problem? Could you show your installation steps? I was trying to build from source and also using ortools_vendor but still I'm getting this error for the Fields2Cover v2.0.0 :(

from fields2cover.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.