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

Fix to compile on melodic #365

Closed
wants to merge 4 commits into from

Conversation

pazeshun
Copy link
Contributor

@pazeshun pazeshun commented Apr 3, 2020

This PR enables this repository to be compiled on melodic.

On melodic, C++14 is standard (see https://www.ros.org/reps/rep-0003.html#c).
We have to use std::shared_ptr and std::const_pointer_cast instead of boost:: ones when C++ is upper than C++11, so this PR makes the software to use std:: ones only when C++ is upper than C++11.

On melodic, C++14 is standard (see https://www.ros.org/reps/rep-0003.html#c) and urdf uses std::shared_ptr instead of boost::shared_ptr.

So on melodic, we have to use std::const_pointer_cast to handle the returned value of urdf::Model::getLink and use std::shared_ptr to store urdf::Link::parent_joint.

Related issue: ros-industrial/fanuc#241

@pazeshun pazeshun changed the title Fix to compile on melodic [WIP] Fix to compile on melodic Apr 7, 2020
@pazeshun
Copy link
Contributor Author

pazeshun commented Apr 7, 2020

Mistakes were found. Current changes cause build failure on kinetic. I'll fix them.

On kinetic, urdf uses boost::shared_ptr, so we have to use boost::shared_ptr and boost::const_pointer_cast.
On melodic, urdf uses std::shared_ptr, so we have to use std::shared_ptr and std::const_pointer_cast.
@pazeshun
Copy link
Contributor Author

pazeshun commented Apr 7, 2020

Mistakes were found. Current changes cause build failure on kinetic. I'll fix them.

This was fixed via 419da9a.
I added the detailed description to #365 (comment)

@pazeshun pazeshun changed the title [WIP] Fix to compile on melodic Fix to compile on melodic Apr 7, 2020
k-okada added a commit to k-okada/rtmros_nextage that referenced this pull request May 1, 2020
@k-okada k-okada mentioned this pull request May 1, 2020
@k-okada k-okada closed this May 2, 2020
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.

2 participants