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

compilation error with pcl 1.13 #149

Open
samsdolphin opened this issue Feb 18, 2023 · 1 comment
Open

compilation error with pcl 1.13 #149

samsdolphin opened this issue Feb 18, 2023 · 1 comment

Comments

@samsdolphin
Copy link

Hi developers, do you have a plan for supporting pcl 1.13? I'm testing with ubuntu 20.04 and ros noetic, this ros driver couldn't be compiled with following errors:

In file included from /usr/include/pcl-1.13/pcl/point_cloud.h:50,
from /opt/ros/noetic/include/pcl_ros/point_cloud.h:5,
from /home/sam/catkin_ws/src/livox_ros_driver/livox_ros_driver/livox_ros_driver/lddc.h:32,
from /home/sam/catkin_ws/src/livox_ros_driver/livox_ros_driver/livox_ros_driver/lddc.cpp:25:
/usr/include/pcl-1.13/pcl/point_traits.h:41:1: note: #pragma message: This header is deprecated. Use <pcl/type_traits.h> instead. (It will be removed in PCL 1.15)
41 | PCL_DEPRECATED_HEADER(1, 15, "Use <pcl/type_traits.h> instead.")
| ^~~~~~~~~~~~~~~~~~~~~
/usr/include/pcl-1.13/pcl/point_traits.h:41:1: note: #pragma message: This header is deprecated. Use <pcl/type_traits.h> instead. (It will be removed in PCL 1.15)
/usr/include/pcl-1.13/pcl/point_traits.h:41:1: note: #pragma message: This header is deprecated. Use <pcl/type_traits.h> instead. (It will be removed in PCL 1.15)
/usr/include/pcl-1.13/pcl/point_traits.h:41:1: note: #pragma message: This header is deprecated. Use <pcl/type_traits.h> instead. (It will be removed in PCL 1.15)
In file included from /opt/ros/noetic/include/ros/serialization.h:37,
from /opt/ros/noetic/include/ros/publisher.h:34,
from /opt/ros/noetic/include/ros/node_handle.h:32,
from /opt/ros/noetic/include/ros/ros.h:45,
from /home/sam/catkin_ws/src/livox_ros_driver/livox_ros_driver/livox_ros_driver/lddc.h:30,
from /home/sam/catkin_ws/src/livox_ros_driver/livox_ros_driver/livox_ros_driver/lddc.cpp:25:
/opt/ros/noetic/include/ros/message_traits.h: In instantiation of ‘static const char* ros::message_traits::MD5Sum::value(const M&) [with M = std::shared_ptr<pcl::PointCloudpcl::PointXYZI >]’:
/opt/ros/noetic/include/ros/message_traits.h:254:102: required from ‘const char* ros::message_traits::md5sum(const M&) [with M = std::shared_ptr<pcl::PointCloudpcl::PointXYZI >]’
/opt/ros/noetic/include/ros/publisher.h:117:38: required from ‘void ros::Publisher::publish(const M&) const [with M = std::shared_ptr<pcl::PointCloudpcl::PointXYZI >]’
/home/sam/catkin_ws/src/livox_ros_driver/livox_ros_driver/livox_ros_driver/lddc.cpp:343:31: required from here
/opt/ros/noetic/include/ros/message_traits.h:125:14: error: ‘const class std::shared_ptr<pcl::PointCloudpcl::PointXYZI >’ has no member named ‘__getMD5Sum’
125 | return m.__getMD5Sum().c_str();

@Maltiec
Copy link

Maltiec commented Mar 20, 2024

you should change this string in ldcc.cpp:
p_publisher->publish(cloud);
to:
p_publisher->publish(*cloud);

and
if (bag_ && enable_lidar_bag_) { bag_->write(p_publisher->getTopic(), ros::Time(timestamp / 1000000000.0), cloud); }
to:
if (bag_ && enable_lidar_bag_) { bag_->write(p_publisher->getTopic(), ros::Time(timestamp / 1000000000.0), *cloud); }

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

No branches or pull requests

2 participants