rohanpsingh / mc_mujoco

MuJoCo interface for mc-rtc
https://arxiv.org/abs/2209.00274
BSD 2-Clause "Simplified" License
85 stars 18 forks source link

[critical] Enabled entry in mc_rtc must contain at least one controller name #34

Open N1ckfm opened 1 year ago

N1ckfm commented 1 year ago

Hi, when I run mc_mujoco with the last update of mc_rtc I get an error message, I don't know if it happens to others too, I already tried it with the default robot JVRC1 and the CoM controller in the mc_rtc configuration and the error keeps appearing.

nk@lnx:~/mc_mujoco/build$ mc_mujoco 
[info] Loading default global configuration /usr/etc/mc_rtc.yaml
[error] Cannot convert from YAML if the root type is not a map or a sequence
[warning] Configuration dump until the attempted conversion:
{}
[info] Loading additional global configuration /home/nk/.config/mc_rtc/mc_rtc.yaml
[error] Cannot convert from YAML if the root type is not a map or a sequence
[warning] Configuration dump until the attempted conversion:
{}
[info] Attempt to open /usr/lib/x86_64-linux-gnu/mc_robots/json.so
[info] Found matching class name symbol MC_RTC_ROBOT_MODULE
[warning] Could not get symbol LOAD_GLOBAL in library /usr/lib/x86_64-linux-gnu/mc_robots/json.so
/usr/lib/x86_64-linux-gnu/mc_robots/json.so: undefined symbol: LOAD_GLOBAL
[info] Attempt to open /usr/lib/x86_64-linux-gnu/mc_robots/env.so
[info] Found matching class name symbol MC_RTC_ROBOT_MODULE
[warning] Could not get symbol LOAD_GLOBAL in library /usr/lib/x86_64-linux-gnu/mc_robots/env.so
/usr/lib/x86_64-linux-gnu/mc_robots/env.so: undefined symbol: LOAD_GLOBAL
[info] Attempt to open /usr/lib/x86_64-linux-gnu/mc_robots/jvrc1.so
[info] Found matching class name symbol MC_RTC_ROBOT_MODULE
[warning] Could not get symbol LOAD_GLOBAL in library /usr/lib/x86_64-linux-gnu/mc_robots/jvrc1.so
/usr/lib/x86_64-linux-gnu/mc_robots/jvrc1.so: undefined symbol: LOAD_GLOBAL
[info] Attempt to open /usr/lib/x86_64-linux-gnu/mc_robots/hrp4.so
[info] Found matching class name symbol MC_RTC_ROBOT_MODULE
[warning] Could not get symbol LOAD_GLOBAL in library /usr/lib/x86_64-linux-gnu/mc_robots/hrp4.so
/usr/lib/x86_64-linux-gnu/mc_robots/hrp4.so: undefined symbol: LOAD_GLOBAL
[info] [RobotLoader] Loading aliases from /usr/lib/x86_64-linux-gnu/mc_robots/aliases/env_aliases.yml
[info] [RobotLoader] Loading aliases from /usr/lib/x86_64-linux-gnu/mc_robots/aliases/object_aliases.yml
[info] Attempt to open /usr/lib/x86_64-linux-gnu/mc_robots/jvrc1.so
[warning] Could not get symbol create_args_required in library /usr/lib/x86_64-linux-gnu/mc_robots/jvrc1.so
/usr/lib/x86_64-linux-gnu/mc_robots/jvrc1.so: undefined symbol: create_args_required
[info] Enabled plugins: ROS (autoload)
[critical] Enabled entry in mc_rtc must contain at least one controller name
[critical] === Backtrace ===
 0# 0x00007F77DA6D5282 in /lib/x86_64-linux-gnu/libmc_control.so.2
 1# mc_control::MCGlobalController::GlobalConfiguration::GlobalConfiguration(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mc_rbdyn::RobotModule>) in /lib/x86_64-linux-gnu/libmc_control.so.2
 2# mc_control::MCGlobalController::MCGlobalController(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mc_rbdyn::RobotModule>) in /lib/x86_64-linux-gnu/libmc_control.so.2
 3# mc_mujoco::MjSimImpl::MjSimImpl(mc_mujoco::MjConfiguration const&) at /home/nk/mc_mujoco/src/mj_sim.cpp:105
 4# mc_mujoco::MjSim::MjSim(mc_mujoco::MjConfiguration const&) at /home/nk/mc_mujoco/src/mj_sim.cpp:994
 5# main at /home/nk/mc_mujoco/src/main.cpp:73
 6# __libc_start_main at ../csu/libc-start.c:342
 7# _start in mc_mujoco

terminate called after throwing an instance of 'std::runtime_error'
  what():  Enabled entry in mc_rtc must contain at least one controller name
Aborted (`core' generated)

This is the result I get with gdb

nk@lnx:~/mc_mujoco/build$ gdb mc_mujoco 
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from mc_mujoco...
(gdb) run
Starting program: /usr/local/bin/mc_mujoco 
[Depuración de hilo usando libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Nuevo Thread 0x7ffff5546700 (LWP 6719)]
[info] Loading default global configuration /usr/etc/mc_rtc.yaml

Thread 1 "mc_mujoco" received signal SIGSEGV, Segmentation fault.
0x00007ffff7a50f79 in mc_rtc::Configuration::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
   from /lib/x86_64-linux-gnu/libmc_rtc_utils.so.2
(gdb) bt
#0  0x00007ffff7a50f79 in mc_rtc::Configuration::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
    at /lib/x86_64-linux-gnu/libmc_rtc_utils.so.2
#1  0x00007ffff7a51622 in mc_rtc::Configuration::Configuration(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
    at /lib/x86_64-linux-gnu/libmc_rtc_utils.so.2
#2  0x00007ffff7a510c2 in mc_rtc::Configuration::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
    at /lib/x86_64-linux-gnu/libmc_rtc_utils.so.2
#3  0x00007ffff7e6b860 in mc_control::MCGlobalController::GlobalConfiguration::GlobalConfiguration(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mc_rbdyn::RobotModule>) ()
    at /lib/x86_64-linux-gnu/libmc_control.so.2
#4  0x00007ffff7e5c0a8 in mc_control::MCGlobalController::MCGlobalController(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mc_rbdyn::RobotModule>) ()
    at /lib/x86_64-linux-gnu/libmc_control.so.2
#5  0x000055555564fe5c in std::make_unique<mc_control::MCGlobalController, 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&) () at /usr/include/c++/9/bits/shared_ptr_base.h:616
#6  mc_mujoco::MjSimImpl::MjSimImpl(mc_mujoco::MjConfiguration const&)
    (this=0x555555b11c10, config=...) at /home/nk/mc_mujoco/src/mj_sim.cpp:105
--Type <RET> for more, q to quit, c to continue without paging--
#7  0x0000555555655200 in mc_mujoco::MjSim::MjSim(mc_mujoco::MjConfiguration const&) (this=0x7fffffffd908, config=...) at /home/nk/mc_mujoco/src/mj_sim.cpp:994
#8  0x0000555555630238 in main(int, char**)
    (argc=<optimized out>, argv=<optimized out>)
    at /home/nk/mc_mujoco/src/main.cpp:71

Additional information, the cmake configuration in mc_mujoco/build:

BUILD_SHARED_LIBS OFF
BUILD_STATIC ON

The controller works with:

roslaunch mc_rtc_ticker display.launch
rosrun mc_rtc_ticker mc_rtc_ticker

So the problem only appear me with mc_mujoco, I will really appreciate your comments.

rohanpsingh commented 1 year ago

Hi @N1ckfm Are you sure you have all the latest changes in mc_rtc?

[error] Cannot convert from YAML if the root type is not a map or a sequence This seems to suggest a problem with your config file and if I'm not wrong, there were some changes related to loading of config files in mc-rtc recently.