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

Diamondback, rosmake openni_kinect On fedora 15

asked 2011-09-03 05:03:06 -0500

CaptainTrunky gravatar image

updated 2011-09-03 19:12:28 -0500

Hello! I try to compile openni_kinect drivers with GCC 4.6, but have next problem:

/home/crady/ros/perception_pcl/pcl/include/pcl/ros/conversions.h: In function ‘void pcl::toROSMsg(const CloudT&, sensor_msgs::Image&) [with CloudT = pcl::PointCloud<pcl::PointXYZRGB>, sensor_msgs::Image = sensor_msgs::Image_<std::allocator<void> >]’:
  /home/crady/ros/perception_pcl/pcl_ros/src/tools/convert_pcd_to_image.cpp:75:32:   instantiated from here
  /home/crady/ros/perception_pcl/pcl/include/pcl/ros/conversions.h:285:9: error: taking address of temporary [-fpermissive]

As I understand, I should add [-fpermissive] flag to some CMake file, to change error status to warning. But I can't find appropriate files. Can anybody help with this? This flag actual for GCC 4.6, but can't downgrade to, for example, GCC 4.5. Thanks for help!

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2011-09-03 20:27:29 -0500

CaptainTrunky gravatar image

I got it! File ~/ros/perception_pcl/pcl_ros/CMakeLists.txt has at the top next lines:

cmake_minimum_required (VERSION 2.4.6)
    include ($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
    #set (ROS_BUILD_TYPE Debug)
    set (ROS_BUILD_TYPE RelWithDebInfo)
    rosbuild_init ()
    rosbuild_add_boost_directories ()
    #add_definitions (-Wall -O3 -funroll-loops)
    rosbuild_check_for_sse ()

So, you should uncomment line "add_definitions" and add flag -fpermissive, like this:

add_definitions (-Wall -O3 -funroll-loops -permissive)
edit flag offensive delete link more

answered 2011-09-03 07:42:07 -0500

Try adding

#include <cstddef>

to the top of convert_pcd_to_image.pcd.

I've found that that fixes lots of GCC4.6 related problems.

edit flag offensive delete link more


Thanks, but this didn't help. Nothing changed. )
CaptainTrunky gravatar image CaptainTrunky  ( 2011-09-03 18:43:57 -0500 )edit

Question Tools

1 follower


Asked: 2011-09-03 05:03:06 -0500

Seen: 758 times

Last updated: Sep 03 '11