Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

towr does not optimize on Ubuntu 14.04 when installed manually with catkin #40

Closed
underactuated opened this issue Sep 20, 2018 · 9 comments

Comments

@underactuated
Copy link

Your project looks really nice and promising, so I decided to try it. I successfully installed towr, but when I run it (roslaunch towr_ros towr_ros.launch) not much is happening. Specifically, xterm and rviz open and I press 'o' in the xterm. Xterm says 'optimizing motion', but then nothing happens. If I check 'monoped' in rviz, I see 'status:error'. The errors are of the type 'No transform from [monoped/hipassembly] to [world]'. The only OK transform is for monoped/base.

I really would like to use this project, but I do not know how to proceed. Any help is very much appreciated. Thank you!

PS: I am new to github. If this question is more appropriate for ros answers, please let me know.

@awinkler
Copy link
Member

Hi!
It seems like the actual optimizer is not running, just the UI. Check the terminal in which you run the launch command for error messages (this is where the optimizer should run).

Also try launching in debug mode:
roslaunch towr_ros towr_ros.launch debug:=true

Finally, did you install manually or using the ROS binaries (sudo apt-get install ros-kinetic-towr_ros)?

@underactuated
Copy link
Author

I initially tried to install under Ubuntu 14.04, following the catkin instructions. I had to manually install Ipops (version 3.12.8) which uses mumps. When I run in the debug mode, it outputs:

process[urdf_visualizer_hyq4-9]: started with pid [5540]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
GNU gdb (Ubuntu 7.7.1-0ubuntu514.04.3) 7.7.1
Copyright (C) 2014 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 /home/sergey/catkin_ws/devel_isolated/towr_ros/lib/towr_ros/goal_pose_publisher...(no debugging symbols found)...done.
Starting program: /home/sergey/catkin_ws/devel_isolated/towr_ros/lib/towr_ros/goal_pose_publisher __name:=goal_pose_publisher __log:=/home/sergey/.ros/log/a1216ee0-c06b-11e8-8cda-5891cfca85c3/goal_pose_publisher-3.log
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
GNU gdb (Ubuntu 7.7.1-0ubuntu514.04.3) 7.7.1
Copyright (C) 2014 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 /home/sergey/catkin_ws/devel_isolated/towr_ros/lib/towr_ros/towr_ros_app...(no debugging symbols found)...done.
Starting program: /home/sergey/catkin_ws/devel_isolated/towr_ros/lib/towr_ros/towr_ros_app __name:=towr_ros_app __log:=/home/sergey/.ros/log/a1216ee0-c06b-11e8-8cda-5891cfca85c3/towr_ros_app-4.log
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[New Thread 0x7ffff1873700 (LWP 5581)]
[New Thread 0x7ffff1072700 (LWP 5582)]
[New Thread 0x7ffff0871700 (LWP 5583)]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[New Thread 0x7ffff1873700 (LWP 5585)]
[New Thread 0x7ffff1072700 (LWP 5586)]
[New Thread 0x7ffff0871700 (LWP 5588)]
[New Thread 0x7fffebfff700 (LWP 5589)]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]

TOWR - Trajectory Optimization for Walking Robots (v1.4)
© Alexander W. Winkler
https://github.com/ethz-adrl/towr

[New Thread 0x7fffeef35700 (LWP 5590)]
[New Thread 0x7fffee734700 (LWP 5591)]
[New Thread 0x7fffedf33700 (LWP 5592)]
[New Thread 0x7fffed732700 (LWP 5593)]
[New Thread 0x7fffebfff700 (LWP 5594)]

After I press 'o' it adds:


This program contains Ipopt, a library for large-scale nonlinear optimization.
Ipopt is released as open source code under the Eclipse Public License (EPL).
For more information visit http://projects.coin-or.org/Ipopt


This is Ipopt version 3.12.8, running with linear solver mumps.
NOTE: Other linear solvers might be more efficient (see Ipopt documentation).

