Giter VIP home page Giter VIP logo

human-robot-gym's Introduction

TUM - Cyber Physical Systems Group

Prof. Dr.-Ing. Matthias Althoff

https://www.ce.cit.tum.de/cps/

Reachability Analysis & Controller Synthesis

Autonomous Vehicles & Vessels

Robotics

Power Systems

Reinforcement Learning

See also: https://www.ce.cit.tum.de/cps/software/

human-robot-gym's People

Contributors

jakobthumm avatar leomaglanoc avatar rafaelcabraltum avatar sh0cktr4p avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

human-robot-gym's Issues

Cannot install python package pin

Hi,

I am installing the environment using the file environment.yml. But I just found that the package pin now cannot be installed due to the following issue:

ERROR: Could not find a version that satisfies the requirement cmeel-boost~=1.82.0 (from versions: 1.80.0, 1.81.0)

Could you please help to fix it?

Thank you!

installation issues with respect to fmt and formatting

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 in human-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 structure

/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/home/soumoroy/anaconda3/envs/hrgym/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing safety_shield.egg-info/PKG-INFO
writing dependency_links to safety_shield.egg-info/dependency_links.txt
writing requirements to safety_shield.egg-info/requires.txt
writing top-level names to safety_shield.egg-info/top_level.txt
reading manifest file 'safety_shield.egg-info/SOURCES.txt'
adding license file 'LICENSE'
adding license file 'COPYING'
writing manifest file 'safety_shield.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
Using DCMake type Release
-- pybind11 v2.14.0 dev1
-- Build spdlog: 1.14.1
-- Build type: Release
-- Configuring done
-- Generating done
-- Build files have been written to: /home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/build
[ 10%] Built target long_term_planner
[ 16%] Built target spdlog
[ 31%] Built target SaRA
[ 63%] Built target yaml-cpp
[ 67%] Built target yaml-cpp-read
[ 67%] Built target yaml-cpp-parse
[ 69%] Built target yaml-cpp-sandbox
[ 71%] Built target body_part_combined_tests
[ 73%] Built target long_term_planner_tests
[ 74%] Building CXX object CMakeFiles/safety_shield.dir/src/safety_shield.cc.o
[ 76%] Built target roots_tests
In file included from /home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/external/spdlog/include/spdlog/fmt/fmt.h:24,
from /home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/external/spdlog/include/spdlog/common.h:50,
from /home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/external/spdlog/include/spdlog/spdlog.h:12,
from /home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/include/safety_shield/human_reach.h:25,
from /home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/include/safety_shield/safety_shield.h:33,
from /home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/src/safety_shield.cc:1:
/home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/external/spdlog/include/spdlog/fmt/bundled/core.h: In instantiation of ‘constexpr fmt::v10::detail::value fmt::v10::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v10::basic_format_context<fmt::v10::appender, char>; T = safety_shield::RobotReach::Velocity_method; typename std::enable_if<PACKED, int>::type = 0]’:
/home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/external/spdlog/include/spdlog/fmt/bundled/core.h:1842:0: required from ‘constexpr fmt::v10::format_arg_store<Context, Args>::format_arg_store(T& ...) [with T = {safety_shield::RobotReach::Velocity_method}; Context = fmt::v10::basic_format_context<fmt::v10::appender, char>; Args = {safety_shield::RobotReach::Velocity_method}]’
/home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/external/spdlog/include/spdlog/logger.h:335:0: required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {safety_shield::RobotReach::Velocity_method&}; spdlog::string_view_t = fmt::v10::basic_string_view]’
/home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/external/spdlog/include/spdlog/logger.h:80:0: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, fmt::v10::format_string<T ...>, Args&& ...) [with Args = {safety_shield::RobotReach::Velocity_method&}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, safety_shield::RobotReach::Velocity_method&>]’
/home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/external/spdlog/include/spdlog/logger.h:85:0: required from ‘void spdlog::logger::log(spdlog::level::level_enum, fmt::v10::format_string<T ...>, Args&& ...) [with Args = {safety_shield::RobotReach::Velocity_method&}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, safety_shield::RobotReach::Velocity_method&>]’
/home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/external/spdlog/include/spdlog/logger.h:140:0: required from ‘void spdlog::logger::info(fmt::v10::format_string<T ...>, Args&& ...) [with Args = {safety_shield::RobotReach::Velocity_method&}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, safety_shield::RobotReach::Velocity_method&>]’
/home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/external/spdlog/include/spdlog/spdlog.h:168:0: required from ‘void spdlog::info(fmt::v10::format_string<T ...>, Args&& ...) [with Args = {safety_shield::RobotReach::Velocity_method&}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, safety_shield::RobotReach::Velocity_method&>]’
/home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/src/safety_shield.cc:86:0: required from here
/home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/external/spdlog/include/spdlog/logger.h:328:0: in ‘constexpr’ expansion of ‘fmt::v10::make_format_args<>(args#0)’
/home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/external/spdlog/include/spdlog/fmt/bundled/core.h:1600: error: ‘fmt::v10::detail::type_is_unformattable_for<safety_shield::RobotReach::Velocity_method, char> _’ has incomplete type
1600 | type_is_unformattable_for<T, typename Context::char_type> _;
|
/home/soumoroy/catkin_ws/src/hrc/human-robot-gym/human_robot_gym/controllers/failsafe_controller/sara-shield/safety_shield/external/spdlog/include/spdlog/fmt/bundled/core.h:1604: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter specialization: https://fmt.dev/latest/api.html#udt
1604 | formattable,
|
make[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 1601

#if 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* or const 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::char_type> _;
}

this block of code seems to have some issues

GLEW initalization error: Missing GL version.

Hi,
Following the installation process provided by the human-robot-gym github link, everything works fine.
But when I try to get the camera observations, I use the following arguments
has_renderer=False, use_camera_obs=True and has_offscreen_renderer=True

But after running the file, it shows the error:

ERROR: GLEW initalization error: Missing GL version

Press Enter to exit ...

Currently I am using this package in conda environment and
my openGL version:
OpenGL version string: 4.6.0 NVIDIA 535.171.04

I tried every possible solution in the internet to solve this issue.

Regards,
Utsha

Question on Setting up Kinova3 to Work with CollisionWrapper?

I was setting up human-robot-gym and running through the demo scripts and had a question about getting the Kinova3 set up to work with the CollisionWrapper. I tested the base setup from human-robot-gym with the Schunk robot using the demo_reach_human_environment.py script and found there were no collisions when using the ExpertObsWrapper. And further relaxed this to when there was no expert and instead used the GymWrapper with action selection done through the following:

         action = env.action_space.sample()
         pos = np.array([env.sim.data.qpos[x] for x in env.robots[0]._ref_joint_pos_indexes])
         goal = env.desired_goal
         action[:pos.shape[0]] = np.clip(goal-pos, -0.5, 0.5)

and found the expected behavior of no collisions of any type.

I wanted to have the same outcome with the Kinova3 robot so I followed the same setup as the Schunk had by creating a Pinnochio Manipulator Model of the Kinova3 as is done for the Schunk in the human_robot_gym/models/robots/manipulators/schunk_robot.py file. However, I have been seeing all collision types occur when testing the Kinova3 in the demo_reach_human_environment.py script (both with the ExpertObsWrapper and without). Are there any extra steps I should be aware of in getting the collision wrapper working in this setup?

Right now, my file structure includes:

                     human_robot_gym/models/robots/manipulators/kinova3_robot.py
                     human_robot_gym/models/assets/robots/kinova3/robot.xml (from robosuite)
                     human_robot_gym/models/assets/robots/kinova3/robot.urdf (and the corresponding meshes folder)
                     human_robot_gym/models/robots/config/kinova3.json

For the urdf file I used the one from https://github.com/Leonardfjy/kinova_gen3_ros2/blob/humble-devel/src/kortex_description/arms/gen3/urdf/GEN3_URDF_V12.urdf and modified the joint limits to reflect the hardware limits of the robot and changed all joint types to revolute except for the last one (Actuator7) which I kept continuous so that Nb joints = 8 (nq=8, nv =7) when going through Pinnochio in the pinonocchio_manipulator_model.py script.

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.