gazebosim / gz-utils Goto Github PK
View Code? Open in Web Editor NEWClasses and functions for robot applications
Home Page: https://gazebosim.org/
License: Apache License 2.0
Classes and functions for robot applications
Home Page: https://gazebosim.org/
License: Apache License 2.0
Currently there are macros in ExtraTestMacros.hh
to disable tests for different platforms, and we seem to be finding more and more test failures in arm64 and armhf platforms. It would be convenient to have macros for skipping tests for those architectures.
This repository doesn't have DCO checks configured.
Trying to do a clean build of Garden results in:
colcon build --cmake-args -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Debug -DBUILD_DOCS=OFF --merge-install
Starting >>> OGRE
Starting >>> ignition-tools2
Finished <<< ignition-tools2 [0.10s]
Finished <<< OGRE [0.58s]
Starting >>> ignition-cmake3
Finished <<< ignition-cmake3 [0.05s]
Starting >>> ignition-utils2
--- stderr: ignition-utils2
In file included from /home/matias/Projects/ign/src/ign-utils/include/ignition/utils/Environment.hh:18,
from /home/matias/Projects/ign/src/ign-utils/src/Environment.cc:18:
/home/matias/Projects/ign/src/ign-utils/include/gz/utils/Environment.hh:22:10: fatal error: gz/utils/Export.hh: No such file or directory
22 | #include <gz/utils/Export.hh>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/ignition-utils2.dir/build.make:63: src/CMakeFiles/ignition-utils2.dir/Environment.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:363: src/CMakeFiles/ignition-utils2.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
---
Failed <<< ignition-utils2 [0.05s, exited with code 2]
Summary: 3 packages finished [1.00s]
1 package failed: ignition-utils2
1 package had stderr output: ignition-utils2
13 packages not processed
The ones described in https://gazebosim.org/docs/garden/install_ubuntu_src
Both ign-utils
and ign-cmake
define macros with the same name, such as IGN_UTILS_WARN_IGNORE__NON_VIRTUAL_DESTRUCTOR
and DETAIL_IGN_UTILS_WARN_IGNORE__NON_VIRTUAL_DESTRUCTOR
:
these header files have different header guards, though, leading to compiler warnings on windows if both are included together:
Perhaps we need to wrap all our #define
statements in #ifndef
?
@mjcarroll, should this file IgnitionFormatter.hpp need to be renamed to GzFormatter.hpp ?
Migrate environment manipulation functionality from ign-common to ign-utils.
CLI11 was vendored in #2 because it wasn't available in Ubuntu Focal. We can now unvendor it since it's available everywhere we support.
Platform | version | Link |
---|---|---|
Ubuntu Noble | 2.4.1 | https://packages.ubuntu.com/noble/libcli11-dev |
Homebrew | 2.4.2 | https://formulae.brew.sh/formula/cli11 |
Windows vcpkg 2022 snapshot | 2.1.2 | https://github.com/microsoft/vcpkg/blob/2022.02.23/ports/cli11/vcpkg.json |
Windows (conda) | 2.4.1 | https://anaconda.org/conda-forge/cli11 |
The default format of help strings with the cli
component is a bit different from the format we have been using in our cmd*.rb
commands. Different is not necessarily worse, but I am noticing a specific issue with the formatting while reviewing gazebosim/gz-plugin#65 that makes the output a bit confusing:
$ ign plugin
Print information about plugins.
ign plugin [options]
Options:
-i [ --info ] Get info about a plugin.
Requires the -p option.
-p [ --plugin ] arg Path to a plugin.
Required with -i.
-v [ --verbose ] Print verbose info.
-h [ --help ] Print this help message.
--force-version <VERSION> Use a specific library version.
--versions Show the available versions.
$ bin/ign-plugin
Introspect Ignition plugin
Usage: bin/ign-plugin [OPTIONS]
Options:
-h,--help Print this help message and exit
--help-all Show all help
--version
-v,--verbose Verbose level
-i,--info Get info about a plugin.
Requires the -p option.
-p,--plugin TEXT Needs: --info
Path to a plugin.
Required with -i.
My main concern is the line -p,--plugin TEXT Needs: --info
. I don't like the Needs: --info
right next to TEXT
without a delimiter or something to indicate that you shouldn't type Needs:
on the command line. I'm guessing people will be able to figure it out, but it would be nice to be able to tidy this up.
Leave it as is I suppose.
There is documentation about Formatting help output. One option on that page is Subclassing the CLI::Formatter
class. For the -p,--plugin TEXT Needs: --info
line mentioned above, this would entail overriding the make_option_opts method (and specifically this line).
We should be careful of modifying our fork of cli11 in case this package is built against an external version.
3991dca05d041dba5477e5aa53f6b058183cd111
)7eb246daaa6248db3f7c85183789fc1e752423c9
)To reproduce the error, you will need a system with Clang-6.0 compiler
mkdir build
cd build
export CC=clang-6.0
export CXX=clang++-6.0
mkdir $HOME/ign-cmake-2.10.0
cmake -DCMAKE_INSTALL_PREFIX=$HOME/ign-cmake-2.10.0 ..
make
make install
mkdir build
cd build
export CC=clang-6.0
export CXX=clang++-6.0
cmake -DCMAKE_PREFIX_PATH=$HOME/ign-cmake-2.10.0 ..
make
g.gulgulia:~/gg_workspace/ign-utils/build$ export CXX=clang++-6.0
g.gulgulia:~/gg_workspace/ign-utils/build$ export CC=clang-6.0
g.gulgulia:~/gg_workspace/ign-utils/build$ cmake -DCMAKE_PREFIX_PATH=$HOME/ign-cmake-2.10.0 ..
-- The C compiler identification is Clang 6.0.0
-- The CXX compiler identification is Clang 6.0.0
-- Check for working C compiler: /usr/bin/clang-6.0
-- Check for working C compiler: /usr/bin/clang-6.0 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++-6.0
-- Check for working CXX compiler: /usr/bin/clang++-6.0 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- ignition-utils1 version 1.2.0
-- Operating system is Linux
-- Found CPack generators: DEB
--
-- Searching for host SSE information
-- SSE2 found
-- SSE3 found
-- SSE4.1 found
-- SSE4.2 found
-- Configuring library: ignition-utils1
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Adding 2 UNIT tests
-- No tests have been specified for INTEGRATION
-- Adding 1 INTEGRATION tests
-- No tests have been specified for PERFORMANCE
-- No tests have been specified for REGRESSION
-- Configuring library: ignition-utils1-cli
-- The program [cppcheck] was not found! Skipping codecheck setup
-- Build configuration successful
-- Build type: RelWithDebInfo
-- Install prefix: /usr/local
-- Looking for ronn to generate manpages - found
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.13") found components: doxygen dot
-- Configuring done
-- Generating done
-- Build files have been written to: /home/g.gulgulia/gg_workspace/ign-utils/build
build
dir: ccmake ..
. The output is below: BUILD_DOCS ON
BUILD_SHARED_LIBS ON
BUILD_TESTING ON
CMAKE_BUILD_TYPE
CMAKE_INSTALL_PREFIX /usr/local
CPPCHECK_PATH CPPCHECK_PATH-NOTFOUND
DPKG_PROGRAM /usr/bin/dpkg
FIND_PATH /usr/bin/find
GZIP /bin/gzip
IGN_UTILS_VENDOR_CLI11 ON
PYTHON_VERSION
RONN /usr/bin/ronn
RPMBUILD_PROGRAM RPMBUILD_PROGRAM-NOTFOUND
SSE2_FOUND ON
SSE3_FOUND ON
SSE4_1_FOUND ON
SSE4_2_FOUND ON
SSSE3_FOUND ON
USE_FULL_RPATH OFF
USE_HOST_SSE_FLAGS ON
USE_IGN_RECOMMENDED_FLAGS ON
ignition-cmake2_DIR /home/g.gulgulia/ign-cmake-2.10.0/share/cmake/ignition-cmake2
UNIT_Environment_TEST
is being linked against library Environment
g.gulgulia:~/gg_workspace/ign-utils/build$ make
-- ignition-utils1 version 1.2.0
-- Operating system is Linux
-- Found CPack generators: DEB
--
-- Searching for host SSE information
-- SSE2 found
-- SSE3 found
-- SSE4.1 found
-- SSE4.2 found
-- Configuring library: ignition-utils1
-- Adding 2 UNIT tests
-- No tests have been specified for INTEGRATION
-- Adding 1 INTEGRATION tests
-- No tests have been specified for PERFORMANCE
-- No tests have been specified for REGRESSION
-- Configuring library: ignition-utils1-cli
-- The program [cppcheck] was not found! Skipping codecheck setup
-- Build configuration successful
-- Build type: RelWithDebInfo
-- Install prefix: /usr/local
-- Looking for ronn to generate manpages - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/g.gulgulia/gg_workspace/ign-utils/build
Scanning dependencies of target doc
[ 6%] Generating API documentation with Doxygen
[ 6%] Built target doc
Scanning dependencies of target gtest
[ 13%] Building CXX object test/CMakeFiles/gtest.dir/gtest/src/gtest-all.cc.o
[ 20%] Linking CXX static library ../lib/libgtest.a
[ 20%] Built target gtest
Scanning dependencies of target ignition-utils1
[ 26%] Building CXX object src/CMakeFiles/ignition-utils1.dir/Environment.cc.o
[ 33%] Linking CXX shared library ../lib/libignition-utils1.so
[ 33%] Built target ignition-utils1
Scanning dependencies of target gtest_main
[ 40%] Building CXX object test/CMakeFiles/gtest_main.dir/gtest/src/gtest_main.cc.o
[ 46%] Linking CXX static library ../lib/libgtest_main.a
[ 46%] Built target gtest_main
Scanning dependencies of target UNIT_Environment_TEST
[ 53%] Building CXX object src/CMakeFiles/UNIT_Environment_TEST.dir/Environment_TEST.cc.o
[ 60%] Linking CXX executable ../bin/UNIT_Environment_TEST
CMakeFiles/UNIT_Environment_TEST.dir/Environment_TEST.cc.o: In function `Environment_emptyENV_Test::TestBody()':
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:28: undefined reference to `ignition::utils::v1::env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool)'
CMakeFiles/UNIT_Environment_TEST.dir/Environment_TEST.cc.o: In function `Environment_envSet_Test::TestBody()':
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:36: undefined reference to `ignition::utils::v1::setenv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:41: undefined reference to `ignition::utils::v1::env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool)'
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:49: undefined reference to `ignition::utils::v1::env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool)'
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:57: undefined reference to `ignition::utils::v1::env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool)'
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:62: undefined reference to `ignition::utils::v1::unsetenv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/UNIT_Environment_TEST.dir/Environment_TEST.cc.o: In function `Environment_envUnset_Test::TestBody()':
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:69: undefined reference to `ignition::utils::v1::unsetenv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:74: undefined reference to `ignition::utils::v1::env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool)'
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:81: undefined reference to `ignition::utils::v1::env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool)'
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:88: undefined reference to `ignition::utils::v1::env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool)'
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:91: undefined reference to `ignition::utils::v1::unsetenv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/UNIT_Environment_TEST.dir/Environment_TEST.cc.o: In function `Util_TEST_envSetEmpty_Test::TestBody()':
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:99: undefined reference to `ignition::utils::v1::setenv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:100: undefined reference to `ignition::utils::v1::setenv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:105: undefined reference to `ignition::utils::v1::env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool)'
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:121: undefined reference to `ignition::utils::v1::env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool)'
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:129: undefined reference to `ignition::utils::v1::env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool)'
/home/g.gulgulia/gg_workspace/ign-utils/src/Environment_TEST.cc:132: undefined reference to `ignition::utils::v1::unsetenv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/CMakeFiles/UNIT_Environment_TEST.dir/build.make:98: recipe for target 'bin/UNIT_Environment_TEST' failed
make[2]: *** [bin/UNIT_Environment_TEST] Error 1
CMakeFiles/Makefile2:1088: recipe for target 'src/CMakeFiles/UNIT_Environment_TEST.dir/all' failed
make[1]: *** [src/CMakeFiles/UNIT_Environment_TEST.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
gz-utils3
branch (aae0d8c)logger.RawLogger().trace("trace\n");
we should see:
(2024-09-22 19:48:25.019) [trace] [main.cc:32] trace
(2024-09-22 20:28:20.394) [trace] [:] trace
main.cc
example under examples/log
and run it.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.