and then gets stuck. Do you have any suggestions?

After I wrote my first comment, I did successfully install towr on a different machine, with Ubuntu 18.04, from ROS binaries. It worked flawlessly. And I had fun playing with it. Nice project! I would still like to have it installed under ubuntu 14.04, if possible.

@awinkler
Copy link
Member

Yes, i had the same issue. The reason is that there is a bug in IPOPT in the 14.04-distributed package Ipopt-3.10.2. That's why I also couldn't supply a ROS binary to directly install towr in 14.04.

So you need to manually install an IPOPT version >= 3.11.9. See here for instructions.

Cheers!

@underactuated
Copy link
Author

So you need to manually install an IPOPT version >= 3.11.9. See here for instructions.

But I already installed version 3.12.8, see the debug report. Should I try a more recent version?

Thank you for help.

@awinkler
Copy link
Member

No, your version should be fine. In this case I would start the debugging by running the example ex_test_ipopt.cc, because this issue seems to be independent from towr, but more ifopt. Check this ifopt-readme, try e.g.

$ rosrun ifopt ifopt_ipopt-example

@underactuated
Copy link
Author

Hi Alex,

Somehow ROS does not see ifopt. I suspect it might be something simple, but a lot of this is new to me, so I cannot figure it out. I do have ifopt installed, I could navigate to build_isolated/ifopt/devel/ and successfully run the test, but I cannot rosrun it, it says: [rospack] Error: package 'ifopt' not found

Same with towr. ROS sees towr_ros, but not towr

I noticed that when I run catkin_make_isolated, it says for both packages (towr and ifopt) Makefile exists, skipping explicit cmake invocation... Is it somehow related?

Thank you

@Neotriple
Copy link

Neotriple commented Oct 12, 2018

Bumping this as I'm also running into the same issue under very similar conditions;

Ubuntu 14.04
IPOPT v. 3.12.8

Both the IFOPT test passes as well as the ifopt_ipopt binary test (However, there is not Output to the tests)

In addition, all of the programs were compiled from source and not installed using any ROS interface (i.e. all programs were made with cmake).

Edit

Did some more digging, it seems the 'error' lies in the following file when you attempt to solve the NLP:

https://github.com/ethz-adrl/ifopt/blob/master/ifopt_ipopt/src/ipopt_solver.cc

(line 75).

I tested and made the hs_071 test file provided by IPOPT to see if there was something weird with the solve function (since you are essentially calling the OptimizeTNLP line from your code which actually belongs to IPOPT), and this passes as expected. I also tested the ifopt-ipopt test example which also successfully passes, so it seems there must be an issue causing the ipopt solver to not proceed, maybe something wrong with the constraints that is causing it to not even attempt to solve the problem (It is not outputting anything).

Is there a way to verify the ipopt installation source that ifopt was compiled with? I initially downloaded used the command:

sudo apt-get install coinor-libipopt-dev

However, after reading through this thread, I removed the package, so I believe this should remove the library files in /usr/local/... as well, but I'm not so sure of that. I did also add the lines as you suggested in the ~/.bashrc file to export the local installation of IPOPT, so I think this shouldn't be the issue...

@awinkler awinkler changed the title towr does not optimize towr does not optimize on Ubuntu 14.04 when installed manually with catkin Oct 15, 2018
@awinkler
Copy link
Member

@underactuated
Hmmm, so you are installing it with catkin manually right? Another possibility I could think of is that your catkin workspace is not setup correctly. Maybe try and clean / delete the entire workspace, build ifopt again and then source it using
$ source ./devel/setup.bash
Make sure that file exists. Then afterwards do the same with towr, in the same workspace, and source again.

@Neotriple You're building with pure cmake, right? So I think you have a different issue unrelated to ROS, so I opened #45

@awinkler
Copy link
Member

Closing this here, as #40 (comment) fixes the original issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants