做像美团淘宝平台网站多少钱南京seo公司哪家

web/2025/10/1 1:48:17/文章来源:
做像美团淘宝平台网站多少钱,南京seo公司哪家,wordpress主题盗取,番禺信息网文章目录 1、简述2、效果图2.1、命令行#xff08;不带GUI#xff09;2.2、GUI#xff08;这里用的Qt#xff09; 3、串口硬件知识普及4、核心实现4.1、Qt的pro文件4.2、main文件4.3、SSerialPort类4.3.1、头文件4.3.2、源文件 4.4、Linux下的CMakeLists.txt 1、简述 本文… 文章目录 1、简述2、效果图2.1、命令行不带GUI2.2、GUI这里用的Qt 3、串口硬件知识普及4、核心实现4.1、Qt的pro文件4.2、main文件4.3、SSerialPort类4.3.1、头文件4.3.2、源文件 4.4、Linux下的CMakeLists.txt 1、简述 本文主要讲述 C开源库 CSerialPort 的使用主要在Windows和Linux两个平台分别应用。 有需要了解 C开源库 CSerialPort 的小伙伴可以先去这边文章下了解下为什么要用 CSerialPort 和 CSerialPort 的介绍。 文章链接【C/C】轻量级跨平台 开源串口库 CSerialPort 2、效果图 2.1、命令行不带GUI Windows效果如下Linux一样可以运行只是串口名称不一样。因为还要切换系统我就不截Linux图了 2.2、GUI这里用的Qt 放开pro里面的这两行即可注释掉就是命令行Windows效果图如下。Linux下这台没装Qt没尝试串口名称改下问题不大。 DEFINES SHASHIDI_GUI CONFIG SHASHIDI_GUI3、串口硬件知识普及 因为只测试串口的收发消息把发送和接收的两个端口短接。找一个杜邦线直接串联起来就可以这样发什么消息就收到什么消息。如图是1口和3口短接。 4、核心实现 4.1、Qt的pro文件 Qt 的 pro 文件如下。这里我用了一个宏来区分一个是Pro的区分一个是代码里面的区分 DEFINES SHASHIDI_GUI CONFIG SHASHIDI_GUISHASHIDI_GUI{ QT core gui greaterThan(QT_MAJOR_VERSION, 4): QT widgetsTARGET Demo_SerialPortSOURCES main.cpp \mainwindow.cppFORMS \mainwindow.uiHEADERS \mainwindow.h} else { TARGET Demo_SerialPort_ConsoleCONFIG console c11 CONFIG - app_bundle CONFIG - qtHEADERS \jsserialport.hSOURCES main.cpp \jsserialport.cpp }TEMPLATE appDEFINES _UNICODEinclude($$PWD/CSerialPort/CSerialPort.pri)win32*: {#about windows regLIBS $$PWD/CSerialPort/windows/x86/advapi32.lib#about windows setupapiLIBS $$PWD/CSerialPort/windows/x86/setupapi.lib }CONFIG(debug, debug|release) {DESTDIR $$PWD/bin_debug } else {DESTDIR $$PWD/bin_release }HEADERS \CommonSerialPort.h4.2、main文件 #ifdef SHASHIDI_GUI #include mainwindow.h #include QApplication #else #include jsserialport.h #include iostream using namespace std; #endif#ifdef SHASHIDI_GUI int main(int argc, char *argv[]) {QApplication a(argc, argv);MainWindow w;w.show();return a.exec(); #else int main() {JSSerialPort js;js.doWork();return 0; #endif }4.3、SSerialPort类 4.3.1、头文件 #ifndef SSERIALPORT_H #define SSERIALPORT_H#include iostream #include CSerialPort/SerialPort.h #include CSerialPort/SerialPortInfo.h #include CommonSerialPort.husing namespace std; using namespace itas109;class SSerialPort : public CSerialPortListener { public:SSerialPort();// 工作void doWork();// 校验void doCheck(char receiveBuf[], int receiveSize);// 串口信号bool m_flag_serialport false;// 发出消息void sendMessage();// 读取全部数据void readAllData();private:// 获取端口列表vectorSerialPortInfo getSerialPortList();// 打开串口bool openSerialPort(const char *portName,int baudRate 9600,itas109::Parity parity itas109::Parity::ParityNone,itas109::DataBits dataBits itas109::DataBits::DataBits8,itas109::StopBits stopbits itas109::StopBits::StopOne,itas109::FlowControl flowControl itas109::FlowControl::FlowNone,unsigned int readBufferSize 4096, int timeout 0);// 关闭串口void closeSerialPort();// 收到消息void onReadEvent(const char *portName, unsigned int readBufferLen);// 设置串口模式 同步\异步void setSync(bool isSync);// 设置DTRvoid setDTR(bool isDTR);// 设置RTSvoid setRTS(bool isRTS);// 初始化串口void initSerialPort();// 初始化发送消息void initSendMessage(); private:CSerialPort m_SerialPort; // 串口struct TERMINAL_TO_FIRECONTROL *m_terminal_to_firecontrol; // 终端到火控struct FIRECONTROL_TO_TERMINAL *m_firecontrol_to_terminal; // 火控到终端int m_packet_frame_count 0; // 报文帧号累计int m_buffer_size 2048;int m_frame_length 34;unsigned char m_firstChar 161; // 0xA1unsigned char m_secondChar 177; // 0xB1unsigned char m_thirdChar 50; // 0x32int m_tx 0;int m_rx 0; };#endif // SSERIALPORT_H4.3.2、源文件 #include sserialport.h#include iostream #include iomanipSSerialPort::SSerialPort() { }void SSerialPort::doWork() {cout doWork: initSerialPort endl;initSerialPort();cout doWork: initSendMessage endl;initSendMessage();cout doWork: sendMessage endl;sendMessage();cout doWork: readAllData endl;readAllData(); }void SSerialPort::doCheck(char receiveBuf[], int receiveSize) {cout doCheck: start receiveSize endl;for(int i 0; i receiveSize; i) {if( ( receiveSize - i ) m_frame_length ) { //不足一帧则退出break;}cout doCheck1: receiveBuf[i] endl;if( (receiveBuf[i] m_secondChar) (receiveBuf[i1] m_firstChar) ) { //发现帧头取出一帧校验cout doCheck: receiveBuf[i] endl;string aa(receiveBuf);cout doCheck: aa endl;string tmp_s(aa, i, m_frame_length);cout doCheck: tmp_s endl;int data 0;for(int i 0; i (m_frame_length - 1); i) {data data tmp_s[i];}unsigned char data1 data 0x7f;if(data1 ! tmp_s[m_frame_length - 1]) {i i 1;continue;}//校验通过取值m_firecontrol_to_terminal-send_address tmp_s[0];m_firecontrol_to_terminal-receive_address tmp_s[1];m_firecontrol_to_terminal-packet_length tmp_s[2];m_firecontrol_to_terminal-packet_frame_number_low tmp_s[3];m_firecontrol_to_terminal-packet_frame_number_high tmp_s[4];m_firecontrol_to_terminal-light_aiming_status_word_1.all tmp_s[5];m_firecontrol_to_terminal-light_aiming_status_word_2.all tmp_s[6];m_firecontrol_to_terminal-laser_ranging_distance_low tmp_s[7];m_firecontrol_to_terminal-laser_ranging_distance_high tmp_s[8];m_firecontrol_to_terminal-servo_status_word_1.all tmp_s[9];m_firecontrol_to_terminal-servo_status_word_2.all tmp_s[10];m_firecontrol_to_terminal-speed_of_chassis tmp_s[11];m_firecontrol_to_terminal-chassis_battery_power tmp_s[12];m_firecontrol_to_terminal-front_flip_arm_angle_low tmp_s[13];m_firecontrol_to_terminal-front_flip_arm_angle_high tmp_s[14];m_firecontrol_to_terminal-back_flip_arm_angle_low tmp_s[15];m_firecontrol_to_terminal-back_flip_arm_angle_high tmp_s[16];m_firecontrol_to_terminal-relay_status_word.all tmp_s[17];m_firecontrol_to_terminal-light_azimuth_position_low tmp_s[18];m_firecontrol_to_terminal-light_azimuth_position_high tmp_s[19];m_firecontrol_to_terminal-light_pitch_position_low tmp_s[20];m_firecontrol_to_terminal-light_pitch_position_high tmp_s[21];m_firecontrol_to_terminal-weapon_azimuth_position_low tmp_s[22];m_firecontrol_to_terminal-weapon_azimuth_position_high tmp_s[23];m_firecontrol_to_terminal-weapon_pitch_position_low tmp_s[24];m_firecontrol_to_terminal-weapon_pitch_position_high tmp_s[25];m_firecontrol_to_terminal-platform_pitch tmp_s[26];m_firecontrol_to_terminal-platform_roll_angle tmp_s[27];m_firecontrol_to_terminal-residual_bullet_low tmp_s[28];m_firecontrol_to_terminal-residual_bullet_high tmp_s[29];m_firecontrol_to_terminal-rsve1 tmp_s[30];m_firecontrol_to_terminal-rsve2 tmp_s[31];m_firecontrol_to_terminal-rsve3 tmp_s[32];m_firecontrol_to_terminal-check tmp_s[33];cout doCheck: send_address tmp_s endl; // emit sig_check(data1);}} }vectorSerialPortInfo SSerialPort::getSerialPortList() {vectorSerialPortInfo portNameList CSerialPortInfo::availablePortInfos();for (size_t i 0; i portNameList.size(); i) {cout getSerialPortList: portNameList[i].portName endl;}if ( portNameList.size() 0 ) {cout getSerialPortList is Null endl;}return portNameList; }bool SSerialPort::openSerialPort(const char *portName, int baudRate, Parity parity, DataBits dataBits, StopBits stopbits, FlowControl flowControl, unsigned int readBufferSize, int timeout) {cout openSerialPort-----------------------------------start endl;bool isOpen false;if(getSerialPortList().size() 0) {m_SerialPort.init(portName, baudRate, parity, dataBits, stopbits, flowControl, readBufferSize);cout portName: portName endl;cout baudRate: baudRate endl;cout parity: parity endl;cout dataBits: dataBits endl;cout stopbits: stopbits endl;cout flowControl: flowControl endl;cout readBufferSize: readBufferSize endl;m_SerialPort.setReadIntervalTimeout(timeout);isOpen m_SerialPort.open();if(!isOpen) {cerr open port error m_SerialPort.getLastError() m_SerialPort.getLastErrorMsg() endl;}} else {cerr This Computer no avaiable port! endl;}cout openSerialPort-----------------------------------end endl;return isOpen; }void SSerialPort::closeSerialPort() {m_SerialPort.close(); }void SSerialPort::onReadEvent(const char *portName, unsigned int readBufferLen) {cout onReadEvent: portName readBufferLen endl;if(readBufferLen 0) {unsigned long recLen 0;char * str NULL;str new char[readBufferLen];recLen m_SerialPort.readData(str, readBufferLen);if(recLen 0) {// TODO: 中文需要由两个字符拼接否则显示为空cout onReadEvent: portName str recLen endl;doCheck(str, recLen);} else {}if(str) {delete[] str;str NULL;}} }void SSerialPort::sendMessage() {char message[50];if(m_SerialPort.isOpen()) {// 伺服旋转限制// 高位低位赋值m_terminal_to_firecontrol-packet_frame_number_low m_packet_frame_count 0x00ff;m_terminal_to_firecontrol-packet_frame_number_high (m_packet_frame_count 8) 0x00ff;message[0] m_firstChar;message[1] m_secondChar;message[2] m_thirdChar;cout m_terminal_to_firecontrol-packet_frame_number_low: m_terminal_to_firecontrol-packet_frame_number_low endl;message[3] m_terminal_to_firecontrol-packet_frame_number_low;message[4] m_terminal_to_firecontrol-packet_frame_number_high;message[5] m_terminal_to_firecontrol-light_aiming_control_word_1.all;//变化message[6] m_terminal_to_firecontrol-light_aiming_control_word_2.all;message[7] m_terminal_to_firecontrol-light_aiming_control_word_3.all;message[8] m_terminal_to_firecontrol-servo_control_word_1.all;message[9] m_terminal_to_firecontrol-servo_control_word_2.all;message[10] m_terminal_to_firecontrol-chassis_control_word_1.all;message[11] m_terminal_to_firecontrol-relay_control_word.all;message[12] m_terminal_to_firecontrol-light_azimuth_rotation_speed_low;message[13] m_terminal_to_firecontrol-light_azimuth_rotation_speed_high;message[14] m_terminal_to_firecontrol-light_pitch_rotation_speed_low;message[15] m_terminal_to_firecontrol-light_pitch_rotation_speed_high;message[16] m_terminal_to_firecontrol-fan_sweep_azimuth_setting_Angle;message[17] m_terminal_to_firecontrol-fan_sweep_azimuth_fu_setting_Angle;message[18] m_terminal_to_firecontrol-fan_sweep_pitch_setting_Angle;message[19] m_terminal_to_firecontrol-fan_sweep_pitch_fu_setting_Angle;message[20] m_terminal_to_firecontrol-quick_boot_azimuth_coordinates_low;message[21] m_terminal_to_firecontrol-quick_boot_azimuth_coordinates_high;message[22] m_terminal_to_firecontrol-quick_boot_pitch_coordinates_low;message[23] m_terminal_to_firecontrol-quick_boot_pitch_coordinates_high;message[24] m_terminal_to_firecontrol-left_track_speed_low;message[25] m_terminal_to_firecontrol-left_track_speed_high;message[26] m_terminal_to_firecontrol-right_track_speed_low;message[27] m_terminal_to_firecontrol-right_track_speed_high;message[28] m_terminal_to_firecontrol-forward_arm_speed;message[29] m_terminal_to_firecontrol-back_arm_speed;message[30] m_terminal_to_firecontrol-residual_low;message[31] m_terminal_to_firecontrol-residual_high;message[32] m_terminal_to_firecontrol-azimuth_correction;message[33] m_terminal_to_firecontrol-pitch_correction;message[34] m_terminal_to_firecontrol-delay_correction;message[35] m_terminal_to_firecontrol-light_aiming_control_word_4.all;message[36] m_terminal_to_firecontrol-light_aiming_control_word_5.all;message[37] m_terminal_to_firecontrol-servo_azimuth_rotation_speed_low;message[38] m_terminal_to_firecontrol-servo_azimuth_rotation_speed_high;message[39] m_terminal_to_firecontrol-servo_pitch_rotation_speed_low;message[40] m_terminal_to_firecontrol-servo_pitch_rotation_speed_high;message[41] m_terminal_to_firecontrol-firing_servo_start_low;message[42] m_terminal_to_firecontrol-firing_servo_start_high;message[43] m_terminal_to_firecontrol-firing_servo_stop_low;message[44] m_terminal_to_firecontrol-firing_servo_stop_high;message[45] m_terminal_to_firecontrol-firing_insurance_close_low;message[46] m_terminal_to_firecontrol-firing_insurance_close_high;message[47] m_terminal_to_firecontrol-firing_insurance_open_low;message[48] m_terminal_to_firecontrol-firing_insurance_open_high;int data 0;for( int i 0; i 49; i ) {cout sendMessage: message[i] endl;data data message[i];}message[49] data 0x7f;int length sizeof(message)/sizeof(char);if( !m_flag_serialport ) {// 支持中文并获取正确的长度m_SerialPort.writeData(message, length);} else {}if( m_packet_frame_count 0xffff ) {m_packet_frame_count 1;} else {m_packet_frame_count;}cout sendMessage: message length: length endl;} else {cerr please open serial port first! endl;} }void SSerialPort::readAllData() {int recLen 0;char str[4096] {0};recLen m_SerialPort.readAllData(str);if(recLen 0) {// TODO: 中文需要由两个字符拼接否则显示为空cout readAllData: str length: recLen endl;doCheck(str, recLen);} else {} }void SSerialPort::setSync(bool isSync) {if(isSync) {m_SerialPort.setOperateMode(itas109::SynchronousOperate);} else {m_SerialPort.setOperateMode(itas109::AsynchronousOperate);} }void SSerialPort::setDTR(bool isDTR) {m_SerialPort.setDtr(isDTR); }void SSerialPort::setRTS(bool isRTS) {m_SerialPort.setRts(isRTS); }void SSerialPort::initSerialPort() { #ifdef WIN32this-openSerialPort(COM3, 115200, itas109::ParityNone,itas109::DataBits8, itas109::StopOne); #elsethis-openSerialPort(/dev/ttyUSB0, 115200, itas109::ParityNone,itas109::DataBits8, itas109::StopOne); #endif }void SSerialPort::initSendMessage() {cout initSendMessage-----------------------------------start endl;m_packet_frame_count 1;m_terminal_to_firecontrol (struct TERMINAL_TO_FIRECONTROL*)malloc(sizeof(struct TERMINAL_TO_FIRECONTROL));m_firecontrol_to_terminal (struct FIRECONTROL_TO_TERMINAL*)malloc(sizeof(struct FIRECONTROL_TO_TERMINAL));m_terminal_to_firecontrol-send_address m_firstChar;m_terminal_to_firecontrol-receive_address m_secondChar;m_terminal_to_firecontrol-packet_length m_thirdChar;m_terminal_to_firecontrol-packet_frame_number_low 1;std::cout std::hex std::setw(2) std::setfill(0) static_castint(m_terminal_to_firecontrol-packet_frame_number_low)endl;m_terminal_to_firecontrol-packet_frame_number_high 0;m_terminal_to_firecontrol-light_aiming_control_word_1.all 0x01;m_terminal_to_firecontrol-light_aiming_control_word_2.all 0x00;m_terminal_to_firecontrol-light_aiming_control_word_3.all 0x00;m_terminal_to_firecontrol-servo_control_word_1.all 0x09;m_terminal_to_firecontrol-servo_control_word_2.all 0x02;m_terminal_to_firecontrol-chassis_control_word_1.all 0x00;m_terminal_to_firecontrol-relay_control_word.all 0x00;m_terminal_to_firecontrol-light_azimuth_rotation_speed_low 0x00;m_terminal_to_firecontrol-light_azimuth_rotation_speed_high 0X00;m_terminal_to_firecontrol-light_pitch_rotation_speed_low 0;m_terminal_to_firecontrol-light_pitch_rotation_speed_high 0;m_terminal_to_firecontrol-fan_sweep_azimuth_setting_Angle 0;m_terminal_to_firecontrol-fan_sweep_azimuth_fu_setting_Angle 0;m_terminal_to_firecontrol-fan_sweep_pitch_setting_Angle 0;m_terminal_to_firecontrol-fan_sweep_pitch_fu_setting_Angle 0;m_terminal_to_firecontrol-quick_boot_azimuth_coordinates_low 0;m_terminal_to_firecontrol-quick_boot_azimuth_coordinates_high 0;m_terminal_to_firecontrol-quick_boot_pitch_coordinates_low 0;m_terminal_to_firecontrol-quick_boot_pitch_coordinates_high 0;m_terminal_to_firecontrol-left_track_speed_low 0;m_terminal_to_firecontrol-left_track_speed_high 0;m_terminal_to_firecontrol-right_track_speed_low 0;m_terminal_to_firecontrol-right_track_speed_high 0;m_terminal_to_firecontrol-forward_arm_speed 0;m_terminal_to_firecontrol-back_arm_speed 0;m_terminal_to_firecontrol-residual_low 0;m_terminal_to_firecontrol-residual_high 0;m_terminal_to_firecontrol-azimuth_correction 0;m_terminal_to_firecontrol-pitch_correction 0;m_terminal_to_firecontrol-delay_correction 0;m_terminal_to_firecontrol-light_aiming_control_word_4.all 0;m_terminal_to_firecontrol-light_aiming_control_word_5.all 0;m_terminal_to_firecontrol-servo_azimuth_rotation_speed_low 0x00;m_terminal_to_firecontrol-servo_azimuth_rotation_speed_high 0x00;m_terminal_to_firecontrol-servo_pitch_rotation_speed_low 0;m_terminal_to_firecontrol-servo_pitch_rotation_speed_high 0;m_terminal_to_firecontrol-firing_servo_start_low 0;m_terminal_to_firecontrol-firing_servo_start_high 0;m_terminal_to_firecontrol-firing_servo_stop_low 0;m_terminal_to_firecontrol-firing_servo_stop_high 0;m_terminal_to_firecontrol-firing_insurance_close_low 0;m_terminal_to_firecontrol-firing_insurance_close_high 0;m_terminal_to_firecontrol-firing_insurance_open_low 0;m_terminal_to_firecontrol-firing_insurance_open_high 0;;m_terminal_to_firecontrol-check 0;cout initSendMessage-----------------------------------end endl; } 4.4、Linux下的CMakeLists.txt cmake_minimum_required(VERSION 3.0.2) project(electro_optical_system)## Compile as C11, supported in ROS Kinetic and newer add_compile_options(-stdc11)## Find catkin macros and libraries ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTSroscpprospystd_msgs )## System dependencies are found with CMakes conventions # find_package(Boost REQUIRED COMPONENTS system) find_package(OpenCV REQUIRED)## Uncomment this if the package has a setup.py. This macro ensures ## modules and global scripts declared therein get installed ## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html # catkin_python_setup()################################################ ## Declare ROS messages, services and actions ## ################################################## To declare and build messages, services or actions from within this ## package, follow these steps: ## * Let MSG_DEP_SET be the set of packages whose message types you use in ## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). ## * In the file package.xml: ## * add a build_depend tag for message_generation ## * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET ## * If MSG_DEP_SET isnt empty the following dependency has been pulled in ## but can be declared for certainty nonetheless: ## * add a exec_depend tag for message_runtime ## * In this file (CMakeLists.txt): ## * add message_generation and every package in MSG_DEP_SET to ## find_package(catkin REQUIRED COMPONENTS ...) ## * add message_runtime and every package in MSG_DEP_SET to ## catkin_package(CATKIN_DEPENDS ...) ## * uncomment the add_*_files sections below as needed ## and list every .msg/.srv/.action file to be processed ## * uncomment the generate_messages entry below ## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)## Generate messages in the msg folder # add_message_files( # FILES # Message1.msg # Message2.msg # )## Generate services in the srv folder # add_service_files( # FILES # Service1.srv # Service2.srv # )## Generate actions in the action folder # add_action_files( # FILES # Action1.action # Action2.action # )## Generate added messages and services with any dependencies listed here # generate_messages( # DEPENDENCIES # std_msgs # )################################################ ## Declare ROS dynamic reconfigure parameters ## ################################################## To declare and build dynamic reconfigure parameters within this ## package, follow these steps: ## * In the file package.xml: ## * add a build_depend and a exec_depend tag for dynamic_reconfigure ## * In this file (CMakeLists.txt): ## * add dynamic_reconfigure to ## find_package(catkin REQUIRED COMPONENTS ...) ## * uncomment the generate_dynamic_reconfigure_options section below ## and list every .cfg file to be processed## Generate dynamic reconfigure parameters in the cfg folder # generate_dynamic_reconfigure_options( # cfg/DynReconf1.cfg # cfg/DynReconf2.cfg # )################################### ## catkin specific configuration ## ################################### ## The catkin_package macro generates cmake config files for your package ## Declare things to be passed to dependent projects ## INCLUDE_DIRS: uncomment this if your package contains header files ## LIBRARIES: libraries you create in this project that dependent projects also need ## CATKIN_DEPENDS: catkin_packages dependent projects also need ## DEPENDS: system dependencies of this project that dependent projects also need catkin_package( # INCLUDE_DIRS include # LIBRARIES electro_optical_system # CATKIN_DEPENDS roscpp rospy std_msgs # DEPENDS system_lib )########### ## Build ## ############# Specify additional locations of header files ## Your package locations should be listed before other locations include_directories( # include${catkin_INCLUDE_DIRS} )## Declare a C library # add_library(${PROJECT_NAME} # src/${PROJECT_NAME}/electro_optical_system.cpp # )## Add cmake target dependencies of the library ## as an example, code may need to be generated before libraries ## either from message generation or dynamic reconfigure # add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})## Declare a C executable ## With catkin_make all packages are built within a single CMake context ## The recommended prefix ensures that target names across packages dont collide # add_executable(${PROJECT_NAME}_node src/electro_optical_system_node.cpp)## Rename C executable without prefix ## The above recommended prefix causes long target names, the following renames the ## target back to the shorter version for ease of user use ## e.g. rosrun someones_pkg node instead of rosrun someones_pkg someones_pkg_node # set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX )## Add cmake target dependencies of the executable ## same as for the library above # add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})## Specify libraries to link a library or executable target against # target_link_libraries(${PROJECT_NAME}_node # ${catkin_LIBRARIES} # )############# ## Install ## ############## all install targets should use catkin DESTINATION variables # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html## Mark executable scripts (Python etc.) for installation ## in contrast to setup.py, you can choose the destination # catkin_install_python(PROGRAMS # scripts/my_python_script # DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} # )## Mark executables for installation ## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html # install(TARGETS ${PROJECT_NAME}_node # RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} # )## Mark libraries for installation ## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html # install(TARGETS ${PROJECT_NAME} # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} # RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} # )## Mark cpp header files for installation # install(DIRECTORY include/${PROJECT_NAME}/ # DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} # FILES_MATCHING PATTERN *.h # PATTERN .svn EXCLUDE # )## Mark other files for installation (e.g. launch and bag files, etc.) # install(FILES # # myfile1 # # myfile2 # DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} # )############# ## Testing ## ############### Add gtest based cpp test target and link libraries # catkin_add_gtest(${PROJECT_NAME}-test test/test_electro_optical_system.cpp) # if(TARGET ${PROJECT_NAME}-test) # target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) # endif()## Add folders to be run by python nosetests # catkin_add_nosetests(test) add_executable(EOS src/main.cpp src/jsserialport.cpp src/CSerialPort/SerialPort.cpp src/CSerialPort/SerialPortInfo.cpp src/CSerialPort/SerialPortUnixBase.cpp src/CSerialPort/SerialPortBase.cpp src/CSerialPort/SerialPortInfoUnixBase.cpp src/CSerialPort/SerialPortInfoBase.cpp) target_link_libraries(EOS ${catkin_LIBRARIES}${OpenCV_LIBS}) add_dependencies(EOS ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/web/84766.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

