ADVRHumanoids / OpenSoT

An Open Source Task Solving library with Constraints
GNU General Public License v3.0
76 stars 5 forks source link

Ubuntu 18.04 compatibility #165

Closed graiola closed 4 years ago

graiola commented 4 years ago

Hi, I am testing opensot with ubuntu 18.04. I created and updated the bionic_compatibility branches of opensot and other packages in the superbuild. Still, there are some issues at runtime when the stack is created:

0 0x00007feb0b4a1e97 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51

    set = 
        {__val = {4096, 0, 4197623133546479616, 4197623133546479616, 4195355390814191616, 4195355390814191616, 4198794050888802755, 4198794050888802755, 29295, 0, 4197623133546479616, 4197623133546479616, 4195355390814191616, 4195355390814191616, 4198794050888802755, 4198794050888802755}}
    pid = <optimized out>
    tid = <optimized out>

1 0x00007feb0b4a3801 in __GI_abort () at abort.c:79

    save_stage = 1
    act = 
      {__sigaction_handler = {sa_handler = 0x7feb0b84f680 <_IO_2_1_stderr_>, sa_sigaction = 0x7feb0b84f680 <_IO_2_1_stderr_>}, sa_mask = {__val = {140647483761085, 36, 140647487305344, 3432, 1, 140647487305475, 140647483768657, 11, 140647487305344, 10, 140642501914368, 140642482499728, 140642579623280, 140642482500072, 140647483769859, 140642502373336}}, sa_flags = 196074832, sa_restorer = 0x7fe9e264efd8}
    sigs = {__val = {32, 0 <repeats 15 times>}}

2 0x00007feb0baf8957 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6

3 0x00007feb0bafeab6 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6

4 0x00007feb0bafeaf1 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6

5 0x00007feb0bafed24 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6

6 0x00007fe9ae8052b9 in OpenSoT::solvers::iHQP::iHQP(std::vector<std::shared_ptr<OpenSoT::Task<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> > >, std::allocator<std::shared_ptr<OpenSoT::Task<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> > > > >&, std::shared_ptr<OpenSoT::Constraint<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> > >, double, OpenSoT::solvers::solver_back_ends) (this=0x7fe9e135b000, stack_of_tasks=..., bounds=..., eps_regularisation=, be_solver=)

at /home/graiola/workspace/advr-superbuild/external/OpenSoT/src/solvers/iHQP.cpp:79

---Type to continue, or q to quit---

7 0x00007fe9aeda3af7 in OpenSoT::IDProblem::IDProblem(ros::NodeHandle&, std::shared_ptr, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) (this=0x7fe9e26d2ef0, nh=..., model=..., feet_names=std::vector of length 4, capacity 4 = {...}, arm_tip_name=...)

at /home/graiola/ros_ws/src/wbc/wb_controller/src/id_problem.cpp:165
    mus = 
        std::vector of length 4, capacity 4 = {{first = {<Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::MatrixBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::DenseBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 3>> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 1>> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 0>> = {<Eigen::EigenBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, m_storage = {m_data = {array = {1, 0, 0, 0, 1, 0, 0, 0, 1}}}}, <No data fields>}, second = 0.5}, {first = {<Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::MatrixBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::DenseBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 3>> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 1>> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 0>> = {<Eigen::EigenBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, m_storage = {m_data = {array = {1, 0, 0, 0, 1, 0, 0, 0, 1}}}}, <No data fields>}, second = 0.5}, {first = {<Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::MatrixBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::DenseBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 3>> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 1>> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 0>> = {<Eigen::EigenBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, m_storage = {m_data = {array = {1, 0, 0, 0, 1, 0, 0, 0, 1}}}}, <No data fields>}, second = 0.5}, {first = {<Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::MatrixBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::DenseBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 3>> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 1>> = {<Eigen::DenseCoeffsBas---Type <return> to continue, or q <return> to quit---

double, 3, 3, 0, 3, 3> >> = {}, }, }, }, }, }, m_storage = {m_data = {array = {1, 0, 0, 0, 1, 0, 0, 0, 1}}}}, }, second = 0.5}} xmax = {<Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >> = {<Eigen::MatrixBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >> = {<Eigen::DenseBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, -1, 1, 0, -1, 1>, 3>> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, -1, 1, 0, -1, 1>, 1>> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, -1, 1, 0, -1, 1>, 0>> = {<Eigen::EigenBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >> = {}, }, }, }, }, }, m_storage = {m_data = 0x7fe9e261c980, m_rows = 18}}, } xmin = {<Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >> = {<Eigen::MatrixBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >> = {<Eigen::DenseBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, -1, 1, 0, -1, 1>, 3>> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, -1, 1, 0, -1, 1>, 1>> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, -1, 1, 0, -1, 1>, 0>> = {<Eigen::EigenBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >> = {}, }, }, }, }, }, m_storage = {m_data = 0x7fe9e2633d80, m_rows = 18}}, } idw_Z = std::cxx11::list = {[0] = 2} idf = std::cxx11::list = {[0] = 0, [1] = 1, [2] = 2} problemnh = {namespace = "\020\360d\342\351\177\000\000D\000\000\000\000\000\000\000 ", unresolvednamespace = "", remappings_ = std::map with 511101108348 elements<error reading variable: Cannot access memory at address 0x18>, unresolvedremappings = std::map with 140645818142944 elements<error reading variable: Cannot access memory at address 0x2a8>, callbackqueue = 0x7feaa807b3c0, collection = 0x7fe9e000a9e0, ok = 169} R = {<Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::MatrixBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::DenseBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 3>> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 1>> = {<Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 0>> = {<Eigen::EigenBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >> = {}, }, }, }, }, }, m_storage = {m_data = {array = {1, 0, 0, 0, , , , , }}}}, } idw_RPY = std::cxx11::list = {[0] = 3, [1] = 4, [2] = 5} rosconsole_define_location_loc = {initialized = false, loggerenabled = false, level = ros::console::levels::Count, logger = 0x0} rosconsole_define_locationloc = {initialized_ = true, loggerenabled = true, level = ros::console::levels::Info, logger = 0x7feaa8071a10}

