ros-industrial / noether

Tool path planning and surface segmenter
113 stars 44 forks source link

Warnings appearing as errors when compiling noether #148

Open rr-tom-noble opened 2 years ago

rr-tom-noble commented 2 years ago

Hi,

I'm attempting to compile noether without having to build VTK or PCL from source. I've downloaded the libpcl-dev and ros-noetic-pcl-msgs packages through apt-get, however I'm getting the following errors when building the vtk_viewer package:

local|rob@ros:~/checkout/external$ catkin build noether
----------------------------------------------------------------------------------------------------------------
Profile:                     default
Extending:             [env] /home/rob/checkout/internal/devel:/home/rob/checkout/external/devel:/opt/ros/noetic
Workspace:                   /home/rob/checkout/external
----------------------------------------------------------------------------------------------------------------
Build Space:        [exists] /home/rob/checkout/external/build
Devel Space:        [exists] /home/rob/checkout/external/devel
Install Space:      [unused] /home/rob/checkout/external/install
Log Space:         [missing] /home/rob/checkout/external/logs
Source Space:       [exists] /home/rob/checkout/external/src
DESTDIR:            [unused] None
----------------------------------------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
----------------------------------------------------------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
----------------------------------------------------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
----------------------------------------------------------------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
----------------------------------------------------------------------------------------------------------------
[build] Found '60' packages in 0.0 seconds.                                                                                                                                                                                   
[build] Updating package table.                                                                                                                                                                                               
Starting  >>> catkin_tools_prebuild                                                                                                                                                                                           
Finished  <<< catkin_tools_prebuild                           [ 1.0 seconds ]                                                                                                                                                 
Starting  >>> gtest                                                                                                                                                                                                           
Starting  >>> noether_msgs                                                                                                                                                                                                    
Starting  >>> pcl_conversions                                                                                                                                                                                                 
Finished  <<< gtest                                           [ 0.8 seconds ]                                                                                                                                                 
Starting  >>> ros_industrial_cmake_boilerplate                                                                                                                                                                                
Finished  <<< ros_industrial_cmake_boilerplate                [ 0.6 seconds ]                                                                                                                                                 
Starting  >>> noether_filtering                                                                                                                                                                                               
Starting  >>> vtk_viewer                                                                                                                                                                                                      
______________________________________________________________________________________________________________________________________________________________________________________________________________________________
Warnings   << pcl_conversions:cmake /home/rob/checkout/external/logs/pcl_conversions/build.cmake.000.log                                                                                                                      
** WARNING ** io features related to openni will be disabled
** WARNING ** io features related to openni2 will be disabled
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
** WARNING ** io features related to libusb-1.0 will be disabled
cd /home/rob/checkout/external/build/pcl_conversions; catkin build --get-env pcl_conversions | catkin env -si  /usr/bin/cmake /home/rob/checkout/external/src/perception_pcl/pcl_conversions --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/rob/checkout/external/devel/.private/pcl_conversions -DCMAKE_INSTALL_PREFIX=/home/rob/checkout/external/install; cd -
..............................................................................................................................................................................................................................
Finished  <<< pcl_conversions                                 [ 2.0 seconds ]                                                                                                                                                 
______________________________________________________________________________________________________________________________________________________________________________________________________________________________
Warnings   << noether_filtering:cmake /home/rob/checkout/external/logs/noether_filtering/build.cmake.000.log                                                                                                                  
PCL NURBS NOT FOUND
Building mesh plugins
cd /home/rob/checkout/external/build/noether_filtering; catkin build --get-env noether_filtering | catkin env -si  /usr/bin/cmake /home/rob/checkout/external/src/noether/noether_filtering --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX=/home/rob/checkout/external/devel; cd -
..............................................................................................................................................................................................................................
______________________________________________________________________________________________________________________________________________________________________________________________________________________________
Warnings   << vtk_viewer:cmake /home/rob/checkout/external/logs/vtk_viewer/build.cmake.000.log                                                                                                                                
** WARNING ** io features related to openni will be disabled
** WARNING ** io features related to openni2 will be disabled
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
** WARNING ** io features related to libusb-1.0 will be disabled
** WARNING ** visualization features related to openni will be disabled
** WARNING ** visualization features related to openni2 will be disabled
** WARNING ** apps features related to openni will be disabled
CMake Warning at /home/rob/checkout/external/devel/lib/cmake/ros_industrial_cmake_boilerplate/cmake_tools.cmake:73 (message):
  Using target_include_what_you_use but iwyu executable was not found!
