Skip to content
This repository was archived by the owner on Aug 3, 2020. It is now read-only.

provide urdf_compatibility.h to define SharedPtr types - #160

Merged
wjwwood merged 3 commits into
ros:kinetic-develfrom
ubi-agni:urdfdom-compatibility
Oct 27, 2016
Merged

wjwwood merged 3 commits into
ros:kinetic-develfrom
ubi-agni:urdfdom-compatibility

Conversation

@rhaschke

@rhaschke rhaschke commented Oct 26, 2016 •

Copy link
Copy Markdown
Contributor

Wily ships with urdfdom 0.3, which doesn't yet declare SharedPtr types. To allow compatibility of Kinetic packages, which typically already rely on those types, we ship a urdf_compatibility.h header.

@wjwwood suggested to apply this PR here, in the very first ROS package using urdfdom, and not in downstream packages like MoveIt: moveit/moveit1#18 (comment).

Downstream packages simply need to #include <urdf/urdf_compatibility.h>.

@wjwwood

wjwwood commented Oct 26, 2016

Copy link
Copy Markdown
Member

Thanks @rhaschke, I can use this in rviz too.

Comment thread urdf/CMakeLists.txt
catkin_package(
LIBRARIES ${PROJECT_NAME}
INCLUDE_DIRS include ${TinyXML_INLCLUDE_DIRS}
INCLUDE_DIRS include ${TinyXML_INLCLUDE_DIRS} ${CATKIN_DEVEL_PREFIX}/include

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like CI is choking on this line. Are you sure it is necessary? I guess you want to do something like what gencpp does for the generated message headers:

https://github.com/ros/gencpp/blob/indigo-devel/cmake/gencpp-extras.cmake.em#L49-L57

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.

This line is necessary to export the include path in devel-space context. However, I indeed missed to create that folder beforehand. I guess, it is created with configure_file(), but I moved the whole block past catkin_package() because of the use of CATKIN_PACKAGE_INCLUDE_DESTINATION.

@davetcoleman

Copy link
Copy Markdown
Contributor

@wjwwood what kind of delay will we see in releasing this package into Kinetic? I'd like to get moveit released quickly and moving this PR here from moveit/moveit1#317 seems like a potential big delay

@wjwwood

wjwwood commented Oct 26, 2016

Copy link
Copy Markdown
Member

I'll make a release as soon as this patch is merged to expedite the process, though I would like to test this patch out with rviz before releasing to ensure it is sufficient.

@rhaschke

Copy link
Copy Markdown
Contributor Author

For MoveIt, it doesn't suffice to declare SharedPtr types in the compatibility header. At some places, MoveIt already includes urdf_world/types.h or urdf_model/types.h which were introduced with urdfdom 0.4 only.
So we need some more #ifdefs in the source.

@rhaschke

Copy link
Copy Markdown
Contributor Author

With the latest commit, MoveIt seems to compile on Wily: I essentially removed all includes of urdf_world/types.h, which I proposed to remove with ros/urdfdom_headers#33.
Instead urdf_model/types.h should correctly declare ModelInterfaceSharedPtr in future.
For now, as a workaround, urdf/model.h includes the compatibility header, which in turn (re)declares all shared pointer types.
I didn't yet tested rviz.

@rhaschke

Copy link
Copy Markdown
Contributor Author

@wjwwood I'm just building rviz on Wily with this patch. Some changes are required, which I will file as a PR as soon as build is successful.

@wjwwood

wjwwood commented Oct 27, 2016

Copy link
Copy Markdown
Member

Testing this now.

@wjwwood

wjwwood commented Oct 27, 2016

Copy link
Copy Markdown
Member

Cool it works for me in a Wily docker building rviz with this patch and ros-visualization/rviz#1064.

Thanks again @rhaschke! I'll merge this now and start a release.

@wjwwood
wjwwood merged commit f5a3b80 into ros:kinetic-devel Oct 27, 2016
@wjwwood

wjwwood commented Oct 27, 2016

Copy link
Copy Markdown
Member

I did a release with this pr just now: ros/rosdistro#13092

@rhaschke
rhaschke deleted the urdfdom-compatibility branch October 27, 2016 21:48
@v4hn

v4hn commented Nov 15, 2016

Copy link
Copy Markdown

@wjwwood could we get this compatibility header released in indigo too?
This would probably simplify things and ease cross-distro compilation of moveit's kinetic branch on ROS indigo.

@wjwwood

wjwwood commented Nov 16, 2016

Copy link
Copy Markdown
Member

If someone does the pr to the right branch I'll look at it next time I spend time on robot_model.

v4hn pushed a commit to v4hn/robot_model that referenced this pull request Dec 7, 2016
* provide urdf_compatibility.h to define SharedPtr types

* create exported include directory

* include compatibility header in model.h
wjwwood pushed a commit that referenced this pull request Jan 5, 2017
…170)

* provide urdf_compatibility.h to define SharedPtr types

* create exported include directory

* include compatibility header in model.h
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants