Closed yadajin closed 9 months ago
simple分支下的例程怎么运行
rosrun robot_hmi robot_hmi
catkin_make 编译报错了
catkin_make 编译报错了
什么错
编译报错: /home/qin/lizi/src/Ros_Qt5_Gui_App-master/src/main_window.cpp: In member function ‘void cyrobot_monitor::MainWindow::slot_speed_x(double)’: /home/qin/lizi/src/Ros_Qt5_Gui_App-master/src/main_window.cpp:775:15: error: no match for ‘operator==’ (operand types are ‘QCharRef’ and ‘const char [2]’) if(number[1]=="."){ ^ In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qpagedpaintdevice.h:38:0, from /usr/include/x86_64-linux-gnu/qt5/QtGui/QtGui:68, from /home/qin/lizi/src/Ros_Qt5_Gui_App-master/src/main_window.cpp:12: /usr/include/x86_64-linux-gnu/qt5/QtGui/qpagelayout.h:137:19: note: candidate: bool operator==(const QPageLayout&, const QPageLayout&) Q_GUI_EXPORT bool operator==(const QPageLayout &lhs, const QPageLayout &rhs);
将 void MainWindow::slot_speed_x(double x) { speedDashBoard->set_speed(abs(x100)); if(x>0.001){ speedDashBoard->set_gear(DashBoard::kGear_D); }else if(x<-0.001){ speedDashBoard->set_gear(DashBoard::kGear_R); }else{ speedDashBoard->set_gear(DashBoard::kGear_N); } QString number=QString::number(abs(x100)).mid(0,2); if(number[1]=="."){ number=number.mid(0,1); } ui.label_speed->setText(number);
} 修改为: void MainWindow::slot_speed_x(double x) { speedDashBoard->set_speed(abs(x100)); if(x>0.001){ speedDashBoard->set_gear(DashBoard::kGear_D); }else if(x<-0.001){ speedDashBoard->set_gear(DashBoard::kGear_R); }else{ speedDashBoard->set_gear(DashBoard::kGear_N); } QString number=QString::number(abs(x100)).mid(0,2); if(number=="."){ number=number.mid(0,1); } ui.label_speed->setText(number);
}
@bensort
我使用的是jetsonnano Arm架构的工控机,在进行编译时出现了如下错误:
CMakeFiles/cyrobot_monitor.dir/src/qnode.cpp.o: In function
cv::Mat::Mat(int, int, int, void, unsigned long)':
qnode.cpp:(.text._ZN2cv3MatC2EiiiPvm[_ZN2cv3MatC5EiiiPvm]+0x150): undefined reference to `cv::error(int, std::__cxx11::basic_string<char, std::char_traitscv::Mat::updateContinuityFlag()' collect2: error: ld returned 1 exit status [ 72%] Built target DepthImageToLaserScanNodelet Ros_Qt5_Gui_App-master/CMakeFiles/cyrobot_monitor.dir/build.make:852: recipe for target '/home/hanning/robot_ws/devel/lib/cyrobot_monitor/cyrobot_monitor' failed make[2]: *** [/home/hanning/robot_ws/devel/lib/cyrobot_monitor/cyrobot_monitor] Error 1 CMakeFiles/Makefile2:11836: recipe for target 'Ros_Qt5_Gui_App-master/CMakeFiles/cyrobot_monitor.dir/all' failed make[1]: *** [Ros_Qt5_Gui_App-master/CMakeFiles/cyrobot_monitor.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 72%] Built target map_msgs_generate_messages [ 72%] Built target realsense2_camera_generate_messages [ 73%] Built target realsense2_camera Makefile:140: recipe for target 'all' failed make: *** [all] Error 2
opencv环境问题,你可能更改了opencv相关环境,jetson nano使用ros自带的opencv环境是可以正常编译成功的
发自我的iPhone
------------------ 原始邮件 ------------------ 发件人: mingyue @.> 发送时间: 2021年7月28日 11:29 收件人: chengyangkj/Ros_Qt5_Gui_App @.> 抄送: ChengYang @.>, Comment @.> 主题: 回复:[chengyangkj/Ros_Qt5_Gui_App] 如何运行 (#13)
@bensort 我使用的是jetsonnano Arm架构的工控机,在进行编译时出现了如下错误: CMakeFiles/cyrobot_monitor.dir/src/qnode.cpp.o: In function cv::Mat::Mat(int, int, int, void, unsigned long)': qnode.cpp:(.text._ZN2cv3MatC2EiiiPvm[_ZN2cv3MatC5EiiiPvm]+0x150): undefined reference to cv::error(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const, char const, int)' qnode.cpp:(.text._ZN2cv3MatC2EiiiPvm[_ZN2cv3MatC5EiiiPvm]+0x244): undefined reference to cv::error(int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, char const, char const*, int)' qnode.cpp:(.text._ZN2cv3MatC2EiiiPvm[_ZN2cv3MatC5EiiiPvm]+0x2cc): undefined reference to cv::Mat::updateContinuityFlag()' collect2: error: ld returned 1 exit status [ 72%] Built target DepthImageToLaserScanNodelet Ros_Qt5_Gui_App-master/CMakeFiles/cyrobot_monitor.dir/build.make:852: recipe for target '/home/hanning/robot_ws/devel/lib/cyrobot_monitor/cyrobot_monitor' failed make[2]: [/home/hanning/robot_ws/devel/lib/cyrobot_monitor/cyrobot_monitor] Error 1 CMakeFiles/Makefile2:11836: recipe for target 'Ros_Qt5_Gui_App-master/CMakeFiles/cyrobot_monitor.dir/all' failed make[1]: [Ros_Qt5_Gui_App-master/CMakeFiles/cyrobot_monitor.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 72%] Built target map_msgs_generate_messages [ 72%] Built target realsense2_camera_generate_messages [ 73%] Built target realsense2_camera Makefile:140: recipe for target 'all' failed make: [all] Error 2
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
您好,的jetsonnano内的opencv一直没有用过,应该是默认的,这个问题我应该怎么解决呢?
opencv版本的问题吧,你可能使用的不是ROS自带的opencv
mingyue @.***> 于2021年7月28日周三 上午11:50写道:
您好,的jetsonnano内的opencv一直没有用过,应该是默认的,这个问题我应该怎么解决呢?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chengyangkj/Ros_Qt5_Gui_App/issues/13#issuecomment-887987794, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYLH7TRTEQSJ3KIPON66GLTZ55BLANCNFSM4ZGGW6TA .
simple分支下的例程怎么运行