-
Notifications
You must be signed in to change notification settings - Fork 43
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
How to setup the enviroment for running torque control on iCub #10
Comments
Hello, I tried to run the wholeBodyControllers in simulation as https://github.com/robotology-playground/wholeBodyControllers/blob/master/doc/How-to-run-torqueBalancing-simulations-with-iCub.md, but it's not successful.
|
Hi @caicaixia, waiting @gabrielenava for a more thorough reply on the other problems, can you please post the output of You can find the file in the It turned out being a problem of Matlab's dynamic libraries linking. Here a more detailed explanation. |
Hi @caicaixia, thanks for the feedback! Ok so, regading this:
impedanceControl: the correct model is icub fixed (no hands), stored into icub-gazebo-wholebody. No particular home position is required. torqueBalancingYoga: the correct model is icub (no hands), stored into icub-gazebo. The corresponding home position is torqueBalancingStandup: the model is always torqueWalkingMPC: the model is NOTE: also the models Related instead to these errors:
they are documented in other issues, and someone is taking care of them, but they do not affect the simulations at all. The same goes for this warning (you will see it when the controller is running). Another possible error: Regarding the last issue, I remember I opened this issue long time ago: robotology-legacy/codyco-superbuild#141 In particular, follow the WBToolbox readme: I think that if you do what is suggested in the troubleshooting you don't need anymore the Try with this configuration, and tell us if there are still issues :-). |
Update:
The |
I tried all the demos, it's still not working.
However, after I run the Simulink
Notes: I run many times, every time the motion of the robots are different. The torque plots are also different. Remarks:
|
@caicaixia In the next weeks we will release a new version of the WB-Toolbox which will require only minor modifications from the user side. I improved the toolbox documentation (you can reach it temporarily in my personal fork) including a more stable fix to the As you can see, the library is addressed only by its major release ( Some links for cross referencing this issues with other ones: robotology-legacy/codyco-superbuild#141 (comment). It is still not clear to me the need of adding in the preload path also |
mmh, this is really strange. I tried to replicate the issue on my laptop. I have a personal laptop with Ubuntu 16.04 LTS and Matlab R2017b. I removed all the installed folders (I have everything installed locally) and I reinstalled everything from scratch. I chose the option to install I'm worried this issue is related to something missing/different in your PC, and this is way more difficult to debug. Maybe @traversaro can help us debugging this. |
I installed the Then I install the
Do I miss some flags?
|
Hello @gabrielenava , I solved the
But actually I added the all Now I can run demo torqueBalancingYoga , but the motion is very very slow, and the iCub only left one leg for one side, then stop there. I saw the videos on youtube yoga, the iCub lifts two side of legs one by one, and the motions are also fast. Is it support to be which one? How can I increase the speed? |
Don't worry @caicaixia, happy to hear that the controllers are now working! Regarding the yoga on both feet, there are a bunch of options in this file: in particular, if you set to Regarding the velocity of the simulation, the parameter to check is the time inside the Simulink controller, because the real time factor parameter inside Gazebo will be 0 if you correctly synchronize Gazebo with Simulink. Unfortunately, the speed strongly depends on the performances of your PC. On my personal laptop (that is not incredibly powerful) I can run the Yoga demo more or less with a Real Time Factor of 0.5. If the demo is reeeeeally slow, it is possible that you compiled some repos ( If instead your real time factor is good (> 0.5) and you just want to increase the speed of the Yoga movements, this is the parameter to decrease (it is the time the robot needs to move smoothly from one yoga position to the next): if you change this parameter (or others), it is possible that you need a bit of gain tuning to have the demo working. All parameters to tune are inside the file I already linked, https://github.com/robotology-playground/wholeBodyControllers/blob/master/controllers/torqueBalancingYoga/app/robots/icubGazeboSim/initStateMachineYoga.m |
Hello @gabrielenava Thanks for explanation. Yes, my Here is the errors:
I also test the Notes: I didn't change any parameters by myself. |
Regarding:
this is an output of the quadratic programming solver qpOASES which is used inside the controller. It tries to find the optimal set of feet contact forces (given the unilateral and friction cone constraints), so if the robot falls it will trow an error saying that it couldn't find a feasible solution. This is normal, and it is just a result of the fact the robot fell down in the simulator. Don't worry about that. The real time factor is fine. Unfortunately, the result of the simulation is affected by the way the physics engine in Gazebo solves the rigid body dynamics. If you change the physics engine in Gazebo the results may change. This is my setup in gazebo: However, even if your setup is the same there may be different results depending on your laptop performances. This is a known issue due to the presence of some filters on the velocity measurements (not at the controller level). See also robotology/wb-toolbox#26. The new WBT3.0 should fix the issue, meanwhile you can try the following:
|
Hello @gabrielenava, I checked my Gazebo physics engine, the setup is exactly the same as yours. But its still falling. I also tried to turn the PD parameters in Video: QA: |
This is correct :-) Looking at the videos, it seems to me that there is something strange, especially in the second one. Can you output the result of Other two parameters to change are Reg.PinvDamp and Reg.PinvDamp_nub. Try to increase |
closing. This documentation is deprecated: we now use the robotology-superbuild instead of the codyco-superbuild. |
Sorry I didnt replied your last question, since that time, I already gave up that simulation.
Not sure if it correct or not? |
Hi! @caicaixia .When I used ICub robot iCubGazeboV2_5. I want to do the walking simulation of a robot under gazebo, I used gazebo8 , installed iCub-models, run: yarp: Port /dosh-Lenovo-V310-15IKB/no_progname/16160/clock:i active at tcp://192.168.199.141:10201/ I thought I miss launch-wholebodydynamics.xml. I search it in my computer, can't found it.Can you help me about this question. Thank you! |
This issue is for collecting all the links to the documentation which is necessary to follow in order to run torque control simulations with iCub.
Basic requirements:
you need a PC with ubuntu (better if 16.04 LTS) or macOS. These are the operating systems we use in our lab, and they are tested and supported. Regarding Windows, the problem is that the Gazebo simulator is not supported for now.
Gazebo simulator. It is the software we use for running torque control simulations. Tutorial for installing Gazebo: http://gazebosim.org/tutorials?cat=install (run also the command for developers working on top of Gazebo:
sudo apt-get install libgazebo8-dev
(it is explained in the page).you need a MATLAB/Simulink version greater than R2014a.
Installing yarp, icub-main and codyco-superbuild
Case 1: install yarp and icub-main outside the codyco-superbuild
The documentation on how to install yarp and icub-main can be found online, inside the iCub wiki. In google, just look for something like "how to install yarp and icub on linux from sources" (or on Mac if you have a mac). A wiki page like this will be among the first results: http://wiki.icub.org/wiki/Linux:Installation_from_sources. I personally suggest to download the source code of yarp from github, instead of installing it from binaries. Both solutions are explained here: http://www.yarp.it/install_yarp_linux.html. Furthermore, I strongly suggest NOT to use
sudo make install
, but instead to choose the other alternative (create a local folder named "install", and adjust the path inside your.bashrc
file. Both solutions are explained in the wiki.Case 2: install yarp and icub-main inside the codyco-superbuild
You still need to go in the wiki page, but just follow the instructions on how to get all the dependencies (the first section of the page). Do not dowload yarp and icub-main: in this case, we're going to install them later.
Install the codyco-superbuild
What is the codyco-superbuild?
As stated in its README,
This is a meta repository (so-called "superbuild") that uses CMake and YCM to automatically download and compile CoDyCo software. CMake is an open-source, cross-platform family of tools designed to build, test and package software. A YCM Superbuild is a CMake project whose only goal is to download and build several other projects.
In short, it is a way to easily download and compile all the required software for a specific project, in particular the CoDyCo project.
What should I do to install it?
Follow the instructions in the README. Important! If you did not already installed yarp and icub-main, they will be automatically installed inside the codyco-superbuild! If instead you already installed them, and you correctly set the path inside your
.bashrc
as explained here, last section, they won't be installed inside the superbuild.Download the whole body torque control repository and its dependencies
This is the most complicated part. At the end of the codyco-superbuild README, it is explained how to install the matlab-dependent libraries needed for torque control, and it is also pointing to the WBIToolbox-controllers repository, which contains our "old" versions of Simulink balancing controllers.
We are currently releasing a new library for getting dynamic and kinematic quantities for torque control in Simulink and we're also releasing a new repository for storing the Simulink controllers, what is the one in which I'm writing this issue: wholeBodyControllers.
Given that the
old
repositories will be moved in legacy soon. I suggest to install the new ones, even if they are still under development.To do so, follow the instructions in this README. Regarding the controller dependencise if you follow the instructions above you should have already installed most of them. What remains can be installed by setting the options
CODYCO_USES_GAZEBO = ON
andCODYCO_USES_MATLAB = ON
before compiling codyco-superbuild.Remark 1
If after typing
ccmake ../
inside theCODYCO_SUPERBUILD/build
directory you cannot find one of the two options, presst
. More options will appear.Remark 2
Check the icub-gazebo and icub-gazebo-wholebody readmes to see how to add the required iCub model to the Gazebo path.
controllers documentation: https://github.com/robotology-playground/wholeBodyControllers/tree/master/doc
documentation on how to run a simulation: https://github.com/robotology-playground/wholeBodyControllers/blob/master/doc/How-to-run-torqueBalancing-simulations-with-iCub.md
each controller has its own readme. Check it.
if you have a Matlab version lower than R2016b, but greater than R2014a, you can still open the models inside the legacy folder. For now it is not easy to deal with different Simulink versions, but we're working on it.
Things are still not working: where should I open issues?
If something it is not working (most common issue: something is not compiling when running the
make
command, or there are missing paths) check the name of the repository that is causing issues (e.g., yarp) and open an issue in that repository. The responsible will answer you.If there are passages of this guide that are not clear, leave a comment in this issue.
The text was updated successfully, but these errors were encountered: