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

Compile Error Melodic due to tf change #717

Closed
moriarty opened this issue May 14, 2018 · 0 comments · Fixed by #718
Closed

Compile Error Melodic due to tf change #717

moriarty opened this issue May 14, 2018 · 0 comments · Fixed by #718
Assignees

Comments

@moriarty
Copy link
Contributor

A change in tf.h here: ros/geometry#163
causes the following compile error on Ubuntu 18.04 and Melodic:

Errors     << amcl:make /home/amoriarty/melodic/logs/amcl/build.make.000.log                                                                                                                               
/home/amoriarty/melodic/src/navigation/amcl/src/amcl_node.cpp: In member function ‘tf2_ros::Buffer& AmclNode::TransformListenerWrapper::getBuffer()’:
/home/amoriarty/melodic/src/navigation/amcl/src/amcl_node.cpp:130:51: error: ‘tf2_buffer_’ was not declared in this scope
       inline tf2_ros::Buffer &getBuffer() {return tf2_buffer_;}
                                                   ^~~~~~~~~~~
/home/amoriarty/melodic/src/navigation/amcl/src/amcl_node.cpp:130:51: note: suggested alternative: ‘tf2_buffer_ptr_’
       inline tf2_ros::Buffer &getBuffer() {return tf2_buffer_;}
                                                   ^~~~~~~~~~~
                                                   tf2_buffer_ptr_
make[2]: *** [CMakeFiles/amcl.dir/src/amcl_node.cpp.o] Error 1
make[1]: *** [CMakeFiles/amcl.dir/all] Error 2
make: *** [all] Error 2

The simple gcc suggestion to replace tf2_buffer_ with tf2_buffer_ptr_ doesn't fix the problem, just gets the next error msg:

Errors     << amcl:make /home/amoriarty/melodic/logs/amcl/build.make.001.log                                                                                                                               
/home/amoriarty/melodic/src/navigation/amcl/src/amcl_node.cpp: In member function ‘tf2_ros::Buffer& AmclNode::TransformListenerWrapper::getBuffer()’:
/home/amoriarty/melodic/src/navigation/amcl/src/amcl_node.cpp:130:51: error: invalid initialization of reference of type ‘tf2_ros::Buffer&’ from expression of type ‘std::shared_ptr<tf2_ros::Buffer>’
       inline tf2_ros::Buffer &getBuffer() {return tf2_buffer_ptr_;}
                                                   ^~~~~~~~~~~~~~~

I was using the lunar branch earlier as it was the most up to date and was working with melodic, but came back from holidays and it fails to compile.

I just brought this up with @aaronhoy, I think to open a pull request to fix this issue requires a melodic-devel branch

moriarty added a commit to moriarty/navigation that referenced this issue May 14, 2018
Change required due to changes in upstream dependencies:
ros/geometry#163: "Maintain & expose tf2 Buffer in shared_ptr for tf"

fixes ros-planning#717 (for compile errors at least.)
moriarty added a commit to moriarty/navigation that referenced this issue May 14, 2018
Change required due to changes in upstream dependencies:
ros/geometry#163: "Maintain & expose tf2 Buffer in shared_ptr for tf"

fixes ros-planning#717 (for compile errors at least.)
@mikeferguson mikeferguson added this to the Melodic Release (1.16) milestone May 14, 2018
@aaronhoy aaronhoy self-assigned this May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants