Skip to content

Use urdf::*SharedPtr instead of boost::shared_ptr - #209

Merged
davetcoleman merged 4 commits into
moveit:kinetic-develfrom
jspricke:urdfdom_headers_fix
Sep 15, 2016
Merged

davetcoleman merged 4 commits into
moveit:kinetic-develfrom
jspricke:urdfdom_headers_fix

Conversation

@jspricke

@jspricke jspricke commented Sep 9, 2016

Copy link
Copy Markdown
Contributor

urdfdom_headers uses C++ std::shared_ptr. As it exports it as custom
*SharedPtr type, we can use the to stay compatible.

Not that there is no std:shared_ptr typedef,
so I replaced it with urdf::ModelInterfaceSharedPtr (loosing a const).

Also, there is no conversion from boost::shared_ptrurdf::Model to
std:shared_ptrurdf::ModelInterface, so I used a preprocessor
directive.

#include <fcl/shape/geometric_shapes.h>
#include <fcl/octree.h>
#include <boost/thread/mutex.hpp>
#include <boost/weak_ptr.hpp>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is this #include for?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess it worked fine before due to transitive includes. It's used for example in line 343.

@de-vri-es

de-vri-es commented Sep 9, 2016 •

Copy link
Copy Markdown
Contributor

Looks like a good idea. Might want to fix the typo in the commit message though. Is this compatible with older urdfdom releases?

@jspricke
jspricke force-pushed the urdfdom_headers_fix branch from 1fb24cc to e6c6a51 Compare September 9, 2016 11:57
@jspricke

jspricke commented Sep 9, 2016

Copy link
Copy Markdown
Contributor Author

Typo fixed. Should be compatible with urdfdom_headers 0.4 upwards.

@de-vri-es

de-vri-es commented Sep 9, 2016 •

Copy link
Copy Markdown
Contributor

+1 in principle

Typo still there though.

@jspricke
jspricke force-pushed the urdfdom_headers_fix branch from e6c6a51 to 0da6e93 Compare September 9, 2016 12:36
@jspricke

jspricke commented Sep 9, 2016

Copy link
Copy Markdown
Contributor Author

Oups, an other typo fixed (not my day today ;) ).

@de-vri-es

Copy link
Copy Markdown
Contributor

Looks like it needs a bit more work to make CI pass too. moveit::core::RobotModel doesn't have a matching constructor.

@de-vri-es

Copy link
Copy Markdown
Contributor

I think ShredPtr should be SharedPtr? ;)

@davetcoleman

Copy link
Copy Markdown
Member

Is this backwards compatible for indigo/jade? Should it be backported?

protected:

boost::shared_ptr<urdf::ModelInterface> urdf_model;
urdf::ModelInterfaceSharePtr urdf_model;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Typo ;)

@davetcoleman davetcoleman changed the title Use urdf::*ShredPtr instead of boost::shared_ptr Use urdf::*SharedPtr instead of boost::shared_ptr Sep 9, 2016
urdfdom_headers uses C++ std::shared_ptr. As it exports it as custom
*SharedPtr type, we can use them to stay compatible.

Note that there is no std:shared_ptr<const urdf::ModelInterface>
typedef, so I replaced it with urdf::ModelInterfaceSharedPtr (loosing a
const).

Also, there is no conversion from boost::shared_ptr<urdf::Model> to
std:shared_ptr<urdf::ModelInterface>, so I used a preprocessor
directive.
@jspricke

Copy link
Copy Markdown
Contributor Author

Another two typos fixed.

@davetcoleman I don't think this needs backporting as it's only relevant for new urdfdom_headers versions.

@de-vri-es

Copy link
Copy Markdown
Contributor

CI is still failing because it isn't using the latest urdfdom/urdfdom_headers. It would be nice to be compatible with the old and new versions. The only thing blocking that seems to be this: #209 (comment)

@jspricke

Copy link
Copy Markdown
Contributor Author

I've reverted the change to the urdf::Model shared pointer for now. We can still change it once CI get updated or ros/robot_model#153 gets accepted.

@jspricke

Copy link
Copy Markdown
Contributor Author

urdf::ModelInterfaceSharedPtr is part of urdfdom_header 0.4. Is there an easy way to find out with version is used on the CI?

@davetcoleman

Copy link
Copy Markdown
Member

MoveIt!'s CI is using the non-shadow-fixed version of kinetic-desktop. This OSRF container is only retriggered when the base Ubuntu container is rebuilt, and it appears its been awhile. The image we're using for ROS is now 2 months old.

I think we need to use the main ROS container, instead of OSRF's. The ROS one was updated 10 days ago. The difference is that there isn't a desktop-full version, unlike what OSRF offers.

@davetcoleman

Copy link
Copy Markdown
Member

This should fix the outdated URDFDom: #214

@rhaschke

Copy link
Copy Markdown
Contributor

In principle, I like this. However, package.xml and CMakeLists.txt should be updated to require at least version 0.4 of urdfdom_headers. We ran into issues for srdfdom (moveit/srdfdom#23), because that wasn't declared there.
This change is not suitable for Indigo/Jade, because there urdfdom is still < 0.4.

@jspricke

jspricke commented Sep 13, 2016 via email

Copy link
Copy Markdown
Contributor Author

@davetcoleman

Copy link
Copy Markdown
Member

The updated Docker image for our CI from #214 built and I re-triggered this PR, but it is still failing with the same error. I just manually checked what version of urdfdom_header it is using:

# apt-cache policy liburdfdom-headers-dev
liburdfdom-headers-dev:
  Installed: 0.4.1-2
  Candidate: 0.4.1-2

Notably the CI is building fine except for the second pass when it builds the tests, which is when moveit_core/collision_detection_fcl/test/test_fcl_collision_detection.cpp fails

@jspricke

Copy link
Copy Markdown
Contributor Author

I guess the new CI errors are not related to my pull request. Any other things I need to change?

@davetcoleman

Copy link
Copy Markdown
Member

The changes I made to our CI for this PR (to have the latest URDFDom headers) uncovered some missing dependencies: moveit/moveit_resources#14

@de-vri-es

de-vri-es commented Sep 14, 2016 •

Copy link
Copy Markdown
Contributor

Huh? These changes are still relevant I think?

@davetcoleman

Copy link
Copy Markdown
Member

Yes these changes are still relevant. I'll retrigger travis as soon as the new Docker is done building

@davetcoleman davetcoleman reopened this Sep 14, 2016
@davetcoleman

Copy link
Copy Markdown
Member

Travis finally passes!

@davetcoleman
davetcoleman merged commit 477b7a3 into moveit:kinetic-devel Sep 15, 2016
@jspricke
jspricke deleted the urdfdom_headers_fix branch September 15, 2016 05:17
@rhaschke

Copy link
Copy Markdown
Contributor

@davetcoleman Why did you already merged this? We still don't have a solution for Wiley using an old urdfdom (see moveit/srdfdom#23).
In order to make Travis note such issues, we should add Wiley as a target platform to Travis. Could you do this?

@davetcoleman

Copy link
Copy Markdown
Member

Because I hadn't realized that was the case, I spent a lot of time updating our CI so this PR would pass (it did), and no one brought it up here until after the merge. I'll updated Travis to test on Wiley now. Do you think we should revert this for now?

@davetcoleman

Copy link
Copy Markdown
Member

I moved the discussion: #222

@davetcoleman davetcoleman mentioned this pull request Sep 16, 2016
19 tasks done
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