8 0x00007fe9aed4d175 in wb_controller::Controller::toggleSolver() (this=this@entry=0x7feaa80790e0) at /home/graiola/ros_ws/src/wbc/wb_controller/src/controller.cpp:704

    __PRETTY_FUNCTION__ = "void wb_controller::Controller::toggleSolver()"

9 0x00007fe9aed545f2 in wb_controller::Controller::update(ros::Time const&, ros::Duration const&) (this=0x7feaa80790e0, time=..., period=...)

at /home/graiola/ros_ws/src/wbc/wb_controller/src/controller.cpp:809
    __PRETTY_FUNCTION__ = "virtual void wb_controller::Controller::update(const ros::Time&, const ros::Duration&)"

10 0x00007fe9c55c0477 in controller_manager::ControllerManager::update(ros::Time const&, ros::Duration const&, bool) () at /opt/ros/melodic/lib/libcontroller_manager.so

11 0x00007fe9e417c65e in gazebo_ros_control::GazeboRosControlPlugin::Update() () at /opt/ros/melodic/lib/libgazebo_ros_control.so

12 0x00007feb0ac3d680 in gazebo::physics::World::Update() () at /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.9

13 0x00007feb0ac4863b in gazebo::physics::World::Step() () at /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.9

14 0x00007feb0ac48a8d in gazebo::physics::World::RunLoop() () at /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.9

15 0x00007feb0bb2966f in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6

