-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Minor fixes for Cartographer from ROS #1705
Conversation
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
I've now rebased this on top of master, and done some additional fixes to make this compatible with both ROS 1 and ROS 2. At this point, I think it is ready for review. |
Could you rebase again? I added some changes for Ubuntu 20.04 support in #1706 and it is now also included in CI. |
2be33aa
to
330a947
Compare
Rebased again now. |
Can we just use |
Sure, that works for me. See e1e5212 |
@@ -77,6 +77,7 @@ if(NOT GMock_FOUND) | |||
EXCLUDE_FROM_ALL) | |||
endif() | |||
set(GMOCK_LIBRARIES gmock_main) | |||
set(GMOCK_INCLUDE_DIRS ${GMOCK_SRC_DIR}/include) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
I'm working on migrating our fork to Noetic, this was needed there too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try installing the libgmock-dev
package? I added Ubuntu Focal (which Noetic is primarily targeted at) to CI recently and it passes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So installing libgmock-dev
does make it work. But I actually still think this is a bug, and installing libgmock-dev
just works around it.
When you install libgmock-dev
, it means you actually don't come in the if(NOT GMOCK_LIBRARIES)
block at all, and hence don't build gmock from source. If for some reason you do need to build gmock from source, then this block still doesn't export the GMOCK_INCLUDE_DIRS properly.
Thus, I think we should either keep this fix, or we should remove the fallback to build from source completely.
@@ -77,6 +77,7 @@ if(NOT GMock_FOUND) | |||
EXCLUDE_FROM_ALL) | |||
endif() | |||
set(GMOCK_LIBRARIES gmock_main) | |||
set(GMOCK_INCLUDE_DIRS ${GMOCK_SRC_DIR}/include) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try installing the libgmock-dev
package? I added Ubuntu Focal (which Noetic is primarily targeted at) to CI recently and it passes.
864edf6
to
2f0315a
Compare
This changes cartographer_ros to no longer build Ceres and instead uses libceres-dev for which a suitable version is provided by ROS for Kinetic. Related to cartographer-project#1705. Signed-off-by: Wolfgang Hess <[email protected]>
This changes cartographer_ros to no longer build Ceres and instead uses libceres-dev for which a suitable version is provided by ROS for Kinetic. Related to #1705. Signed-off-by: Wolfgang Hess <[email protected]>
2f0315a
to
8f6ef41
Compare
Thanks for pushing forward with this. I've now rebased this branch. This still has a few fixes that would be good to get in, so I'll still suggest that we look into merging this as well. |
Friendly ping on this one; can we get the fixes in this PR reviewed? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, we now have 3 lines left to review. One big discussion about libceres-dev is already resolved. Everything else looks fine to me, so I would prefer to merge. Since he was more involved into the discussion, I would ask @wohe to take a look please.
Please rebase / update branch and then let's get this merged. This patch is also needed for users that are building ROS1 from source, see my experiment in cartographer-project/cartographer_ros#1531. As we can see from the reply I got there it really affects users. So unless @wohe has strong objections I would proceed to get things fixed. |
@MichaelGrupp I will have a look today. We need to make sure that this does not break anything ROS1 related. |
* restrict boost dependencies to the ones used Signed-off-by: Mikael Arguedas <[email protected]>
Signed-off-by: Chris Lalancette <[email protected]>
Signed-off-by: Chris Lalancette <[email protected]>
8f6ef41
to
e30f75a
Compare
I've rebased onto the latest.
Agreed. I think that CI should show this, however. |
@clalancette Unfortunately, CI for this repo is unaffected by the file you changed. All ROS related code is in cartographer_ros. There, CI of course would fail when we introduce issues, but only after we merged the PR. I now ran this CI manually with your branch and it all succeeded. |
Ah, good call. Thanks for kicking off the tests and merging! |
This PR is a "port" of the Cartographer code to ROS 2. I put the words port in quotes because the port doesn't require very much; it is mostly changes to compile on Ubuntu 20.04, plus some changes to the package.xml to make it a pure cmake package rather than a catkin one.
As-is, this PR doesn't apply to master. That's because this "port" was originally done against the 1.0.0 tag of this repository. However, given the rather simple nature of this PR, it should be pretty easy to move forward.
I'm opening this PR as a starting point for the discussion on how to move this code into the upstream. Some steps that seem obvious to me:
Update this to apply against master.This is now done.Create a ros2 branch for this to targetWe decided to try to merge this all into master.Some steps that are less obvious, and/or need discussion:
Do we want to try to support ROS 1 and ROS 2 on the same branch? It might be possible here, but I'm not sure.We decided we do.Finally, I'll note that I don't have too much of time to devote to this. I'm doing this on discretionary time, so while I'm glad to do some simple work here, I won't have the time to do any major refactoring.
Comments, questions, thoughts all welcome!
This was originally PR #1701, but I had to close that one and move it to a new source branch. Below are comments from that PR.
@wohe said:
@clalancette I opened #1704 for the remaining focal related fixes. Some of the changes in this PR have already been fixed. I'll send a PR which adds focal to CI later.
Since this is the library without a dependency on ROS it should be possible to have one version for both ROS 1 and 2. The only ROS related file is the package.xml which to my understanding allows configuring dependencies differently based on the ROS version. Should we do this? Can you have a look? I dont't think anything would speak against merging a PR which just fixes up the package.xml for ROS 2 support.
@clalancette said:
Great, thanks!
Yep, in theory we should be able to do that. I'm going to rebase this on top of master, and then see if I can get that working.