Call Stack (most recent call first):
  CMakeLists.txt:41 (target_include_what_you_use)

cd /home/rob/checkout/external/build/vtk_viewer; catkin build --get-env vtk_viewer | catkin env -si  /usr/bin/cmake /home/rob/checkout/external/src/noether/vtk_viewer --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX=/home/rob/checkout/external/devel; cd -
..............................................................................................................................................................................................................................
Finished  <<< noether_msgs                                    [ 11.2 seconds ]                                                                                                                                                
Starting  >>> noether_conversions                                                                                                                                                                                             
Finished  <<< noether_conversions                             [ 19.6 seconds ]                                                                                                                                                
Finished  <<< noether_filtering                               [ 46.1 seconds ]                                                                                                                                                
______________________________________________________________________________________________________________________________________________________________________________________________________________________________
Errors     << vtk_viewer:make /home/rob/checkout/external/logs/vtk_viewer/build.make.000.log                                                                                                                                  
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/mouse_interactor.h:37:32: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
  static MouseInteractorStyle* New();
         ~~~~~~~~~~~~~~~~~~~~~ ^
         auto                        -> MouseInteractorStyle*
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/mouse_interactor.h:49:36: error: the parameter 'pathway' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
  void setSaveLocation(std::string pathway) { save_location_.str(pathway); }
                                   ^
                       const      &
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/mouse_interactor.h:55:15: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
  std::string getSaveLocation() { return save_location_.str(); }
  ~~~~~~~~~~~ ^
  auto                          -> std::string
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/mouse_interactor.h:60:16: error: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override,-warnings-as-errors]
  virtual void OnLeftButtonDown();
  ~~~~~~~~     ^
                                  override
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/mouse_interactor.h:66:16: error: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override,-warnings-as-errors]
  virtual void OnKeyPress();
  ~~~~~~~~     ^
                            override
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/mouse_interactor.h:68:29: error: member variable 'selected_actor_' has public visibility [misc-non-private-member-variables-in-classes,-warnings-as-errors]
  vtkSmartPointer<vtkActor> selected_actor_; /**< the actor that was clicked on in the window */
                            ^
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/mouse_interactor.h:70:21: error: member variable 'save_location_' has public visibility [misc-non-private-member-variables-in-classes,-warnings-as-errors]
  std::stringstream save_location_; /**< location to save polydata files to */
                    ^
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_viewer.h:35:7: error: class 'VTKViewer' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class VTKViewer
      ^
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_viewer.h:84:15: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
  std::size_t getNumberOfDisplayObjects() { return actors_.size(); }
  ~~~~~~~~~~~ ^
  auto                                    -> std::size_t
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_viewer.h:93:8: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
  bool removeObjectDisplay(std::size_t index);
  ~~~~ ^
  auto                                        -> bool
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_viewer.h:104:72: error: parameter 'dir' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
  void setLogDir(std::string dir) { mouse_interactor_->setSaveLocation(dir); }
                                                                       ^
                                                                       std::move( )
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_viewer.h:110:15: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
  std::string getLogDir() { return mouse_interactor_->getSaveLocation(); }
  ~~~~~~~~~~~ ^
  auto                    -> std::string
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_viewer.h:113:20: error: invalid case style for private member 'renWin_' [readability-identifier-naming,-warnings-as-errors]
  vtkRenderWindow* renWin_;                /**< The VTK window for displaying data */
                   ^~~~~~~
                   ren_win_
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_viewer.h:130:49: error: invalid case style for parameter 'reverseNormals' [readability-identifier-naming,-warnings-as-errors]
  void makeGlyphs(vtkPolyData* src, bool const& reverseNormals, vtkSmartPointer<vtkGlyph3D> glyph, double scale);
                                                ^~~~~~~~~~~~~~
                                                reverse_normals
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_viewer.cpp:109:40: error: invalid case style for parameter 'reverseNormals' [readability-identifier-naming,-warnings-as-errors]
                           bool const& reverseNormals,
                                       ^~~~~~~~~~~~~~
                                       reverse_normals
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_viewer.cpp:110:56: error: the parameter 'glyph' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
                           vtkSmartPointer<vtkGlyph3D> glyph,
                                                       ^
                           const                      &
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_viewer.cpp:188:7: error: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto,-warnings-as-errors]
      vtkTriangle* triangle = dynamic_cast<vtkTriangle*>(cell);
      ^~~~~~~~~~~
      auto
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_viewer.cpp:189:7: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
      double p0[3];
      ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_viewer.cpp:190:7: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
      double p1[3];
      ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_viewer.cpp:191:7: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
      double p2[3];
      ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_viewer.cpp:192:7: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
      double center[3];
      ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_viewer.cpp:207:17: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
