Closed s0um0r0y closed 2 months ago
Hi, I haven't encountered this issue yet. Can you add some steps to reproduce as well, please? On a side note, are you sure you want to add human-robot gym to your catkin ws? If you are only looking for the safety shield for human-robot collaboration and don't need the simulation environment (I assume you are using Gazebo as you are working with ROS), you can also use sara-shield directly.
Hello, Thanks for the quick reply !
I would like to use the simulation environment and I think installation of human-robot-gym outside the catkin ws is a good idea . I will take that suggestion.
Steps to reproduce:
$ conda activate hrgym
$ cd human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield
$ pip install -r requirements.txt
$ python setup.py install
ok so following @JakobThumm suggestion I have manged to fix this issue,
Thank you so much.
@s0um0r0y what did you do to fix the issue? This would be valuable for future users.
I added the human-robot-gym repo outside the catkin_ws and in the environment.yml
I put -gym==0.21.0
and
-opencv_python==4.6.0.66
this helped me to resolve the issue and run the contents in the repo
Should I raise a pull request with the above changes ?
We would need to change a lot to be conform with these dependencies. We will include these in a future release.
in the setup I was running this line
$ python setup.py install
I was facing an issue in the file formatting in
fmt/core.h
inhuman-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/external/spdlog/include/spdlog/fmt/bundled/core.h
how can I fix this formatting issue without changing the functionality of the structuremake[2]: [CMakeFiles/safety_shield.dir/build.make:63: CMakeFiles/safety_shield.dir/src/safety_shield.cc.o] Error 1 make[1]: [CMakeFiles/Makefile2:259: CMakeFiles/safety_shield.dir/all] Error 2 make: * [Makefile:141: all] Error 2 Traceback (most recent call last): File "/home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/setup.py", line 177, in
setup(
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/init.py", line 87, in setup
return distutils.core.setup( attrs)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
self.run_command(cmd)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/command/install.py", line 74, in run
self.do_egg_install()
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/command/install.py", line 123, in do_egg_install
self.run_command('bdist_egg')
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/command/bdist_egg.py", line 165, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/command/bdist_egg.py", line 151, in call_command
self.run_command(cmdname)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/_distutils/command/install_lib.py", line 112, in build
self.run_command('build_ext')
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 84, in run
_build_ext.run(self)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
self.build_extensions()
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 466, in build_extensions
self._build_extensions_serial()
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 492, in _build_extensions_serial
self.build_extension(ext)
File "/home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/setup.py", line 159, in build_extension
subprocess.check_call(
File "/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '-j 8']' returned non-zero exit status 2.
in
fmt/core.h
line 1576 to 1601if defined(__cpp_if_constexpr)
// This type is intentionally undefined, only used for errors template <typename T, typename Char> struct type_is_unformattable_for;
endif
template <bool PACKED, typename Context, typename T, FMT_ENABLE_IF(PACKED)> FMT_CONSTEXPR FMT_INLINE auto make_arg(T& val) -> value {
using arg_type = remove_cvref_t<decltype(arg_mapper().map(val))>;
constexpr bool formattable_char = !std::is_same<arg_type, unformattable_char>::value; static_assert(formattable_char, "Mixing character types is disallowed.");
// Formatting of arbitrary pointers is disallowed. If you want to format a // pointer cast it to
void*
orconst void*
. In particular, this forbids // formatting of[const] volatile char*
printed as bool by iostreams. constexpr bool formattable_pointer = !std::is_same<arg_type, unformattable_pointer>::value; static_assert(formattable_pointer, "Formatting of non-void pointers is disallowed.");constexpr bool formattable = !std::is_same<arg_type, unformattable>::value;
if defined(__cpp_if_constexpr)
if constexpr (!formattable) { type_is_unformattable_for<T, typename Context::chartype> ; }
this block of code seems to have some issues