16 0x00007feb0af686db in start_thread (arg=0x7fe9e6ffd700) at pthread_create.c:463

    pd = 0x7fe9e6ffd700
    now = <optimized out>
    unwind_buf = 
          {cancel_jmp_buf = {{jmp_buf = {140642579633920, 9149550499498929370, 140642579627264, 0, 94083042722464, 140730069703520, -9139362422696334118, -9137893395926766374}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
    not_first_call = <optimized out>

17 0x00007feb0b58488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

updating everything to std::shared_ptr did not solve the issue. Any idea?

liesrock commented 4 years ago

Hi @graiola,

thanks for the above! Can you give use some more details on how to reproduce the issue? Do you have a basic exe to run with all the branches to bionic_compatibility?

graiola commented 4 years ago

Unfortunately I don't have a test exe yet, I am running opensot inside my ros control plugin. I also noticed that the problem appears at random, and mostly when the code is compiled in Debug. Could it be an assert somewhere? Note that the plugin worked fine on ubuntu 16.04.

liesrock commented 4 years ago

Hi @graiola, I came back to this eventually: I was able to create a docker container and I have an image of Ubuntu 18.04 with the following packages installed inside the MultiDoF-superbuild (and the related branches):

CartesianInterface/  -->  (bionic_compatibility) 
GazeboXBotPlugin/  -->  (master) 
ModelInterfaceRBDL/  -->  (master) 
OpenSoT/  -->  (bionic_compatibility) 
RMLTypeII/  -->  (master) 
RobotInterfaceROS/  -->  (master) 
RobotInterfaceXBotRT/  -->  (master) 
XBotCore/  -->  (bionic_compatibility) 
XBotDummy/  -->  (master) 
XBotInterface/  -->  (bionic_compatibility) 
YCM/  -->  ((HEAD detached at 538bec0)) 
fcl/  -->  ((HEAD detached at 54e9619)) 
rbdl/  -->  ((HEAD detached at v2.5.0)) 
xbot_msgs/  -->  (master) 
xbot_ros/  -->  (master) 

All XBotInterface, CartesianInterface and OpenSoT tests (which I report below) seem to pass:

root@d661884e181d:~/MultiDoF-superbuild/build/external/OpenSoT# make test
Running tests...
Test project /root/MultiDoF-superbuild/build/external/OpenSoT
      Start  1: OpenSoT_floating_base_KinematicEstimation
 1/34 Test  #1: OpenSoT_floating_base_KinematicEstimation ......   Passed    1.14 sec
      Start  2: OpenSoT_tasks_Task
 2/34 Test  #2: OpenSoT_tasks_Task .............................   Passed    0.01 sec
      Start  3: OpenSoT_constraints_BilateralConstraint
 3/34 Test  #3: OpenSoT_constraints_BilateralConstraint ........   Passed    0.01 sec
      Start  4: OpenSoT_constraints_velocity_JointLimits
 4/34 Test  #4: OpenSoT_constraints_velocity_JointLimits .......   Passed    0.06 sec
      Start  5: OpenSoT_front_ends_ihqp
 5/34 Test  #5: OpenSoT_front_ends_ihqp ........................   Passed    0.01 sec
      Start  6: OpenSoT_solvers_qpOases
 6/34 Test  #6: OpenSoT_solvers_qpOases ........................   Passed    1.08 sec
      Start  7: OpenSoT_solvers_eiquadprog
 7/34 Test  #7: OpenSoT_solvers_eiquadprog .....................   Passed    0.75 sec
      Start  8: OpenSoT_utils_affineHelper
 8/34 Test  #8: OpenSoT_utils_affineHelper .....................   Passed    0.02 sec
      Start  9: OpenSoT_constraint_force_FrictionCones
 9/34 Test  #9: OpenSoT_constraint_force_FrictionCones .........   Passed    0.03 sec
      Start 10: OpenSoT_task_velocity_Manipulability
10/34 Test #10: OpenSoT_task_velocity_Manipulability ...........   Passed    9.91 sec
      Start 11: OpenSoT_task_velocity_MinimizeAcceleration
11/34 Test #11: OpenSoT_task_velocity_MinimizeAcceleration .....   Passed    0.17 sec
      Start 12: OpenSoT_task_velocity_MinimumVelocity
12/34 Test #12: OpenSoT_task_velocity_MinimumVelocity ..........   Passed    0.01 sec
      Start 13: OpenSoT_task_velocity_Postural
13/34 Test #13: OpenSoT_task_velocity_Postural .................   Passed    0.03 sec
      Start 14: OpenSoT_task_acceleration_Postural
14/34 Test #14: OpenSoT_task_acceleration_Postural .............   Passed    0.25 sec
      Start 15: OpenSoT_task_SubTask
15/34 Test #15: OpenSoT_task_SubTask ...........................   Passed    0.12 sec
      Start 16: OpenSoT_utils_cartesian_utils
16/34 Test #16: OpenSoT_utils_cartesian_utils ..................   Passed    0.98 sec
      Start 17: OpenSoT_solvers_qpOases_SetActiveStack
17/34 Test #17: OpenSoT_solvers_qpOases_SetActiveStack .........   Passed    0.48 sec
      Start 18: OpenSoT_task_velocity_MinimumEffort
18/34 Test #18: OpenSoT_task_velocity_MinimumEffort ............   Passed    2.72 sec
      Start 19: OpenSoT_constraints_velocity_VelocityLimit
19/34 Test #19: OpenSoT_constraints_velocity_VelocityLimit .....   Passed    0.01 sec
      Start 20: OpenSoT_constraints_acceleration_JointLimits
20/34 Test #20: OpenSoT_constraints_acceleration_JointLimits ...   Passed    7.15 sec
      Start 21: OpenSoT_solvers_qpOases_Options
21/34 Test #21: OpenSoT_solvers_qpOases_Options ................   Passed    1.97 sec
      Start 22: OpenSoT_solvers_qpOases_SubTask
22/34 Test #22: OpenSoT_solvers_qpOases_SubTask ................   Passed    0.06 sec
      Start 23: OpenSoT_task_velocity_CoM
23/34 Test #23: OpenSoT_task_velocity_CoM ......................   Passed    0.04 sec
      Start 24: OpenSoT_utils_AutoStack
24/34 Test #24: OpenSoT_utils_AutoStack ........................   Passed    0.13 sec
      Start 25: OpenSoT_solvers_BasicAlgebra
25/34 Test #25: OpenSoT_solvers_BasicAlgebra ...................   Passed   12.88 sec
      Start 26: OpenSoT_task_acceleration_Cartesian
26/34 Test #26: OpenSoT_task_acceleration_Cartesian ............   Passed    0.42 sec
      Start 27: OpenSoT_task_acceleration_com
27/34 Test #27: OpenSoT_task_acceleration_com ..................   Passed    0.48 sec
      Start 28: OpenSoT_task_floating_base_Postural
28/34 Test #28: OpenSoT_task_floating_base_Postural ............   Passed    0.42 sec
      Start 29: OpenSoT_task_velocity_Cartesian
29/34 Test #29: OpenSoT_task_velocity_Cartesian ................   Passed    0.17 sec
      Start 30: OpenSoT_task_velocity_Cartesian_admittance
30/34 Test #30: OpenSoT_task_velocity_Cartesian_admittance .....   Passed    0.02 sec
      Start 31: OpenSoT_constraints_velocity_CoMVelocity
31/34 Test #31: OpenSoT_constraints_velocity_CoMVelocity .......   Passed    0.08 sec
      Start 32: OpenSoT_utils_testPiler
32/34 Test #32: OpenSoT_utils_testPiler ........................   Passed    0.01 sec
      Start 33: OpenSoT_solvers_qpOases_FF
33/34 Test #33: OpenSoT_solvers_qpOases_FF .....................   Passed   53.11 sec
      Start 34: OpenSoT_task_force_CoM
34/34 Test #34: OpenSoT_task_force_CoM .........................   Passed    0.03 sec

100% tests passed, 0 tests failed out of 34

Total Test time (real) =  94.81 sec

Please let me know if you are using this configuration and if you tried to run the OpenSoT tests.

graiola commented 4 years ago

Yes, I have been using this configuration to run OpenSoT. Time to time, at runtime, the stack of OpenSoT crashes. I assume the problem is on my side. RBDL needs to be updated too but I remember that was simple...

liesrock commented 4 years ago

Now RBDL is on github, so life is much easier: I slightly modified the sources to compile v2.5.0.

Which version of rbdl are you using?

Are OpenSoT tests all passing?

graiola commented 4 years ago

Yes, the tests are ok.

liesrock commented 4 years ago

Ok, if you can share your ros control plugin I can try to help.

Moreover I always used OpenSoT in RelWithDebInfo or Release mode.

liesrock commented 4 years ago

@graiola thanks for sharing the wbc: I was able to setup it and run it (but without the X server, so no gazebo, no rviz, no rqt stuffs, no plot juggler).

The controller looks to run, but probably I need to stress it out sending some commands/references: what do you suggest?

I run it several times and I am not able to trigger any issues in the initialization or when the robot keep the position.

graiola commented 4 years ago

you have to activate the solver through rqt_reconfigure otherwise the openSot solver is not created.

liesrock commented 4 years ago

in the initalization I saw the couts of the stack so I was thinking it was running: I will try with rqt_reconfigure.

liesrock commented 4 years ago

Just to update you on this, I realized from @graiola that I need the GUI on the OS to run his code, so I need to make docker works with an XServer. I will give a feedback asap

graiola commented 4 years ago

@liesrock if you need, I should have a dockerfile for an ubuntu machine with xserver. Let me know!

liesrock commented 4 years ago

thanks @graiola , I was able to install lxde on my Ubuntu 18.04, but I have disk space issues currently (I am at home teleworking only with my laptop). I will try to fix it somehow.

liesrock commented 4 years ago

@graiola I have the Ubuntu 18.04 with lxde properly working!

I was able to run everything and to toogle the solver trough rqt_reconfigure: from the first trials I do not see the issue. How do you think should I trigger the problem?

Attached the screenshot of the docker container running the wbc with the GUI working through VNC.

graiola_1

graiola commented 4 years ago

that's good! On my machine, the problem is arising randomly the first time the solver is created. Could it be related to my rbdl patch (to make it run on ubuntu 18.04)?

liesrock commented 4 years ago

It can be, I report here my modification to rbdl v2.5.0 (I will fork the rbdl repo in the near future):

rbdl_18_04_patch

graiola commented 4 years ago

It looks like what I did. Since you are not experiencing any problem we can close this issue.

liesrock commented 4 years ago

Ok, I will try some more tests and update you here.

liesrock commented 4 years ago

I did some other tests and I am not facing the issue reported in the creation/initialization of the solver. I will close and share the 18.04 desktop docker image also with the rest of the team to perform other tests in the future.

graiola commented 4 years ago

@liesrock could you fork the rbdl repo and add a bionic_compatibility? Or update the rbdl copy in advr-superbuild. Thank you.

liesrock commented 4 years ago

Ok @graiola, I had an issue open, but I put it in background: I will update you there https://github.com/ADVRHumanoids/ModelInterfaceRBDL/issues/11