Ask Your Question

error installing depth_nav_tools [closed]

asked 2019-03-18 17:24:24 -0500

hdbot gravatar image

Hi All,

I am trying to install depth_nav_tools, however, the catkin_make fails with errors:

In file included from /home/mars-lab/catkin_ws/src/depth_nav_tools/nav_layer_from_points/src/costmap_layer.cpp:37:0:
/home/mars-lab/catkin_ws/src/depth_nav_tools/nav_layer_from_points/include/nav_layer_from_points/costmap_layer.h:95:3: error: ‘tf’ does not name a type
   tf::TransformListener tf_;
/home/mars-lab/catkin_ws/src/depth_nav_tools/nav_layer_from_points/src/costmap_layer.cpp: In member function ‘virtual void nav_layer_from_points::NavLayerFromPoints::updateBounds(double, double, double, double*, double*, double*, double*)’:
/home/mars-lab/catkin_ws/src/depth_nav_tools/nav_layer_from_points/src/costmap_layer.cpp:127:13: error: request for member ‘transformPoint’ in ‘((nav_layer_from_points::NavLayerFromPoints*)this)->nav_layer_from_points::NavLayerFromPoints::<anonymous>.costmap_2d::Layer::tf_’, which is of pointer type ‘tf2_ros::Buffer*’ (maybe you meant to use ‘->’ ?)
         tf_.transformPoint(global_frame, pt, out_pt);
/home/mars-lab/catkin_ws/src/depth_nav_tools/nav_layer_from_points/src/costmap_layer.cpp:136:13: error: ‘tf’ does not name a type
       catch(tf::LookupException& ex)
/home/mars-lab/catkin_ws/src/depth_nav_tools/nav_layer_from_points/src/costmap_layer.cpp:136:32: error: expected unqualified-id before ‘&’ token
       catch(tf::LookupException& ex)
/home/mars-lab/catkin_ws/src/depth_nav_tools/nav_layer_from_points/src/costmap_layer.cpp:136:32: error: expected ‘)’ before ‘&’ token
/home/mars-lab/catkin_ws/src/depth_nav_tools/nav_layer_from_points/src/costmap_layer.cpp:136:32: error: expected ‘{’ before ‘&’ token
/home/mars-lab/catkin_ws/src/depth_nav_tools/nav_layer_from_points/src/costmap_layer.cpp:136:34: error: ‘ex’ was not declared in this scope
       catch(tf::LookupException& ex)
/home/mars-lab/catkin_ws/src/depth_nav_tools/nav_layer_from_points/src/costmap_layer.cpp:141:7: error: expected primary-expression before ‘catch’
       catch(tf::ConnectivityException& ex)
/home/mars-lab/catkin_ws/src/depth_nav_tools/nav_layer_from_points/src/costmap_layer.cpp:146:7: error: expected primary-expression before ‘catch’
       catch(tf::ExtrapolationException& ex)

I am not sure how to fix this, can anyone suggest a way to fix this?

Regards, hdbot

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by hdbot
close date 2019-03-19 08:55:06.656572

1 Answer

Sort by » oldest newest most voted

answered 2019-03-19 04:02:11 -0500

gvdhoorn gravatar image

updated 2019-03-19 04:02:49 -0500

This would seem to be a case of nav_layer_from_points not declaring a (build) dependency on tf.

See the build script: the tf package is not mentioned anywhere. Neither in the package manifest.

It's likely that the tf dependency was brought in transitively by some other dependency of nav_layer_from_points.

It will probably start working if you add tf to the find_package(catkin REQUIRED ..) and the catkin_package(.. CATKIN_DEPENDS ..) calls in the build script and as a depend to the package manifest.

If you do, and that fixes things, a PR to the original repository contributing that fix would probably be appreciated by the author.

edit flag offensive delete link more


@gvdhoorn I tried this, and it didn't work. Still getting same error when building the package.

hdbot gravatar image hdbot  ( 2019-03-19 08:37:28 -0500 )edit

Have you made sure to first delete your build and devel directories before trying to run catkin_make again?

gvdhoorn gravatar image gvdhoorn  ( 2019-03-19 08:44:48 -0500 )edit

@gvdhoorn, Yes I had tried deleting old build and devel. I got the package installed. It needed #include <tf/transform_listener.h> in the costmap_layer.h file. Once you include that, it works fine with your suggestion.

hdbot gravatar image hdbot  ( 2019-03-19 08:54:48 -0500 )edit

Question Tools

1 follower


Asked: 2019-03-18 17:24:24 -0500

Seen: 114 times

Last updated: Mar 19 '19