bool VTKViewer::removeObjectDisplay(std::size_t index)
~~~~            ^
auto                                                   -> bool
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_viewer.cpp:225:10: error: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty,-warnings-as-errors]
  while (actors_.size() > 0)
         ^~~~~~~~~~~~~~~~~~
         !actors_.empty()
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h:1004:7: note: method 'vector'::empty() defined here
      empty() const _GLIBCXX_NOEXCEPT
      ^
33743 warnings generated.
Suppressed 33720 warnings (33720 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
23 warnings treated as errors
make[2]: *** [CMakeFiles/vtk_viewer.dir/build.make:89: CMakeFiles/vtk_viewer.dir/src/vtk_viewer.cpp.o] Error 23
make[2]: *** Waiting for unfinished jobs....
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/mouse_interactor.h:37:32: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
  static MouseInteractorStyle* New();
         ~~~~~~~~~~~~~~~~~~~~~ ^
         auto                        -> MouseInteractorStyle*
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/mouse_interactor.h:49:36: error: the parameter 'pathway' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
  void setSaveLocation(std::string pathway) { save_location_.str(pathway); }
                                   ^
                       const      &
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/mouse_interactor.h:55:15: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
  std::string getSaveLocation() { return save_location_.str(); }
  ~~~~~~~~~~~ ^
  auto                          -> std::string
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/mouse_interactor.h:60:16: error: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override,-warnings-as-errors]
  virtual void OnLeftButtonDown();
  ~~~~~~~~     ^
                                  override
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/mouse_interactor.h:66:16: error: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override,-warnings-as-errors]
  virtual void OnKeyPress();
  ~~~~~~~~     ^
                            override
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/mouse_interactor.h:68:29: error: member variable 'selected_actor_' has public visibility [misc-non-private-member-variables-in-classes,-warnings-as-errors]
  vtkSmartPointer<vtkActor> selected_actor_; /**< the actor that was clicked on in the window */
                            ^
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/mouse_interactor.h:70:21: error: member variable 'save_location_' has public visibility [misc-non-private-member-variables-in-classes,-warnings-as-errors]
  std::stringstream save_location_; /**< location to save polydata files to */
                    ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/mouse_interactor.cpp:32:1: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
vtkStandardNewMacro(MouseInteractorStyle);
^
/usr/include/vtk-7.1/vtkObjectFactory.h:376:25: note: expanded from macro 'vtkStandardNewMacro'
  thisClass* thisClass::New() \
                        ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/mouse_interactor.cpp:32:21: error: use auto when initializing with new to avoid duplicating the type name [modernize-use-auto,-warnings-as-errors]
vtkStandardNewMacro(MouseInteractorStyle);
                    ^~~~~~~~~~~~~~~~~~~~
                    auto
/usr/include/vtk-7.1/vtkObjectFactory.h:378:25: note: expanded from macro 'vtkStandardNewMacro'
  VTK_STANDARD_NEW_BODY(thisClass) \
                        ^
/usr/include/vtk-7.1/vtkObjectFactory.h:369:3: note: expanded from macro 'VTK_STANDARD_NEW_BODY'
  thisClass *result = new thisClass; \
  ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/mouse_interactor.cpp:105:11: error: invalid case style for variable 'worldPosition' [readability-identifier-naming,-warnings-as-errors]
  double* worldPosition = picker->GetPickPosition();
          ^~~~~~~~~~~~~
          world_position
44677 warnings generated.
Suppressed 44667 warnings (44667 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings treated as errors
make[2]: *** [CMakeFiles/vtk_viewer.dir/build.make:63: CMakeFiles/vtk_viewer.dir/src/mouse_interactor.cpp.o] Error 10
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:38:6: error: invalid case style for enum 'plane_type' [readability-identifier-naming,-warnings-as-errors]
enum plane_type
     ^~~~~~~~~~
     PlaneType
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:55:28: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
vtkSmartPointer<vtkPoints> createPlane(unsigned int grid_size_x = 10,
~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
auto
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:72:30: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
vtkSmartPointer<vtkPolyData> createMesh(vtkSmartPointer<vtkPoints> points, double sample_spacing, int neigborhood_size);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
auto                                                                                                                    -> vtkSmartPointer<vtkPolyData>
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:86:30: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
vtkSmartPointer<vtkPolyData> readSTLFile(std::string file);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
auto                                                       -> vtkSmartPointer<vtkPolyData>
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:94:30: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
vtkSmartPointer<vtkPolyData> estimateCurvature(vtkSmartPointer<vtkPolyData> mesh, int method);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
auto                                                                                          -> vtkSmartPointer<vtkPolyData>
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:105:6: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
bool embedRightHandRuleNormals(vtkSmartPointer<vtkPolyData>& data);
~~~~ ^
auto                                                               -> bool
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:119:30: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
vtkSmartPointer<vtkPolyData> sampleMesh(vtkSmartPointer<vtkPolyData> mesh, double distance);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
auto                                                                                        -> vtkSmartPointer<vtkPolyData>
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:129:6: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
bool loadPCDFile(std::string file,
~~~~ ^
auto
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:134:35: error: parameter 'cloud' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls,-warnings-as-errors]
void vtkSurfaceReconstructionMesh(const pcl::PointCloud<pcl::PointXYZ>::Ptr cloud, vtkSmartPointer<vtkPolyData>& mesh);
                                  ^~~~~~
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:141:6: error: invalid case style for function 'PCLtoVTK' [readability-identifier-naming,-warnings-as-errors]
void PCLtoVTK(const pcl::PointCloud<pcl::PointXYZ>& cloud, vtkPolyData* const pdata);
     ^~~~~~~~
     pcLtoVtk
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:141:60: error: parameter 'pdata' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls,-warnings-as-errors]
void PCLtoVTK(const pcl::PointCloud<pcl::PointXYZ>& cloud, vtkPolyData* const pdata);
                                                           ^            ~~~~~~
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:143:6: error: invalid case style for function 'VTKtoPCL' [readability-identifier-naming,-warnings-as-errors]
void VTKtoPCL(vtkPolyData* const pdata, pcl::PointCloud<pcl::PointNormal>& cloud);
     ^~~~~~~~
     vtKtoPcl
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:143:15: error: parameter 'pdata' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls,-warnings-as-errors]
void VTKtoPCL(vtkPolyData* const pdata, pcl::PointCloud<pcl::PointNormal>& cloud);
              ^            ~~~~~~
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:159:8: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
double pt_dist(double* pt1, double* pt2);
~~~~~~ ^
auto                                     -> double
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:159:8: error: invalid case style for function 'pt_dist' [readability-identifier-naming,-warnings-as-errors]
double pt_dist(double* pt1, double* pt2);
       ^~~~~~~
       ptDist
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:168:30: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
vtkSmartPointer<vtkPolyData> cutMesh(vtkSmartPointer<vtkPolyData>& mesh,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
auto
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:180:40: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
pcl::PointCloud<pcl::PointNormal>::Ptr pclEstimateNormals(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
auto
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:193:18: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
pcl::PolygonMesh pclGridProjectionMesh(pcl::PointCloud<pcl::PointNormal>::ConstPtr cloud,
~~~~~~~~~~~~~~~~ ^
auto
/home/rob/checkout/external/src/noether/vtk_viewer/include/vtk_viewer/vtk_utils.h:218:6: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
bool loadPolygonMeshFromPLY(const std::string& file, pcl::PolygonMesh& mesh);
~~~~ ^
auto                                                                         -> bool
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:56:28: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
vtkSmartPointer<vtkPoints> createPlane(unsigned int grid_size_x, unsigned int grid_size_y, vtk_viewer::plane_type type)
~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
auto                                                                                                                    -> vtkSmartPointer<vtkPoints>
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:88:30: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
vtkSmartPointer<vtkPolyData> createMesh(vtkSmartPointer<vtkPoints> points, double sample_spacing, int neigborhood_size)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
auto                                                                                                                    -> vtkSmartPointer<vtkPolyData>
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:144:7: error: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto,-warnings-as-errors]
      vtkTriangle* triangle = dynamic_cast<vtkTriangle*>(cell);
      ^~~~~~~~~~~
      auto
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:145:7: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
      double p0[3];
      ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:146:7: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
      double p1[3];
      ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:147:7: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
      double p2[3];
      ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:148:7: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
      double center[3];
      ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:211:30: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
vtkSmartPointer<vtkPolyData> readSTLFile(std::string file)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
auto                                                       -> vtkSmartPointer<vtkPolyData>
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:211:54: error: the parameter 'file' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
vtkSmartPointer<vtkPolyData> readSTLFile(std::string file)
                                                     ^
                                         const      &
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:221:6: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
bool loadPCDFile(std::string file, vtkSmartPointer<vtkPolyData>& polydata, std::string background, bool /*return_mesh*/)
~~~~ ^
auto                                                                                                                     -> bool
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:221:30: error: the parameter 'file' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
bool loadPCDFile(std::string file, vtkSmartPointer<vtkPolyData>& polydata, std::string background, bool /*return_mesh*/)
                             ^
                 const      &
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:221:88: error: the parameter 'background' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
bool loadPCDFile(std::string file, vtkSmartPointer<vtkPolyData>& polydata, std::string background, bool /*return_mesh*/)
                                                                                       ^
                                                                           const      &
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:225:43: error: redundant call to 'c_str' [readability-redundant-string-cstr,-warnings-as-errors]
  if (pcl::io::loadPCDFile<pcl::PointXYZ>(file.c_str(), *cloud) == -1)  //* load the file
                                          ^~~~~~~~~~~~
                                          file
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:231:7: error: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty,-warnings-as-errors]
  if (background != "")
      ^~~~~~~~~~~~~~~~
      !background.empty()
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h:1031:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here
      empty() const _GLIBCXX_NOEXCEPT
      ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:234:45: error: redundant call to 'c_str' [readability-redundant-string-cstr,-warnings-as-errors]
    if (pcl::io::loadPCDFile<pcl::PointXYZ>(background.c_str(), *bg_cloud) == -1)  //* load the file
                                            ^~~~~~~~~~~~~~~~~~
                                            background
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:254:77: error: the const qualified parameter 'cloud' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param,-warnings-as-errors]
void vtkSurfaceReconstructionMesh(const pcl::PointCloud<pcl::PointXYZ>::Ptr cloud, vtkSmartPointer<vtkPolyData>& mesh)
                                                                            ^
                                                                           &
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:304:3: error: use range-based for loop instead [modernize-loop-convert,-warnings-as-errors]
  for (std::size_t i = 0; i < cloud.points.size(); ++i)
  ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      (auto & point : cloud.points)
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:318:6: error: invalid case style for function 'PCLtoVTK' [readability-identifier-naming,-warnings-as-errors]
void PCLtoVTK(const pcl::PointCloud<pcl::PointXYZ>& cloud, vtkPolyData* const pdata)
     ^~~~~~~~
     pcLtoVtk
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:321:3: error: use range-based for loop instead [modernize-loop-convert,-warnings-as-errors]
  for (std::size_t i = 0; i < cloud.points.size(); ++i)
  ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      (auto point : cloud.points)
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:327:11: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
    const double pt[3] = { double(cloud.points[i].x), double(cloud.points[i].y), double(cloud.points[i].z) };
          ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:332:32: error: invalid case style for variable 'tempPolyData' [readability-identifier-naming,-warnings-as-errors]
  vtkSmartPointer<vtkPolyData> tempPolyData = vtkSmartPointer<vtkPolyData>::New();
                               ^~~~~~~~~~~~
                               temp_poly_data
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:338:6: error: invalid case style for function 'VTKtoPCL' [readability-identifier-naming,-warnings-as-errors]
void VTKtoPCL(vtkPolyData* const pdata, pcl::PointCloud<pcl::PointNormal>& cloud)
     ^~~~~~~~
     vtKtoPcl
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:357:30: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
vtkSmartPointer<vtkPolyData> estimateCurvature(vtkSmartPointer<vtkPolyData> mesh, int method)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
auto                                                                                          -> vtkSmartPointer<vtkPolyData>
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:357:77: error: the parameter 'mesh' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
vtkSmartPointer<vtkPolyData> estimateCurvature(vtkSmartPointer<vtkPolyData> mesh, int method)
                                                                            ^
                                               const                       &
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:381:6: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
bool embedRightHandRuleNormals(vtkSmartPointer<vtkPolyData>& data)
~~~~ ^
auto                                                               -> bool
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:402:7: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
      double norm[3] = { 0, 0, 0 };
      ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:408:9: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
        double p0[3] = { 1, 0, 0 };
        ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:409:9: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
        double p1[3] = { 0, 1, 0 };
        ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:410:9: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
        double p2[3] = { 0, 0, 1 };
        ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:418:9: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
        double v1[3];
        ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:419:9: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
        double v2[3];
        ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:420:9: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
        double v3[3];
        ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:489:9: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
        double norm[3] = { 0, 0, 0 };
        ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:492:11: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
          double p0[3];
          ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:569:30: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
