ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Not able to compile a .msg using pcl_msgs type variables

asked 2014-03-07 01:25:26 -0500

rosAS gravatar image

updated 2014-03-07 12:30:39 -0500

Hello everyone,

I am working on Groovy and have all the libraries installed.

I have created a custom .msg file with following entries :

Header header

pcl_msgs/PolygonMesh mesh

sensor_msgs/PointCloud2 normals

I have included pcl_msgs in my package.xml and CMakelists.txt also.

But unfortunately on compilation I get following errors

-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- Could NOT find openni (missing:  OPENNI_INCLUDE_DIRS) 
** WARNING ** io features related to openni will be disabled
-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- Could NOT find openni (missing:  OPENNI_INCLUDE_DIRS) 
** WARNING ** visualization features related to openni will be disabled
-- looking for PCL_COMMON
-- looking for PCL_KDTREE
-- looking for PCL_OCTREE
-- looking for PCL_SEARCH
-- looking for PCL_SAMPLE_CONSENSUS
-- looking for PCL_IO
-- looking for PCL_GEOMETRY
-- looking for PCL_FEATURES
-- looking for PCL_FILTERS
-- looking for PCL_KEYPOINTS
-- looking for PCL_SURFACE
-- looking for PCL_REGISTRATION
-- looking for PCL_SEGMENTATION
-- looking for PCL_VISUALIZATION
-- looking for PCL_TRACKING
CMake Error at /opt/ros/groovy/share/genmsg/cmake/genmsg-extras.cmake:252 (message):
  Could not find 'share/pcl_msgs/cmake/pcl_msgs-msg-paths.cmake' (searched in
Call Stack (most recent call first):
  modsrc/CMakeLists.txt:31 (generate_messages)
-- Configuring incomplete, errors occurred!
Invoking "cmake" failed

CMakelist:

cmake_minimum_required(VERSION 2.8.3)

project(mod_msgs)

find_package(catkin REQUIRED COMPONENTS nav_msgs roscpp rospy sensor_msgs std_msgs message_generation pcl pcl_ros pcl_msgs )

add_message_files( FILES TriangleMesh.msg )

generate_messages( DEPENDENCIES

nav_msgs

sensor_msgs

std_msgs

pcl

pcl_ros

pcl_msgs )

catkin_package(

CATKIN_DEPENDS nav_msgs roscpp rospy sensor_msgs std_msgs message_runtime pcl_msgs pcl pcl_ros )

include_directories(

${PCL_INCLUDE_DIRS}

${catkin_INCLUDE_DIRS} )

link_directories(${PCL_LIBRARY_DIRS})

add_definitions(${PCL_DEFINITIONS})

I have looked through pcl forums but not able to resolve this problem. Any kind of guidance would be much appreciated. Thanks

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2014-03-07 14:50:20 -0500

ahendrix gravatar image

It looks like the pcl_msgs that are released into Groovy are in the pcl namespace; try declaring your message dependency on pcl instead of pcl_msgs.

edit flag offensive delete link more
1

answered 2014-03-08 10:56:26 -0500

rosAS gravatar image

Thanks a lot ahendrix, exactly this was the issue. I checked in the documentaion of pcl 1.6, they are using the namespace pcl, for e.g. pcl::PolygonMesh , so using the namespace "pcl" worked. Here is the link : http://docs.pointclouds.org/1.6.0/search.php?query=polygonmesh

edit flag offensive delete link more
0

answered 2014-03-07 09:11:12 -0500

ahendrix gravatar image

It looks like you don't have the pcl_msgs package installed, or it isn't on your cmake path.

Try installing it with:

sudo apt-get install ros-groovy-pcl-msgs
edit flag offensive delete link more

Comments

Thanks for your response ahendrix, but it still doesn't compile. is there some specific change required in the package.xml and CMakelists.txt ? ( I have included build and runtime dependencies for "pcl_msgs" in package.xml and corresponding dependencies in CMakelists.txt as well )

rosAS gravatar image rosAS  ( 2014-03-07 10:49:34 -0500 )edit

It's possible that you're still missing a dependency somewhere in your CMakeLists.txt. Can you add your CMakeLists.txt to your question?

ahendrix gravatar image ahendrix  ( 2014-03-07 11:27:04 -0500 )edit

So, I also compared "pcl_msgs" directory of hydro and groovy. Hydro has "pcl_msgs-msg-paths.cmake" but groovy version doesn't.

rosAS gravatar image rosAS  ( 2014-03-07 12:34:26 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-03-07 01:25:26 -0500

Seen: 911 times

Last updated: Mar 07 '14