Update pcl_ros to use the data() member function of STL containers to
get the pointer to the underlying storage, instead of dereferencing the
zeroth element and taking its reference. When a container is of size 0,
dereferencing element 0 with operator[]() is undefined behavior, and
will trigger assertions when features like _GLIBCXX_ASSERTIONS are
enabled.
Fixes#333.
This prevents errors like this: error: ‘name’ is not a member of ‘pcl::detail::traits’; did you mean ‘pcl::traits::name’?
The error appears for newer PCL versions (everything after commit d39d3d3300), but this change should also be fully compatible with older PCL versions.
* Port transforms library to ROS2
- Port the transforms library to ROS2
- Update CMakeLists
- Update package.xml
- Enable the package
Signed-off-by: Sean Kelly <sean@seankelly.dev>
* Feedback from PR
Collection of hand-made changes to make ament_cpplint pass consisting of:
- whitespace between comments
- line length
- header ordering
- include guard formats
- remove a couple `using namespace std;`
- using c++ casts instead of c-style casts
Signed-off-by: Sean Kelly <sean@seankelly.dev>
* Rename headers from .h to .hpp per ROS2 guidelines
This change is the result of the following command run from pcl_ros dir:
$ find -name *.h | xargs -I {} mv {} {}pp
Signed-off-by: Sean Kelly <sean@seankelly.dev>
* Update internal includes for the renamed headers
This change was the result of the following bash script:
$ find -name *.h -o -name *.cpp -o -name *.hpp | xargs -I {} sed -i 's/\(pcl_ros\/.*\)\(h\)\([">]\)$/\1\2pp\3/g' {}
Signed-off-by: Sean Kelly <sean@seankelly.dev>
After this change 6df3e602a7 (diff-24324a084e511502d7f34054ec31b353L50), an explicit include for KdTree is needed.
It was formerly a transitive include via pcl/surface/mls.h - pcl/search/pcl_search.h - pcl/search/kdtree.h - pcl/kdtree/kdtree_flann.h.
* Deriving typedef from pcl type
* Explicit boost shared_ptr for function parameters
* Use boost::shared_ptr instead of PCL::Ptr
* Implementing boost-std compatibility
* Using the compatibility layer
* pcl_conversion to ros2
* travis for ros2 and fixed cmakelists
* exporting dependencies
* updated travis
* fixed smaller things
* added colcon ignore to meta package
* merge pcl_conversions.h with version released in Dashing
* merge test script, CMakeListst, package.xml
* append authors, clean up
* PR feedback
* fixed PR comments
* fixed PR comments, cmakelists message_filters, reverted type masq, added maintainer
* removed dashing and made ros_distro matrix env
```
% catkin lint .
pcl_ros: error: nodelet plugin file 'plugins/nodelet/libpcl_ros_features.xml' is not installed to ${CATKIN_PACKAGE_SHARE_DESTINATION}
pcl_ros: error: nodelet plugin file 'plugins/nodelet/libpcl_ros_filters.xml' is not installed to ${CATKIN_PACKAGE_SHARE_DESTINATION}
pcl_ros: error: nodelet plugin file 'plugins/nodelet/libpcl_ros_io.xml' is not installed to ${CATKIN_PACKAGE_SHARE_DESTINATION}
pcl_ros: error: nodelet plugin file 'plugins/nodelet/libpcl_ros_segmentation.xml' is not installed to ${CATKIN_PACKAGE_SHARE_DESTINATION}
pcl_ros: error: nodelet plugin file 'plugins/nodelet/libpcl_ros_surface.xml' is not installed to ${CATKIN_PACKAGE_SHARE_DESTINATION}
pcl_ros: error: unconfigured build_depend on 'message_filters'
catkin_lint: checked 1 packages and found 6 problems
catkin_lint: 40 notices have been ignored. Use -W2 to see them
```