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

Add HDE profile to superbuild #231

Merged
merged 27 commits into from
Aug 19, 2019

Conversation

kouroshD
Copy link
Contributor

@kouroshD kouroshD commented Aug 1, 2019

With this PR, We add the HDE Profile to superbuild.
Relevant issue:
robotology/human-dynamics-estimation#120

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated
@@ -636,6 +654,27 @@ To check and install the Cyberith SDK, please follow the steps for Cyberith SDK
### Configuration
To configure the Cyberith SDK please follow the steps for Cyberith SDK mentioned in [here](https://github.com/robotology/walking-teleoperation/blob/master/docs/Dependencies.md).

## Xsens
Support for this dependency is enabled by the `ROBOTOLOGY_ENABLE_HUMAN_DYNAMICS` CMake option.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would invert the causality, I would document that the option ROBOTOLOGY_USES_XSENS_MVN_SDK option is only enabled when the ROBOTOLOGY_ENABLE_HUMAN_DYNAMICS CMake option is set to ON.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I wrote and what you said to me is equal! If you prefer, I can rephrase it as you mentioned.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, indeed I see what you mean. As long as we have the ROBOTOLOGY_USES_XSENS_MVN_SDK I am ok with what you wrote.

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
cmake/Buildforcetorque-yarp-devices.cmake Outdated Show resolved Hide resolved
cmake/Buildforcetorque-yarp-devices.cmake Outdated Show resolved Hide resolved
cmake/Buildwearables.cmake Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
kouroshD and others added 4 commits August 3, 2019 10:35
Co-Authored-By: Silvio Traversaro <pegua1@gmail.com>
Co-Authored-By: Silvio Traversaro <pegua1@gmail.com>
Co-Authored-By: Silvio Traversaro <pegua1@gmail.com>
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
cmake/Buildhuman-gazebo.cmake Outdated Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
kouroshD and others added 2 commits August 6, 2019 11:08
cmake/Buildhuman-dynamics-estimation.cmake Outdated Show resolved Hide resolved
cmake/Buildhuman-dynamics-estimation.cmake Outdated Show resolved Hide resolved
kouroshD and others added 3 commits August 6, 2019 12:29
Co-Authored-By: Silvio Traversaro <pegua1@gmail.com>
Co-Authored-By: Silvio Traversaro <pegua1@gmail.com>
Copy link
Member

@traversaro traversaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beside minor comments the logic is now ok, thanks. I guess we need to wait for the (at least partial merge) of robotology/wearables#25 . @Yeshasvitvs @lrapetti any update?

CMakeLists.txt Outdated Show resolved Hide resolved
Co-Authored-By: Silvio Traversaro <pegua1@gmail.com>
@kouroshD
Copy link
Contributor Author

kouroshD commented Aug 7, 2019

Beside minor comments the logic is now ok, thanks. I guess we need to wait for the (at least partial merge) of robotology/wearables#25 . @Yeshasvitvs @lrapetti any update?

I will update the README.md, and also test it again on windows machine, and a mac or Ubuntu machine, to check everything is fine.

@kouroshD
Copy link
Contributor Author

kouroshD commented Aug 8, 2019

when I enable the human-dynamics profile, and I enable the options ROBOTOLOGY_USES_XSENS_MVN_SDK and ROBOTOLOGY_USES_ESDCAN It throws error since it cannot find them. So, maybe we enable these options only if we are in Windows? What do you say @traversaro ?

Ok for disabling on macOS/Linux the options that do not work/will never work on that OS (but we should also document them in the README). To be honest, in the past I never explicitly removed those options, because I simply assume users would not select them.

OK, then we only will mention it in documentations.

If I build the superbuild with -j option, because this line https://github.com/robotology/human-dynamics-estimation/blob/0a7b4be41ba379ed0ff391d62db93b4018512133/CMakeLists.txt#L29 in HDE is commented it throws error some times, I suggest to uncomment it @lrapetti @traversaro @Yeshasvitvs ?

I am a bit confused on how that lines is related to multithreading.

It throws here in this line, https://github.com/robotology/human-dynamics-estimation/blob/0a7b4be41ba379ed0ff391d62db93b4018512133/devices/HumanStateProvider/IKWorkerPool.h#L28, complaining about Eigen/QR library. If I do it only with make without -j option, it will build without any problem, or if do make -j two times it will build in the second attempt! I enabled the line I mentioned and it is working fine, so we are sure it finds the library since there is dependency to it.

HumanIKWorkerPool.h:28:10: fatal error: 'Eigen/QR' file not
      found
#include <Eigen/QR>

if I enable the socketCan option in macOS I have the following error:

Which option of the superbuild (or the subproject) did you enabled precisly?

Since, you and @fjandrad said, ft sensors in linux handled by socketCan, I enabled that option in ICUB repo. but then it was complaining that cannot find it. I am using macOS!

@traversaro
Copy link
Member

Since, you and @fjandrad said, ft sensors in linux handled by socketCan, I enabled that option in ICUB repo.

So you enabled the ENABLE_socketcan option? That option uses the SocketCAN API ( https://www.kernel.org/doc/Documentation/networking/can.txt ) that is the API of the Linux kernel, so it is not supported at all by macOs . As far as I know, there is no YARP device for accessing CAN devices on macOs (I do not even know if there is CAN support at all in macOs, to be honest).

@traversaro
Copy link
Member

I enabled the line I mentioned and it is working fine, so we are sure it finds the library since there is dependency to it.

Indeed, I am not sure how that is related to make -j, but indeed the find_package(Eigen3 REQUIRED) is missing. Probably it is working on the second run because EIGEN3_INCLUDE_DIR is cached, and find_package(Eigen3) is called in some directory added after the HumanStateProvider one.

@kouroshD
Copy link
Contributor Author

kouroshD commented Aug 9, 2019

Since, you and @fjandrad said, ft sensors in linux handled by socketCan, I enabled that option in ICUB repo.

So you enabled the ENABLE_socketcan option? That option uses the SocketCAN API ( https://www.kernel.org/doc/Documentation/networking/can.txt ) that is the API of the Linux kernel, so it is not supported at all by macOs . As far as I know, there is no YARP device for accessing CAN devices on macOs (I do not even know if there is CAN support at all in macOs, to be honest).

Indeed, you are right, in the error was mentioning #include <linux/can.h> is missing.

@kouroshD
Copy link
Contributor Author

kouroshD commented Aug 9, 2019

I enabled the line I mentioned and it is working fine, so we are sure it finds the library since there is dependency to it.

Indeed, I am not sure how that is related to make -j, but indeed the find_package(Eigen3 REQUIRED) is missing. Probably it is working on the second run because EIGEN3_INCLUDE_DIR is cached, and find_package(Eigen3) is called in some directory added after the HumanStateProvider one.

yes, I think that is the case you are mentioning.

@kouroshD
Copy link
Contributor Author

kouroshD commented Aug 9, 2019

Since, you and @fjandrad said, ft sensors in linux handled by socketCan, I enabled that option in ICUB repo.

So you enabled the ENABLE_socketcan option? That option uses the SocketCAN API ( https://www.kernel.org/doc/Documentation/networking/can.txt ) that is the API of the Linux kernel, so it is not supported at all by macOs . As far as I know, there is no YARP device for accessing CAN devices on macOs (I do not even know if there is CAN support at all in macOs, to be honest).

Thanks for the documentation link, it was interesting.

@kouroshD
Copy link
Contributor Author

kouroshD commented Aug 9, 2019

@traversaro I updated the README.

@kouroshD
Copy link
Contributor Author

kouroshD commented Aug 9, 2019

I enabled the line I mentioned and it is working fine, so we are sure it finds the library since there is dependency to it.

Indeed, I am not sure how that is related to make -j, but indeed the find_package(Eigen3 REQUIRED) is missing. Probably it is working on the second run because EIGEN3_INCLUDE_DIR is cached, and find_package(Eigen3) is called in some directory added after the HumanStateProvider one.

maybe this option can be added after this line instead: https://github.com/robotology/human-dynamics-estimation/blob/0a7b4be41ba379ed0ff391d62db93b4018512133/devices/HumanStateProvider/CMakeLists.txt#L6

@kouroshD
Copy link
Contributor Author

kouroshD commented Aug 9, 2019

I enabled the line I mentioned and it is working fine, so we are sure it finds the library since there is dependency to it.

Indeed, I am not sure how that is related to make -j, but indeed the find_package(Eigen3 REQUIRED) is missing. Probably it is working on the second run because EIGEN3_INCLUDE_DIR is cached, and find_package(Eigen3) is called in some directory added after the HumanStateProvider one.

maybe this option can be added after this line instead: https://github.com/robotology/human-dynamics-estimation/blob/0a7b4be41ba379ed0ff391d62db93b4018512133/devices/HumanStateProvider/CMakeLists.txt#L6

since it is a very small change, can we add it without PR to HDE repo? @traversaro @lrapetti @Yeshasvitvs

@lrapetti
Copy link
Member

maybe this option can be added after this line instead: https://github.com/robotology/human-dynamics-estimation/blob/0a7b4be41ba379ed0ff391d62db93b4018512133/devices/HumanStateProvider/CMakeLists.txt#L6

since it is a very small change, can we add it without PR to HDE repo? @traversaro @lrapetti @Yeshasvitvs

@kouroshD, I think you can open a PR and ping me so that I can approve it as soon as the PR is there. In this way, we can track the changes properly.

@traversaro
Copy link
Member

traversaro commented Aug 13, 2019

since it is a very small change, can we add it without PR to HDE repo? @traversaro @lrapetti @Yeshasvitvs

That is up to the HDE mantainers. : )
What I tipically do for such small changes is to do directly from the GitHub web interface, in that way creating a PR is tipically a matter of few seconds.

CMakeLists.txt Outdated
@@ -150,6 +157,17 @@ if(ROBOTOLOGY_ENABLE_TELEOPERATION)
find_or_build_package(walking-teleoperation)
endif()

# Human Dynamics Estimation
if(ROBOTOLOGY_ENABLE_HUMAN_DYNAMICS)
set(ROBOTOLOGY_ENABLE_ICUB_HEAD TRUE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if we already discussed during the review, but the idea behind profiles is that they are completly independent, and if a user need to set ROBOTOLOGY_ENABLE_ICUB_HEAD to TRUE on a given machine (for example because he need to connect to iCub CAN devices) he/she can do it manualy. If instead any project in ROBOTOLOGY_ENABLE_HUMAN_DYNAMICS depends for compilation on a given project/option, this should be added as all the other dependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is not the compile-time dependency. What if we set ROBOTOLOGY_ENABLE_ICUB_HEAD to TRUE and find_or_build_package(forcetorque-yarp-devices), if ROBOTOLOGY_USES_ESDCAN is TRUE? Since with this option the user is indicating, he/she wants to use FT sensors.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README.md Outdated
@@ -62,6 +65,7 @@ Note that any dependencies of the included packages that is not available in the
| `ROBOTOLOGY_ENABLE_DYNAMICS` | The robotology software packages related to balancing, walking and force control. | [`iDynTree`](https://github.com/robotology/idyntree), [`blockfactory`](https://github.com/robotology/blockfactory), [`wb-Toolbox`](https://github.com/robotology/wb-Toolbox), [`whole-body-controllers`](https://github.com/robotology/whole-body-controllers), [`walking-controllers`](https://github.com/robotology/walking-controllers). [`icub-gazebo-wholebody`](https://github.com/robotology-playground/icub-gazebo-wholebody) if the `ROBOTOLOGY_USES_GAZEBO` option is enabled. | `OFF` | [Documentation on Dynamics profile.](#dynamics) |
| `ROBOTOLOGY_ENABLE_ICUB_HEAD` | The robotology software packages needed on the system that is running on the head of the iCub robot, or in general to communicate directly with iCub low-level devices. | [`icub-firmware`](https://github.com/robotology/icub-firmware), [`icub-firmware-shared`](https://github.com/robotology/icub-firmware-shared). Furthermore, several additional devices are compiled in `YARP` and `ICUB` if this option is enabled. | `OFF` | [Documentation on iCub Head profile.](#icub-head) |
| `ROBOTOLOGY_ENABLE_TELEOPERATION` | The robotology software packages related to teleoperation. | [`walking-teleoperation`](https://github.com/robotology/walking-teleoperation). To use Oculus or Cyberith Omnidirectional Treadmill enable `ROBOTOLOGY_USES_OCULUS_SDK` and `ROBOTOLOGY_USES_CYBERITH_SDK` options. | `OFF` | [Documentation on teleoperation profile.](#teleoperation) |
| `ROBOTOLOGY_ENABLE_HUMAN_DYNAMICS` | The robotology software packages related to human dynamics estimation. | [`human-dynamics-estimation`](https://github.com/robotology/human-dynamics-estimation), [`wearables`](https://github.com/robotology/wearables). `ROBOTOLOGY_ENABLE_ICUB_HEAD`, `ROBOTOLOGY_USES_XSENS_MVN_SDK`, and `ROBOTOLOGY_USES_ESDCAN`, [`forcetorque-yarp-devices`](https://github.com/robotology/forcetorque-yarp-devices) if using a Windows OS. | `OFF` | [Documentation on human dynamics profile.](#human-dynamics) |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove references of the optional dependencies from this table, as this column just lists the main repositories included in this component, and I am afraid that mentioning options here would be confusing for users:

Suggested change
| `ROBOTOLOGY_ENABLE_HUMAN_DYNAMICS` | The robotology software packages related to human dynamics estimation. | [`human-dynamics-estimation`](https://github.com/robotology/human-dynamics-estimation), [`wearables`](https://github.com/robotology/wearables). `ROBOTOLOGY_ENABLE_ICUB_HEAD`, `ROBOTOLOGY_USES_XSENS_MVN_SDK`, and `ROBOTOLOGY_USES_ESDCAN`, [`forcetorque-yarp-devices`](https://github.com/robotology/forcetorque-yarp-devices) if using a Windows OS. | `OFF` | [Documentation on human dynamics profile.](#human-dynamics) |
| `ROBOTOLOGY_ENABLE_HUMAN_DYNAMICS` | The robotology software packages related to human dynamics estimation. | [`human-dynamics-estimation`](https://github.com/robotology/human-dynamics-estimation), [`wearables`](https://github.com/robotology/wearables). [`forcetorque-yarp-devices`](https://github.com/robotology/forcetorque-yarp-devices) if using a Windows OS. | `OFF` | [Documentation on human dynamics profile.](#human-dynamics) |

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accept that ROBOTOLOGY_ENABLE_ICUB_HEAD should be removed. But similar to other profiles, the options enabled to the user by ROBOTOLOGY_ENABLE_HUMAN_DYNAMICS should be stated here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@traversaro
Copy link
Member

traversaro commented Aug 13, 2019

Unfortunately, this PR is still blocked by (at least a partial merge) of robotology/wearables#25 . @Yeshasvitvs @lrapetti Do you have any update?

@lrapetti
Copy link
Member

lrapetti commented Aug 13, 2019

Unfortunately, this PR is still blocked by (at least a partial merge) of robotology/wearables#25 . @Yeshasvitvs @lrapetti Do you have any update?

I am checking if everyone agrees I would proceed with merging.

@lrapetti
Copy link
Member

Unfortunately, this PR is still blocked by (at least a partial merge) of robotology/wearables#25 . @Yeshasvitvs @lrapetti Do you have any update?

I am checking if everyone agrees I would proceed with merging.

The PR has been merged

@kouroshD
Copy link
Contributor Author

maybe this option can be added after this line instead: https://github.com/robotology/human-dynamics-estimation/blob/0a7b4be41ba379ed0ff391d62db93b4018512133/devices/HumanStateProvider/CMakeLists.txt#L6

since it is a very small change, can we add it without PR to HDE repo? @traversaro @lrapetti @Yeshasvitvs

@kouroshD, I think you can open a PR and ping me so that I can approve it as soon as the PR is there. In this way, we can track the changes properly.

PR is made here:
robotology/human-dynamics-estimation#139

@lrapetti
Copy link
Member

maybe this option can be added after this line instead: https://github.com/robotology/human-dynamics-estimation/blob/0a7b4be41ba379ed0ff391d62db93b4018512133/devices/HumanStateProvider/CMakeLists.txt#L6

since it is a very small change, can we add it without PR to HDE repo? @traversaro @lrapetti @Yeshasvitvs

@kouroshD, I think you can open a PR and ping me so that I can approve it as soon as the PR is there. In this way, we can track the changes properly.

PR is made here:
robotology/human-dynamics-estimation#139

Merged.

@traversaro
Copy link
Member

I will proceed with "Squash and merge" if for you it is ok.

@kouroshD
Copy link
Contributor Author

I will proceed with "Squash and merge" if for you it is ok.

Thanks, please proceed with that.

@traversaro traversaro merged commit 26ec360 into robotology:master Aug 19, 2019
kouroshD added a commit to ami-iit/robotology-superbuild-this-is-not-the-repo-you-should-download-you-should-use-the-robotology-one that referenced this pull request Aug 27, 2019
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

Successfully merging this pull request may close these issues.

4 participants