网站首页调用网站标题网络管理系统密码

当我们谈论设置MySQL数据库的IP白名单时,我们通常是在指定哪些IP地址被允许连接到数据库服务器。这是一种安全措施,可确保只有受信任的主机可以访问数据库。以下是一个分步指南,以及如何设置MySQL的IP白名单的说明。 步骤1: 登录到MySQL服务…

乐清 网站建设英德建设网站

蓄水池抽样算法 描述Java基本实现蓄水池模型参与抽样 描述 该算法可用于从数据流中随机抽取指定数量的样本。 假设目标样本数量为 n,参与抽样的数量为 i。 蓄水池容量为 n,参与抽样的数量为 i 每接收一个样本,不断计算抽样结果:…

seo网站有哪些视频拍摄方案

GAN论文逐段精读【论文精读】这是李沐博士论文精读的第五篇论文,这次精读的论文是 GAN。目前谷歌学术显示其被引用数已经达到了37000。GAN 应该是机器学习过去五年上头条次数最多的工作,例如抖音里面生成人物卡通头像,人脸互换以及自动驾驶中…

简单企业网站福建省住房和城乡建设厅网站电话

1. 描述Kubernetes集群中连接数不够的情况,以及可能导致的后果。 在Kubernetes集群中,连接数不够通常指的是网络连接的限制,这可能是由于以下几个原因造成的: 负载过高:当服务或应用承受的请求量超过其能够处理的范围…

网站栏目页模板七牛云招聘

在编程中,super关键字通常用于引用父类(超类)的属性或方法。以下是在不同语言中super关键字的使用示例: JavaScript (ES6 Class Syntax) Javascript 1class Parent { 2 display() { 3 console.log("Parent class…

机票旅游网站开发网页游戏排行榜 2020

1、打开我们的项目所在文件夹 2、在项目文件夹【鼠标右击】弹出菜单,在【鼠标右击】弹出的菜单中,点击【Git Bash Here】,弹出运行窗口(前提条件是已装好git环境) 3、在命令窗口中输入:git init 4、在 Gite…

公司设计网站需要注意哪些电子商务具体是干什么的

play 打包 模块早在11月,我就Play框架的 Nicolas Leroux谈到了如何创建模块存储库。 他同意这将是一个好主意,但是时间不足使我无法开始。 在上周Google Play小组发生了暴风雨之后,我决定将其优先处理。 可以在几周内提供可用的原型。 概述&a…

网络公司怎样推广网站网站建设的关键事项

目录 判断字符是否唯⼀(easy) 题目解析 讲解算法原理 编写代码 丢失的数字(easy) 题目解析 讲解算法原理 编写代码 判断字符是否唯⼀(easy) 题目解析 1.题目链接:. - 力扣&#xff08…

河南网站推广优化公司哪家好做网站编辑需要学什么

如果有遗漏,评论区告诉我进行补充 面试官: Mysql是如何回滚事务的? 我回答: 在MySQL中,事务回滚是一个重要的机制,用于在发生错误或异常时撤销所有未提交的更改,确保数据库的一致性和完整性。事务回滚的过程涉及多个内部机制和数据结构&a…

深圳营销网站制作专做国外旅游的网站

C 标准库 <math.h> C <math.h>头文件声明了一组函数来执行数学运算&#xff0c;例如&#xff1a;sqrt()计算平方根&#xff0c;log()查找数字的自然对数&#xff0c;等等。 math.h 头文件定义了各种数学函数和一个宏。在这个库中所有可用的函数都带有一个 double…

广州有做网站的公司吗企业官网下载

GPMC并口简介 GPMC(General Purpose Memory Controller)是TI处理器特有的通用存储器控制器接口&#xff0c;支持8/16bit数据位宽&#xff0c;支持128MB访问空间&#xff0c;最高时钟速率133MHz。GPMC是AM62x、AM64x、AM437x、AM335x、AM57x等处理器专用于与外部存储器设备的接口…

上海大型网站建设公司排名wordpress建cms

模运算 模运算是大数运算中的常用操作。如果一个数太大&#xff0c;无法直接输出&#xff0c;或者不需要直接输出&#xff0c;则可以对它取模&#xff0c;缩小数值再输出。取模可以防止溢出&#xff0c;这是常见的操作。 模是英文mod的音译&#xff0c;取模实际上是求余。 取…

青岛网站优化大型网站建设的价格

阿里妹导读&#xff1a;技术传播的价值&#xff0c;不仅仅体现在通过商业化产品和开源项目来缩短我们构建应用的路径&#xff0c;加速业务的上线速率&#xff0c;也体现在优秀工程师在工作效率提升、产品性能优化和用户体验改善等经验方面的分享&#xff0c;以提高我们的专业能…

济南企业如何建网站怎么样做网站管理员

一、认识存储单元指针是C语言最显著的特色。要理解指针的概念&#xff0c;需要先理解计算机读写内存的的方式以及变量的概念。计算机内存是以字节为单位划分内存单元的&#xff0c;每个内存单元占用一个字节&#xff0c;每个内存单元都有自己的地址编号&#xff0c;操作系统或软…

摄像头怎么做直播网站做网站运营需要培训吗

在linux下一些常用的关机/重启命令有shutdown、halt、reboot、及init&#xff0c;它们都可以达到重启系统的目的&#xff0c;但每个命令的内部工作过程是不同的。 Linux centos重启命令&#xff1a; 1、reboot 2、shutdown -r now 立刻重启(root用户使用) 3、shutdown -r 10 过…

校园网二手书交易网站建设新塘网站设计

&#x1f525;博客主页&#xff1a; 破浪前进 &#x1f516;系列专栏&#xff1a; Vue、React、PHP ❤️感谢大家点赞&#x1f44d;收藏⭐评论✍️ JavaScript是一种非常流行和常用的编程语言&#xff0c;它在web开发中起着至关重要的作用&#xff0c;在实现网页动态交互、数据…

网站的空间与域名北京专门做网站的

因为是我的书包&#xff0c;所以我喜欢JavaScript 。 实际上&#xff0c;我已经开始喜欢JavaScritp的面向异步回调的编程风格 。 因此&#xff0c;当我发现自己处于非JavaScript环境中时&#xff08;例如Java&#xff09; &#xff0c;我往往会错过使用回调的机会。 好消息是…

网站经常修改好不好建设项目环境影响评价公示网站

删除排序链表中的重复元素 题目要求 解题思路 一次遍历 由于给定的链表是排好序的&#xff0c;因此重复的元素在链表中的出现的位置是连续的&#xff0c;因此我们只需要对链表进行一次遍历&#xff0c;就可以删除重复的元素。 具体地&#xff0c;我们从指针cur指向链表的头节…

北京市住房及城乡建设部网站金湖网站制作

源码分析&#xff1a; ThreadLocal中定义了ThreadLocalMap静态内部类&#xff0c;该内部类中又定义了Entry内部类。 ThreadLocalMap定了 Entry数组。 Set方法&#xff1a; Get方法&#xff1a; Thread中定义了两个ThreaLocalMap成员变量&#xff1a; Spring使用ThreadLocal解…