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

[Parser] Provide API to avoid creating twice the same FCL geometry. #645

Merged
merged 6 commits into from
Feb 12, 2019

Conversation

jmirabel
Copy link
Contributor

Copy link
Contributor

@jcarpent jcarpent left a comment

Choose a reason for hiding this comment

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

@jmirabel to ensue compatibility with older versions of hpp-fcl it would be nice to add some ifdef statement according to the versions of hpp-fcl.

@jmirabel
Copy link
Contributor Author

jmirabel commented Jan 19, 2019

@jmirabel to ensue compatibility with older versions of hpp-fcl it would be nice to add some ifdef statement according to the versions of hpp-fcl.

I can do it but:

  • I don't see any scenario where Pinocchio would be updated and not hpp-fcl,
  • it makes the code less readable.

bindings/python/parsers/parsers.hpp Show resolved Hide resolved
@@ -18,7 +18,7 @@ def BuildFromURDF(filename, package_dirs=None, root_joint=None, verbose=False):
robot.initFromURDF(filename, package_dirs, root_joint, verbose)
return robot

def initFromURDF(self,filename, package_dirs=None, root_joint=None, verbose=False):
def initFromURDF(self,filename, package_dirs=None, root_joint=None, verbose=False, meshLoader=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

You must handle the case where Pinocchio is no built with hpp-fclsupport.

Copy link
Contributor Author

@jmirabel jmirabel Jan 31, 2019

Choose a reason for hiding this comment

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

What do you expect me to do here ? Raise an exception if meshLoader is provided and not built with hpp-fcl ?
If so, how do you get the information about hpp-fcl support in Python ?

Copy link
Contributor

@jcarpent jcarpent Jan 31, 2019

Choose a reason for hiding this comment

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

One way is to check if hpp-fcl is provided, I was planning to do that by adding a global variable called maybe __PINOCCHIO_WITH_HPP_FCL__.
In the RobotWrapper, we have a similar strategy but checking

if "buildGeomFromUrdf" not in dir(pin):
if a function is included inside the namespace pinocchio.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I understand, "buildGeomFromUrdf" is always part of pinocchio in Python, regardless the use of hpp-fcl. (even before this PR). So I guess this test is always false.

bindings/python/parsers/parsers.hpp Show resolved Hide resolved
src/parsers/urdf.hpp Outdated Show resolved Hide resolved
@jcarpent
Copy link
Contributor

We need to first make a new release of hpp-fcl, then modifiy the minimal version requested in the CMakeLists.txtbefore merging this PR.

@nim65s
Copy link
Contributor

nim65s commented Jan 31, 2019

the next release of hpp-fcl will be here by the end of the day

@jmirabel
Copy link
Contributor Author

We need to first make a new release of hpp-fcl, then modifiy the minimal version requested in the CMakeLists.txtbefore merging this PR.

Yes, that's a requirement.

@jmirabel
Copy link
Contributor Author

I pushed too quickly. Please, wait before reviewing.

@jmirabel
Copy link
Contributor Author

It should be fine now.

@jcarpent
Copy link
Contributor

jcarpent commented Feb 8, 2019

@nim65s What is the current status of the hpp-fcl release?

@jmirabel
Copy link
Contributor Author

jmirabel commented Feb 8, 2019

The release will wait for humanoid-path-planner/hpp-fcl#56.

@jmirabel
Copy link
Contributor Author

There is a snake biting its own tail here:

  • on travis, Pinocchio uses hpp-fcl release of robotpkg so a new release of hpp-fcl is required to make it work,
  • to release hpp-fcl, we need to update all packages downstream, including Pinocchio.

I see three workarounds:

  1. pushing to a branch like hpp-devel in Pinocchio, validate the whole HPP framework, release hpp-fcl, merge this and release the rest of HPP.
  2. make Pinocchio devel branch use hpp-fcl devel branch.
  3. merge this and all HPP waiting PRs and releasing them.

We need to decide on one of the above solutions to move on.

@jmirabel
Copy link
Contributor Author

My favorite solution is 3 for its convenience. I suppose people using the devel branch of Pinocchio can also use hpp-fcl from source.

@jcarpent
Copy link
Contributor

I think we should release first hpp-fcl and then update all the other packages. This action is not risky here.
Another solution is to introduce hpp-fcl-devel into robotpkg inside the wip branch. Easy to do and much more flexible than the three other solutions!

@jmirabel
Copy link
Contributor Author

Another solution is to introduce hpp-fcl-devel into robotpkg inside the wip branch. Easy to do and much more flexible than the three other solutions!

Can you do it ?

@jcarpent
Copy link
Contributor

I think for this tack @nim65s will be faster and much more efficient than me.

@jmirabel
Copy link
Contributor Author

jmirabel commented Feb 11, 2019 via email

@nim65s
Copy link
Contributor

nim65s commented Feb 11, 2019

No, sorry, but I will not duplicate a package in robotpkg just have it available in multiple versions, and even more maintain multiple times the same package.

Yes, it would be really fast and easy to do so, but I am pretty sure that it will bring me nightmares in the future, and that at the end we will all loose time by trying to use shortcuts.

@nim65s
Copy link
Contributor

nim65s commented Feb 11, 2019

I see 2 solutions:

  1. we update all robotpkg releases at once (@jmirabel 's solution n.3)
  2. we release hpp-fcl, and I add temporary patches to all packages dependending on hpp-fcl to be sure their old versions still work with the new hpp-fcl, and then we can proceed to release every other packages and remove those patches. eg.: nim65s/robotpkg@554d0f3

I find the solution 2. a bit more elegant and less error-prone and stressful, but it require extra work. This work might be worth it or not, I can't tell yet.

@jcarpent
Copy link
Contributor

I totally understand your reasons to not duplicate the package. But, we are very limited by the fact that all the packages are inter-dependent, and any break in the compilation procedure will affect all the users and all the robots together. I continue to think that we should adopt a fast release solution like the one that I've just suggested.

I would also prefer also the second version, which seems to be more elegant indeed.

@nim65s
Copy link
Contributor

nim65s commented Feb 11, 2019

I totally agree with the "Release early, release often" strategy :)

@nim65s
Copy link
Contributor

nim65s commented Feb 12, 2019

Looking at this once again, releasing everything at once will break CI/CD everywhere. Is everybody OK with this ?
If so, what are we waiting for ?
Or are you still wanting me to provide a parallel CI/CD using devel branches of some dependencies ?

@jcarpent
Copy link
Contributor

You can start with the head of the dependency at least.

@stonneau
Copy link

I guess we are waiting for us, since rbprm has yet to be updated to pinocchiov2 before integrating these changes (ongoing but not so smooth)

@jmirabel
Copy link
Contributor Author

I let you choose the method you prefer.

@olivier-stasse
Copy link
Member

I am not ok to break everything everywhere I have at least three remote collaborations which are based on the consistency of robotpkg.

We have tools to check the consistency of candidate releases inside robotpkg.

robotpkg cannot handle all the combinaison of possible releases.
For CI on devel, a solution could be to use a custom docker.
It could be created by using robotpkg, make checkout and a list of branches validated by the responsible of the repository.

@nim65s
Copy link
Contributor

nim65s commented Feb 12, 2019

Ok, therefore, I propose to start by merging PR in hpp-fcl and make a release of this package, but not to push it on robotpkg.
This way, no project from the team will suffer from it, and @jcarpent will be able to manually check that we can do the same with pinocchio, using the .tar.gz of hpp-fcl, as the CI won't work.
Once this will be done, @jmirabel will be able to finish the release of HPP while I finish the release the SoT in the same way (@jmirabel will probably prefer to use the tag instead of the tar.gz, but it doesn't change anythnig)
This lets time to @stonneau to finish with RBPRM (maybe it would have been better not to merge humanoid-path-planner/hpp-doc#37 )

Then, when every release is done, I will put everything at once on robotpkg, and CI will work again.
I let you choose individually if you want to put the release tag on the master branch or not before the CI works again.

@nim65s
Copy link
Contributor

nim65s commented Feb 12, 2019

Also, @wxmerkt will be happy to have a new github release of hpp-fcl soon :)

@nim65s
Copy link
Contributor

nim65s commented Feb 12, 2019

Oh, I forgot to sync also with @andreadelprete about TSID…

@jmirabel
Copy link
Contributor Author

I propose to start by merging PR in hpp-fcl

I agree.

and make a release of this package

this could surely wait for validation, but if you want to do it, go ahead.

but not to push it on robotpkg.

I agree.

@jcarpent
Copy link
Contributor

@nim65s @olivier-stasse All the difficulties to have some stable releases during the validation of the next releases let me think that we really need to put in the WIP of robotpkg the clone of all the existing packages with the prefix -dev or -wip in order to allow smooth maintenance and the release process.

@nim65s
Copy link
Contributor

nim65s commented Feb 12, 2019

hpp-fcl v1.0.0 is out on github.
@jcarpent : can you merge this, update https://github.com/stack-of-tasks/pinocchio/blob/master/CMakeLists.txt#L76 and create a new github release ?

@nim65s
Copy link
Contributor

nim65s commented Feb 12, 2019

The idea of having simultaneously multiple versions for the same package in the same repo, and that any user or any automated test could be using one or the other at any time terrifies me, this is why I do not want to do this myself, nor I want to maintain it, nor I want to help anybody who use it.
Sorry, but this is really too much work for me.

@jcarpent
Copy link
Contributor

@nim65s We cannot simply do what you suggest.
The current version of Pinocchio is not compatible with hpp-fcl because of the namespace change.

@nim65s
Copy link
Contributor

nim65s commented Feb 12, 2019

That's right. I will have a look at it.

@jcarpent jcarpent changed the base branch from devel to topic/fcl-release February 12, 2019 13:45
@jcarpent
Copy link
Contributor

@jmirabel @nim65s I have created another branch on the main repo to allow to use it as a sandbox, i.e. we don't care if travis is happy or not.

@jcarpent jcarpent merged commit 2019cdc into stack-of-tasks:topic/fcl-release Feb 12, 2019
@jmirabel
Copy link
Contributor Author

Thank for the merge.

@olivier-stasse
Copy link
Member

olivier-stasse commented Feb 13, 2019

Dear Justin,
Maybe the problem comes from the fact that all CI is done against robotpkg binaries.

Looking at the devel branch the CMakeLists.txt specifies that the current code is consistent with hpp-fck 0.5.1 where robotpkg provides 0.7.0.

If you provides a set of branches of your gepetto dependencies on which we can build the devel branch it is possible to build a docker file from the source of robotpkg (and not the binaries).

A more coherent way will be to release indenpendtly from robotpkg-binaries each package.

Wrt to wip, it already exists in robotpkg. The recurrent problem is that you cannot release package in robotpkg for binaries if they are not consistent together.

But we use robotpkg from source to make deployment test with specific release candidate.
This could be use to build the appropriate dockerfile.

We could try provide the script to build the docker file, but that would be possible only if the CMakeLists.txt is consistent.

@jcarpent
Copy link
Contributor

A more coherent way will be to release indenpendtly from robotpkg-binaries each package.

I totally agree. Robotpkg is now becoming the limit of our approach and the docker approach seems to be a nice solution.

@nim65s
Copy link
Contributor

nim65s commented Feb 13, 2019

Agreed too.

@olivier-stasse
Copy link
Member

Just one precision, right now, if we provide the script to build the dockerfile for a specific branch, it will be the duty of the developer to:

  • use the provided script to build the dockerfile and
  • put it for the specific branch.

@jcarpent
Copy link
Contributor

@olivier-stasse Yes, I totally agree on these two points.

This was referenced Feb 13, 2019
@jmirabel
Copy link
Contributor Author

For the update, I will merge devel into fcl-release, add a few minor changes and validate HPP (including hpp-fcl next release) in the next few days. I will then open a PR of fcl-release into devel.
Any objections ?

@jcarpent
Copy link
Contributor

It sounds great to me. You can proceed as you've suggested.

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.

5 participants