vtkSmartPointer<vtkPolyData> sampleMesh(vtkSmartPointer<vtkPolyData> mesh, double distance)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
auto                                                                                        -> vtkSmartPointer<vtkPolyData>
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:569:70: error: the parameter 'mesh' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
vtkSmartPointer<vtkPolyData> sampleMesh(vtkSmartPointer<vtkPolyData> mesh, double distance)
                                                                     ^
                                        const                       &
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:579:3: error: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays,-warnings-as-errors]
  double bounds[6];
  ^
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:597:30: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
vtkSmartPointer<vtkPolyData> cutMesh(vtkSmartPointer<vtkPolyData>& mesh,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
auto
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:620:8: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
double pt_dist(double* pt1, double* pt2)
~~~~~~ ^
auto                                     -> double
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:620:8: error: invalid case style for function 'pt_dist' [readability-identifier-naming,-warnings-as-errors]
double pt_dist(double* pt1, double* pt2)
       ^~~~~~~
       ptDist
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:628:42: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
static pcl::PointCloud<pcl::Normal>::Ptr estimateNormals(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
       auto
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:628:94: error: the parameter 'cloud' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
static pcl::PointCloud<pcl::Normal>::Ptr estimateNormals(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud,
                                                                                             ^
                                                         const                              &
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:643:40: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
pcl::PointCloud<pcl::PointNormal>::Ptr pclEstimateNormals(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
auto
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:643:95: error: the parameter 'cloud' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
pcl::PointCloud<pcl::PointNormal>::Ptr pclEstimateNormals(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud,
                                                                                              ^
                                                          const                              &
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:656:18: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
pcl::PolygonMesh pclGridProjectionMesh(pcl::PointCloud<pcl::PointNormal>::ConstPtr cloud,
~~~~~~~~~~~~~~~~ ^
auto
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:656:84: error: the parameter 'cloud' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
pcl::PolygonMesh pclGridProjectionMesh(pcl::PointCloud<pcl::PointNormal>::ConstPtr cloud,
                                                                                   ^
                                       const                                      &
/home/rob/checkout/external/src/noether/vtk_viewer/src/vtk_utils.cpp:706:6: error: use a trailing return type for this function [modernize-use-trailing-return-type,-warnings-as-errors]
bool loadPolygonMeshFromPLY(const std::string& file, pcl::PolygonMesh& mesh)
~~~~ ^
auto                                                                         -> bool
214033 warnings generated.
Suppressed 213967 warnings (213967 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
66 warnings treated as errors
make[2]: *** [CMakeFiles/vtk_viewer.dir/build.make:76: CMakeFiles/vtk_viewer.dir/src/vtk_utils.cpp.o] Error 66
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/vtk_viewer.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
cd /home/rob/checkout/external/build/vtk_viewer; catkin build --get-env vtk_viewer | catkin env -si  /usr/bin/make --jobserver-auth=3,4; cd -
..............................................................................................................................................................................................................................
Failed     << vtk_viewer:make                                 [ Exited with code 2 ]                                                                                                                                          
Failed    <<< vtk_viewer                                      [ 59.9 seconds ]                                                                                                                                                
Abandoned <<< mesh_segmenter                                  [ Unrelated job failed ]                                                                                                                                        
Abandoned <<< tool_path_planner                               [ Unrelated job failed ]                                                                                                                                        
Abandoned <<< path_sequence_planner                           [ Unrelated job failed ]                                                                                                                                        
Abandoned <<< noether                                         [ Unrelated job failed ]                                                                                                                                        
[build] Summary: 7 of 12 packages succeeded.                                                                                                                                                                                  
[build]   Ignored:   49 packages were skipped or are blacklisted.                                                                                                                                                             
[build]   Warnings:  3 packages succeeded with warnings.                                                                                                                                                                      
[build]   Abandoned: 4 packages were abandoned.                                                                                                                                                                               
[build]   Failed:    1 packages failed.                                                                                                                                                                                       
[build] Runtime: 1 minute and 2.6 seconds total.                                                                                                                                                                              
[build] Note: Workspace packages have changed, please re-source setup files to use them.

Any ideas & suggestions would be much appreciated!

Levi-Armstrong commented 2 years ago

It is running clang tidy, but that should only run if NOETHER_ENABLE_TESTING is set to on. Though it does not look like you are setting it, but I do not see where it is being initialize to off. When building pass --cmake-args -DNOETHER_ENABLE_TESTING=OFF and see if it goes away. I also recommend doing a clean build.

rr-tom-noble commented 2 years ago

Ah okay, I'll try with that variable set then thanks :+1: . Should those be fixed in noether then if the code isn't passing the clang check, or are they not a concern?

rr-tom-noble commented 2 years ago

Success! Thanks for the help. Will leave this open in case the warnings need to be fixed

Levi-Armstrong commented 2 years ago

Should those be fixed in noether then if the code isn't passing the clang check, or are they not a concern?

They should be fixed, but depending on the error/warning it may not be an issue.

Levi-Armstrong commented 2 years ago

There are a few open PR's where we are restructuring and cleaning up the repo, so it may be getting addressed in one of those but this should remain open until those are merged and tested.