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

Error when running 'catkin_make' #29

Open
mrezzaaa opened this issue Sep 1, 2022 · 4 comments
Open

Error when running 'catkin_make' #29

mrezzaaa opened this issue Sep 1, 2022 · 4 comments

Comments

@mrezzaaa
Copy link

mrezzaaa commented Sep 1, 2022

Hi im new in ROS.

running command catkin_make and got this error

/Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:40:32: error: reference to 'Payload' is ambiguous payloadBuffer[0] = Payload::Run::PayloadHeader::Run2D; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:44:32: error: reference to 'Payload' is ambiguous payloadBuffer[0] = Payload::Run::PayloadHeader::Run3D; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:48:32: error: reference to 'Payload' is ambiguous payloadBuffer[0] = Payload::Run::PayloadHeader::RunDual; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:55:47: error: reference to 'Payload' is ambiguous makeCommand(CommandBuffer, payloadBuffer, Payload::Run::PayloadTotalSize); ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:58:34: error: reference to 'Payload' is ambiguous uint16_t CommandTotalSize = (Payload::Run::PayloadTotalSize) ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:67:47: error: reference to 'Payload' is ambiguous if(mode == eRunMode::Mode2D || Duration > Payload::Duration::MaximumDurationValue) ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:78:24: error: reference to 'Payload' is ambiguous payloadBuffer[0] = Payload::Duration::PayloadHeader::Duration; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:85:47: error: reference to 'Payload' is ambiguous makeCommand(CommandBuffer, payloadBuffer, Payload::Duration::PayloadTotalSize); ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:88:34: error: reference to 'Payload' is ambiguous uint16_t CommandTotalSize = (Payload::Duration::PayloadTotalSize) + (Header::HeaderTotalSize) + 1; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:99:24: error: reference to 'Payload' is ambiguous payloadBuffer[0] = Payload::Frequency::PayloadHeader::SetFreqeuncy; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:103:47: error: reference to 'Payload' is ambiguous makeCommand(CommandBuffer, payloadBuffer, Payload::Frequency::PayloadTotalSize); ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:105:34: error: reference to 'Payload' is ambiguous uint16_t CommandTotalSize = (Payload::Frequency::PayloadTotalSize) + (Header::HeaderTotalSize) + 1; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:114:24: error: reference to 'Payload' is ambiguous payloadBuffer[0] = Payload::Stop::PayloadHeader::Stop; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:118:47: error: reference to 'Payload' is ambiguous makeCommand(CommandBuffer, payloadBuffer, Payload::Stop::PayloadTotalSize); ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl.cpp:121:34: error: reference to 'Payload' is ambiguous uint16_t CommandTotalSize = (Payload::Stop::PayloadTotalSize) + (Header::HeaderTotalSize) + 1; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/CygbotParser.h:63:3: note: candidate found by name lookup is 'Payload' }Payload; ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/include/Constants_CygLiDAR_D1.h:100:13: note: candidate found by name lookup is 'CygLiDARD1::Command::Payload' namespace Payload ^ In file included from /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl_publisher.cpp:1: In file included from /Users/icewalker/catkin_ws/src/cyglidar_d1/include/cyglidar_pcl.h:4: In file included from /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/ros.h:45: In file included from /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/node_handle.h:32: In file included from /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/publisher.h:34: In file included from /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/serialization.h:37: /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/message_traits.h:125:14: error: no member named '__getMD5Sum' in 'std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>' return m.__getMD5Sum().c_str(); ~ ^ /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/message_traits.h:254:97: note: in instantiation of member function 'ros::message_traits::MD5Sum<std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>>::value' requested here return MD5Sum<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::value(m); ^ /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/publisher.h:117:29: note: in instantiation of function template specialization 'ros::message_traits::md5sum<std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>>' requested here std::string(mt::md5sum<M>(message)) == "*" || ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl_publisher.cpp:151:16: note: in instantiation of function template specialization 'ros::Publisher::publish<std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>>' requested here pub_2D.publish(scan_2D); ^ In file included from /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl_publisher.cpp:1: In file included from /Users/icewalker/catkin_ws/src/cyglidar_d1/include/cyglidar_pcl.h:4: In file included from /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/ros.h:45: In file included from /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/node_handle.h:32: In file included from /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/publisher.h:34: In file included from /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/serialization.h:37: /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/message_traits.h:142:14: error: no member named '__getDataType' in 'std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>' return m.__getDataType().c_str(); ~ ^ /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/message_traits.h:263:99: note: in instantiation of member function 'ros::message_traits::DataType<std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>>::value' requested here return DataType<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::value(m); ^ /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/publisher.h:121:25: note: in instantiation of function template specialization 'ros::message_traits::datatype<std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>>' requested here mt::datatype<M>(message), mt::md5sum<M>(message), ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl_publisher.cpp:151:16: note: in instantiation of function template specialization 'ros::Publisher::publish<std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>>' requested here pub_2D.publish(scan_2D); ^ In file included from /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl_publisher.cpp:1: In file included from /Users/icewalker/catkin_ws/src/cyglidar_d1/include/cyglidar_pcl.h:4: In file included from /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/ros.h:45: In file included from /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/node_handle.h:32: In file included from /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/publisher.h:34: /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/serialization.h:144:14: error: no member named 'serializationLength' in 'std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>' return t.serializationLength(); ~ ^ /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/serialization.h:172:25: note: in instantiation of member function 'ros::serialization::Serializer<std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>>::serializedLength' requested here return Serializer<T>::serializedLength(t); ^ /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/serialization.h:807:18: note: in instantiation of function template specialization 'ros::serialization::serializationLength<std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>>' requested here uint32_t len = serializationLength(message); ^ /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/publisher.h:126:27: note: in instantiation of function template specialization 'ros::serialization::serializeMessage<std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>>' requested here publish(boost::bind(serializeMessage<M>, boost::ref(message)), m); ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl_publisher.cpp:151:16: note: in instantiation of function template specialization 'ros::Publisher::publish<std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>>' requested here pub_2D.publish(scan_2D); ^ In file included from /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl_publisher.cpp:1: In file included from /Users/icewalker/catkin_ws/src/cyglidar_d1/include/cyglidar_pcl.h:4: In file included from /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/ros.h:45: In file included from /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/node_handle.h:32: In file included from /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/publisher.h:34: /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/serialization.h:127:7: error: no member named 'serialize' in 'std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>' t.serialize(stream.getData(), 0); ~ ^ /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/serialization.h:154:18: note: in instantiation of function template specialization 'ros::serialization::Serializer<std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>>::write<ros::serialization::OStream>' requested here Serializer<T>::write(stream, t); ^ /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/serialization.h:814:3: note: in instantiation of function template specialization 'ros::serialization::serialize<std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>, ros::serialization::OStream>' requested here serialize(s, message); ^ /Users/icewalker/opt/miniconda3/envs/ROS/include/ros/publisher.h:126:27: note: in instantiation of function template specialization 'ros::serialization::serializeMessage<std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>>' requested here publish(boost::bind(serializeMessage<M>, boost::ref(message)), m); ^ /Users/icewalker/catkin_ws/src/cyglidar_d1/src/cyglidar_pcl_publisher.cpp:151:16: note: in instantiation of function template specialization 'ros::Publisher::publish<std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>>>' requested here pub_2D.publish(scan_2D); ^ 15 errors generated. 4 errors generated. make[2]: *** [cyglidar_d1/CMakeFiles/cyglidar_pcl_publisher.dir/build.make:90: cyglidar_d1/CMakeFiles/cyglidar_pcl_publisher.dir/src/cyglidar_pcl.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [cyglidar_d1/CMakeFiles/cyglidar_pcl_publisher.dir/build.make:76: cyglidar_d1/CMakeFiles/cyglidar_pcl_publisher.dir/src/cyglidar_pcl_publisher.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:936: cyglidar_d1/CMakeFiles/cyglidar_pcl_publisher.dir/all] Error 2 make: *** [Makefile:146: all] Error 2 Invoking "make -b -j8 -l8" failed

@amir-m2ai
Copy link

amir-m2ai commented Nov 21, 2022

Hello,
I have the same issue after cloning the cyglidar repo on my /catkin_ws/src and catkin_make it, gives me an error. The error is related to PCL though. I have installed pcl_ros, but it did not resolve the make error. The error is "PCL requires C++14 or above". Please provide an instruction to resolve the issue, otherwise I will not be able to use the cyglidar sensor.

@amir-m2ai
Copy link

amir-m2ai commented Nov 21, 2022

@mrezzaaa
Apparently, I could resolve the issue by following these steps:

  1. Clone cyglidar_d1:
    ~/catkin_ws/src
    git clone https://github.com/CygLiDAR-ROS/cyglidar_d1

  2. Follow the steps on the github page:
    roscd cyglidar_d1
    cd scripts
    chmod +x create_udev_rules.sh
    ./create_udev_rules.sh

  3. Add the two following lines into the CMakeLists.txt file of cyglidar_d1 ros package:
    add_compile_options(-std=c++14)
    set(CMAKE_CXX_FLGAS "-std=c++11 -03")

  4. Install PCL package:
    sudo apt-get install ros-noetic-pcl-ros

  5. Reboot your system:
    sudo reboot

  6. Make packages:
    catkin_make -j2
    *This step requires a little of patience.
    *Ignore warnings and wait until make ends even if you find the system freezes.

I am running this package on:

  • Ubuntu 20.04
  • ROS noetic
  • Raspberry pi 4B

Although I could successfully catkin_make the cyglidar_d1 package, I have not tested the package with cyglidar sensor yet. I will do it as soon as I receive the sensor.
I hope you find this helpful.

Best regards,
Amir

@mrezzaaa
Copy link
Author

Hi, thanks for your solution. Very appreciate it.

i have rewrite the code using python with ROS environment and it works.
And now im facing new problem with limited mac os baud rate limitation. It causing large delay when processing 3D and run smoothly when using 2D

@OrkunAkar
Copy link

Hello, I have the same issue after cloning the cyglidar repo on my /catkin_ws/src and catkin_make it, gives me an error. The error is related to PCL though. I have installed pcl_ros, but it did not resolve the make error. The error is "PCL requires C++14 or above". Please provide an instruction to resolve the issue, otherwise I will not be able to use the cyglidar sensor.

Hello I'm trying to run ekf_loam but facing with "pcl requires cpp14 or above" error. My system is ubuntu 20.4, Ros Noetic

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

3 participants