jrl-umi3218 / lipm_walking_controller

Walking controller based on linear inverted pendulum tracking
BSD 2-Clause "Simplified" License
18 stars 11 forks source link

segfault in distributeWrench method #9

Closed ndehio closed 4 years ago

ndehio commented 4 years ago

Today I upgraded mc_rtc (master branch) and lipm (origin/topic/mc_rtc_master branch). When launching the controller and clicking on the "start standing" button the controller segfaults. It seems the problem is related to the distributeWrench method. This is the gdb output:

$ gdb --args MCUDPControl -h localhost -f ~/src/multi-contact/catkin_ws/src/mc_rtc_ros/mc_rtc_ticker/etc/mc_rtc.conf
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 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 MCUDPControl...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/local/bin/MCUDPControl -h localhost -f /home/idh-user/src/multi-contact/catkin_ws/src/mc_rtc_ros/mc_rtc_ticker/etc/mc_rtc.conf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Loading default global configuration /usr/local/etc/mc_rtc.yaml
Loading additional global configuration "/home/idh-user/.config/mc_rtc/mc_rtc.conf"
Loading additional global configuration /home/idh-user/src/multi-contact/catkin_ws/src/mc_rtc_ros/mc_rtc_ticker/etc/mc_rtc.conf
Enabled plugins: ROS (autoload)
GUI server enabled
Will serve data on:
- ipc:///tmp/mc_rtc_pub.ipc
- tcp://*:4242
Will handle requests on:
- ipc:///tmp/mc_rtc_rep.ipc
- tcp://*:4343
Loading additional plugin configuration: "/usr/local/lib/mc_plugins/etc/ROS.yaml"
Loading additional controller configuration: "/usr/local/lib/mc_controller/etc/LIPMWalking.conf"
Loading additional controller configuration: "/home/idh-user/.config/mc_rtc/controllers/LIPMWalking.conf"
Create controller LIPMWalking
MCController(base) ready
Robots loaded in FSM controller:
- hrp4
- ground
Added task FSM_posture_hrp4
Initialized new ModelPredictiveControl solver
Loaded footstep plan "warmup"
LIPMWalking controller init done 0x6f5ef0
[New Thread 0x7fffeb060700 (LWP 27749)]
Create controller HalfSitPose
MCController(base) ready
Added task posture_hrp4
MCHalfSitPoseController init done 0x992820
[New Thread 0x7fffea657700 (LWP 27750)]
[New Thread 0x7fffe9e56700 (LWP 27751)]
[Thread 0x7fffea657700 (LWP 27750) exited]
[New Thread 0x7fffea657700 (LWP 27752)]
[Thread 0x7fffeb060700 (LWP 27749) exited]
[New Thread 0x7fffeb060700 (LWP 27753)]
Connecting UDP sensors client to localhost:4444
Connecting UDP control client to localhost:4445
[New Thread 0x7fffe9443700 (LWP 27754)]
Will log controller outputs to "/tmp/mc-control-LIPMWalking-2019-12-11-16-20-46.bin"
Updated latest log symlink: "/tmp/mc-control-LIPMWalking-latest.bin"
Added task FSM_body6d_hrp4_base_link
Observers:  -> Encoder (position=estimator,velocity=estimator)
[New Thread 0x7fffe8c42700 (LWP 27757)]
[New Thread 0x7fffe3fff700 (LWP 27758)]
[New Thread 0x7fffe37fe700 (LWP 27759)]
[New Thread 0x7fffe2ffd700 (LWP 27764)]
[mc_rtc::ROS] Starting ROS services
[New Thread 0x7fffe27fc700 (LWP 27773)]
[New Thread 0x7fffe1ffb700 (LWP 27779)]
[New Thread 0x7fffe17fa700 (LWP 27785)]
[MCUDPControl] Init duration 26.9564
[MCUDPControl] Missed one or more sensors reading (previous id: 10366, current id: 0)
Starting state Initial
Loaded footstep plan "warmup"
Loaded footstep plan "warmup"
Removed task FSM_body6d_hrp4_base_link
Loaded footstep plan "warmup"
Loaded footstep plan "warmup"
Initial interrupted to  resume Standing
Interrupted Initial
Starting state Standing
Added task com_hrp4
Added task cop_hrp4_LeftFootCenter
Added task cop_hrp4_RightFootCenter
Added task orientation_hrp4_base_link
Added task orientation_hrp4_torso
MCUDPControl: /usr/include/eigen3/Eigen/src/Core/DenseBase.h:261: void Eigen::DenseBase<Derived>::resize(Eigen::Index, Eigen::Index) [with Derived = Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, -1, false>; Eigen::Index = long int]: Assertion `rows == this->rows() && cols == this->cols() && "DenseBase::resize() does not actually allow to resize."' failed.

Thread 1 "MCUDPControl" received signal SIGABRT, Aborted.
0x00007ffff6143428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff6143428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff614502a in __GI_abort () at abort.c:89
#2  0x00007ffff613bbd7 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x7fffeb61c1f8 "rows == this->rows() && cols == this->cols() && \"DenseBase::resize() does not actually allow to resize.\"", 
    file=file@entry=0x7fffeb61c1c8 "/usr/include/eigen3/Eigen/src/Core/DenseBase.h", line=line@entry=261, 
    function=function@entry=0x7fffeb61d740 <Eigen::DenseBase<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false> >::resize(long, long)::__PRETTY_FUNCTION__> "void Eigen::DenseBase<Derived>::resize(Eigen::Index, Eigen::Index) [with Derived = Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, -1, false>; Eigen::Index = long int]") at assert.c:92
#3  0x00007ffff613bc82 in __GI___assert_fail (assertion=0x7fffeb61c1f8 "rows == this->rows() && cols == this->cols() && \"DenseBase::resize() does not actually allow to resize.\"", 
    file=0x7fffeb61c1c8 "/usr/include/eigen3/Eigen/src/Core/DenseBase.h", line=261, 
    function=0x7fffeb61d740 <Eigen::DenseBase<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false> >::resize(long, long)::__PRETTY_FUNCTION__> "void Eigen::DenseBase<Derived>::resize(Eigen::Index, Eigen::Index) [with Derived = Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, -1, false>; Eigen::Index = long int]") at assert.c:101
#4  0x00007fffeb612c8b in Eigen::DenseBase<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false> >::resize(long, long) () from /usr/local/lib/libeigen-quadprog.so
#5  0x00007fffeb612256 in void Eigen::internal::call_assignment_no_alias<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false>, Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1> const>, Eigen::internal::assign_op<double> >(Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false>&, Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1> const> const&, Eigen::internal::assign_op<double> const&) ()
   from /usr/local/lib/libeigen-quadprog.so
#6  0x00007fffeb6118fe in void Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false>, Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1> const>, Eigen::internal::assign_op<double> >(Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false>&, Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1> const> const&, Eigen::internal::assign_op<double> const&, Eigen::internal::enable_if<!Eigen::internal::evaluator_assume_aliasing<Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1> const>, Eigen::internal::evaluator_traits<Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1> const> >::Shape>::value, void*>::type) ()
   from /usr/local/lib/libeigen-quadprog.so
#7  0x00007fffeb610e76 in void Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false>, Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1> const> >(Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false>&, Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1> const> const&) () from /usr/local/lib/libeigen-quadprog.so
#8  0x00007fffeb610287 in Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false>& Eigen::MatrixBase<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false> >::operator=<Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1> const> >(Eigen::DenseBase<Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1> const> > const&) () from /usr/local/lib/libeigen-quadprog.so
#9  0x00007fffeb60f040 in Eigen::QuadProgDense::solve(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, bool) () from /usr/local/lib/libeigen-quadprog.so
#10 0x00007fffebd706a9 in lipm_walking::Stabilizer::distributeWrench(sva::ForceVec<double> const&) () from /usr/local/lib/mc_controller/liblipm_walking_controller.so
#11 0x00007fffebd71273 in lipm_walking::Stabilizer::run() () from /usr/local/lib/mc_controller/liblipm_walking_controller.so
#12 0x00007fffe802203a in lipm_walking::states::Standing::runState() () from /usr/local/lib/mc_controller/lipm_walking_controller/states/Standing.so
#13 0x00007fffe802beea in lipm_walking::states::Standing::start() () from /usr/local/lib/mc_controller/lipm_walking_controller/states/Standing.so
#14 0x00007fffeb8661f1 in mc_control::fsm::State::start_(mc_control::fsm::Controller&) () from /usr/local/lib/libmc_control_fsm.so.1
#15 0x00007fffeb86df5c in mc_control::fsm::StateFactory::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, mc_control::fsm::Controller&, bool, mc_rtc::Configuration const&) ()
   from /usr/local/lib/libmc_control_fsm.so.1
#16 0x00007fffeb86e1c7 in mc_control::fsm::StateFactory::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, mc_control::fsm::Controller&) () from /usr/local/lib/libmc_control_fsm.so.1
#17 0x00007fffeb85981c in mc_control::fsm::Executor::next(mc_control::fsm::Controller&) () from /usr/local/lib/libmc_control_fsm.so.1
---Type <return> to continue, or q <return> to quit---
#18 0x00007fffeb85b92b in mc_control::fsm::Executor::run(mc_control::fsm::Controller&, bool) () from /usr/local/lib/libmc_control_fsm.so.1
#19 0x00007fffeb84461e in mc_control::fsm::Controller::run(mc_solver::FeedbackType) () from /usr/local/lib/libmc_control_fsm.so.1
#20 0x00007fffebd14c12 in lipm_walking::Controller::run() [clone .part.1395] [clone .constprop.1711] () from /usr/local/lib/mc_controller/liblipm_walking_controller.so
#21 0x00007ffff79992b4 in mc_control::MCGlobalController::run() () from /usr/local/lib/libmc_control.so.1
#22 0x00000000004125a4 in main ()
(gdb) quit
arntanguy commented 4 years ago

I assume this was related to your compilation issues with mc_rtc. Closing now, feel free to re-open if you're still facing issues.

arntanguy commented 4 years ago

@ndehio is that the issue that you said I closed by mistake. If that's the case, and you're still experiencing issues after trying the master branch, feel free to reopen it.

ndehio commented 4 years ago

yes this was my issue after successful installation of mcrtc. However, I am in Germany now and don't have access to the machine. What about Julien?