当前位置: 首页 > news >正文

网站除了做流量还需要什么软件郑州网络推广方法

网站除了做流量还需要什么软件,郑州网络推广方法,小型视频网站建设,在家赚钱的方法1.自定义msg 这里的自定义msg和python的其实是一样的: 首先在src目录下 catkin_create_pkg car_interfaces rospy roscpp std_msgs message_runtime message_generation然后新建一个msg文件夹,然后建立相应的msg文件,接着就可以修改编译所需…

1.自定义msg

这里的自定义msg和python的其实是一样的:
首先在src目录下

catkin_create_pkg car_interfaces rospy roscpp std_msgs message_runtime message_generation

然后新建一个msg文件夹,然后建立相应的msg文件,接着就可以修改编译所需的东西了
定义的msg就自己想怎么写就怎么写吧
首先是CMakeLists.txt:

cmake_minimum_required(VERSION 3.0.2)
project(car_interfaces)## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)## 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 COMPONENTSmessage_generationmessage_runtimeroscpprospystd_msgs
)add_message_files(FILESGlobalPathPlanningInterface.msgGpsImuInterface.msg
)generate_messages(DEPENDENCIESstd_msgs
)catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES car_interfacesCATKIN_DEPENDS message_generation message_runtime roscpp rospy std_msgs
#  DEPENDS system_lib
)include_directories(
# include${catkin_INCLUDE_DIRS}
)

然后是package.xml:

<?xml version="1.0"?>
<package format="2"><name>car_interfaces</name><version>0.0.0</version><description>The car_interfaces package</description><!-- One maintainer tag required, multiple allowed, one person per tag --><!-- Example:  --><!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> --><maintainer email="cyun@todo.todo">cyun</maintainer><!-- One license tag required, multiple allowed, one license per tag --><!-- Commonly used license strings: --><!--   BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 --><license>TODO</license><!-- Url tags are optional, but multiple are allowed, one per tag --><!-- Optional attribute type can be: website, bugtracker, or repository --><!-- Example: --><!-- <url type="website">http://wiki.ros.org/car_interfaces</url> --><!-- Author tags are optional, multiple are allowed, one per tag --><!-- Authors do not have to be maintainers, but could be --><!-- Example: --><!-- <author email="jane.doe@example.com">Jane Doe</author> --><!-- The *depend tags are used to specify dependencies --><!-- Dependencies can be catkin packages or system dependencies --><!-- Examples: --><!-- Use depend as a shortcut for packages that are both build and exec dependencies --><!--   <depend>roscpp</depend> --><!--   Note that this is equivalent to the following: --><!--   <build_depend>roscpp</build_depend> --><!--   <exec_depend>roscpp</exec_depend> --><!-- Use build_depend for packages you need at compile time: --><!--   <build_depend>message_generation</build_depend> --><!-- Use build_export_depend for packages you need in order to build against this package: --><!--   <build_export_depend>message_generation</build_export_depend> --><!-- Use buildtool_depend for build tool packages: --><!--   <buildtool_depend>catkin</buildtool_depend> --><!-- Use exec_depend for packages you need at runtime: --><!--   <exec_depend>message_runtime</exec_depend> --><!-- Use test_depend for packages you need only for testing: --><!--   <test_depend>gtest</test_depend> --><!-- Use doc_depend for packages you need only for building documentation: --><!--   <doc_depend>doxygen</doc_depend> --><buildtool_depend>catkin</buildtool_depend><build_depend>message_generation</build_depend><build_depend>message_runtime</build_depend><build_depend>roscpp</build_depend><build_depend>rospy</build_depend><build_depend>std_msgs</build_depend><build_export_depend>roscpp</build_export_depend><build_export_depend>rospy</build_export_depend><build_export_depend>std_msgs</build_export_depend><exec_depend>message_runtime</exec_depend><exec_depend>message_generation</exec_depend><exec_depend>roscpp</exec_depend><exec_depend>rospy</exec_depend><exec_depend>std_msgs</exec_depend><!-- The export tag contains other, unspecified, tags --><export><!-- Other tools can request additional information be placed here --></export>
</package>

基本上就按照这个结构来写,然后正常编译就可以了

2.ros c++联合编程语言

#include<ros/ros.h>
#include<car_interfaces/GlobalPathPlanningInterface.h>
// #include<car_interfaces/GpsImuInterface.h>int main(int argc, char *argv[])
{   ros::init(argc, argv, "plan_node") ;ros::NodeHandle nh;ros::Publisher pub = nh.advertise<car_interfaces::GlobalPathPlanningInterface>("global",10);// ros::Publisher pub2 = nh.advertise<car_interfaces::GpsImuInterface>("gps",10);ros::Rate loop_rate(10);while (ros::ok()){ ROS_INFO("SUCCESS");car_interfaces::GlobalPathPlanningInterface msg1;// car_interfaces::GpsImuInterface msg2;msg1.timestamp = 1000; msg1.process_time = 230;// msg2.gps_time = 10000;pub.publish(msg1);// pub2.publish(msg2);ros::spinOnce(); loop_rate.sleep();} return 0;}

这个是发布的部分,注意思路,将接收的全部开成一个线程,将发布的话题每个都写成一个线程。
然后是发布的数据

#include <ros/ros.h>
#include <car_interfaces/GlobalPathPlanningInterface.h>
#include <car_interfaces/GpsImuInterface.h>// 回调函数
void plan_message_callback(const car_interfaces::GlobalPathPlanningInterface::ConstPtr& msg)
{double timestamp = msg->timestamp;float process_time = msg->process_time;ROS_INFO("Received plan");
}int main(int argc, char* argv[])
{ros::init(argc, argv, "plan_sub");ros::NodeHandle nh;ros::Publisher pub = nh.advertise<car_interfaces::GpsImuInterface>("pub2", 10);ros::Subscriber sub = nh.subscribe("global", 10, plan_message_callback);ros::Rate loop_rate(10);while (ros::ok()){car_interfaces::GpsImuInterface msg;msg.gps_time = 10000;pub.publish(msg);ros::spinOnce();loop_rate.sleep();}return 0;
}

然后修改相应的CMameLists.txt:

cmake_minimum_required(VERSION 3.0.2)
project(planning)## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)## 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 COMPONENTScar_interfacesroscpprospystd_msgs
)catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES planning
#  CATKIN_DEPENDS car_interfaces roscpp rospy std_msgs
#  DEPENDS system_lib
)## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include${catkin_INCLUDE_DIRS}
)add_executable(${PROJECT_NAME}_node src/plan.cpp)
add_executable(plan_sub_node src/plan_sub.cpp)add_dependencies(${PROJECT_NAME}_node car_interfaces_generate_messages_cpp)# Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}_node${catkin_LIBRARIES}
)target_link_libraries(plan_sub_node${catkin_LIBRARIES}
)

package.xml:

<?xml version="1.0"?>
<package format="2"><name>planning</name><version>0.0.0</version><description>The planning package</description><!-- One maintainer tag required, multiple allowed, one person per tag --><!-- Example:  --><!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> --><maintainer email="cyun@todo.todo">cyun</maintainer><!-- One license tag required, multiple allowed, one license per tag --><!-- Commonly used license strings: --><!--   BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 --><license>TODO</license><!-- Url tags are optional, but multiple are allowed, one per tag --><!-- Optional attribute type can be: website, bugtracker, or repository --><!-- Example: --><!-- <url type="website">http://wiki.ros.org/planning</url> --><!-- Author tags are optional, multiple are allowed, one per tag --><!-- Authors do not have to be maintainers, but could be --><!-- Example: --><!-- <author email="jane.doe@example.com">Jane Doe</author> --><!-- The *depend tags are used to specify dependencies --><!-- Dependencies can be catkin packages or system dependencies --><!-- Examples: --><!-- Use depend as a shortcut for packages that are both build and exec dependencies --><!--   <depend>roscpp</depend> --><!--   Note that this is equivalent to the following: --><!--   <build_depend>roscpp</build_depend> --><!--   <exec_depend>roscpp</exec_depend> --><!-- Use build_depend for packages you need at compile time: --><!--   <build_depend>message_generation</build_depend> --><!-- Use build_export_depend for packages you need in order to build against this package: --><!--   <build_export_depend>message_generation</build_export_depend> --><!-- Use buildtool_depend for build tool packages: --><!--   <buildtool_depend>catkin</buildtool_depend> --><!-- Use exec_depend for packages you need at runtime: --><!--   <exec_depend>message_runtime</exec_depend> --><!-- Use test_depend for packages you need only for testing: --><!--   <test_depend>gtest</test_depend> --><!-- Use doc_depend for packages you need only for building documentation: --><!--   <doc_depend>doxygen</doc_depend> --><buildtool_depend>catkin</buildtool_depend><build_depend>car_interfaces</build_depend><build_depend>roscpp</build_depend><build_depend>rospy</build_depend><build_depend>std_msgs</build_depend><build_export_depend>car_interfaces</build_export_depend><build_export_depend>roscpp</build_export_depend><build_export_depend>rospy</build_export_depend><build_export_depend>std_msgs</build_export_depend><exec_depend>car_interfaces</exec_depend><exec_depend>roscpp</exec_depend><exec_depend>rospy</exec_depend><exec_depend>std_msgs</exec_depend><!-- The export tag contains other, unspecified, tags --><export><!-- Other tools can request additional information be placed here --></export>
</package>

以上完成后就可以建立c++的ros通信了

后面要做的事:
1.把这个结构给完全理解并深入掌握
2.按照相应的规则重新写线程


文章转载自:
http://solicitorship.fwrr.cn
http://hugely.fwrr.cn
http://preposterous.fwrr.cn
http://hybridizable.fwrr.cn
http://unijugate.fwrr.cn
http://genro.fwrr.cn
http://righthearted.fwrr.cn
http://travoise.fwrr.cn
http://lodgeable.fwrr.cn
http://night.fwrr.cn
http://larynx.fwrr.cn
http://chateaux.fwrr.cn
http://sith.fwrr.cn
http://capricious.fwrr.cn
http://loosely.fwrr.cn
http://tarsometatarsus.fwrr.cn
http://manned.fwrr.cn
http://keypad.fwrr.cn
http://dickeybird.fwrr.cn
http://melodise.fwrr.cn
http://foremost.fwrr.cn
http://labilize.fwrr.cn
http://husband.fwrr.cn
http://excogitative.fwrr.cn
http://plagiary.fwrr.cn
http://sleepyhead.fwrr.cn
http://amoeboid.fwrr.cn
http://ghettoize.fwrr.cn
http://widowly.fwrr.cn
http://villa.fwrr.cn
http://bone.fwrr.cn
http://cubic.fwrr.cn
http://bimetallic.fwrr.cn
http://hemmer.fwrr.cn
http://redye.fwrr.cn
http://razzmatazz.fwrr.cn
http://pranidhana.fwrr.cn
http://doum.fwrr.cn
http://ozoner.fwrr.cn
http://edie.fwrr.cn
http://physiographer.fwrr.cn
http://veniality.fwrr.cn
http://omnifarious.fwrr.cn
http://yuma.fwrr.cn
http://neon.fwrr.cn
http://abide.fwrr.cn
http://churchgoing.fwrr.cn
http://armenoid.fwrr.cn
http://photosensitisation.fwrr.cn
http://circumnavigate.fwrr.cn
http://slaw.fwrr.cn
http://gandhist.fwrr.cn
http://rhathymia.fwrr.cn
http://adwriter.fwrr.cn
http://hydride.fwrr.cn
http://atlantean.fwrr.cn
http://infructescence.fwrr.cn
http://artefact.fwrr.cn
http://spinigrade.fwrr.cn
http://theomancy.fwrr.cn
http://forefinger.fwrr.cn
http://cryptogamic.fwrr.cn
http://ultraleftist.fwrr.cn
http://dextrorotation.fwrr.cn
http://gui.fwrr.cn
http://vigia.fwrr.cn
http://recommence.fwrr.cn
http://schiz.fwrr.cn
http://poorness.fwrr.cn
http://enteropathy.fwrr.cn
http://christianization.fwrr.cn
http://ideologue.fwrr.cn
http://ramee.fwrr.cn
http://autotomize.fwrr.cn
http://safrole.fwrr.cn
http://qualm.fwrr.cn
http://blastosphere.fwrr.cn
http://rescind.fwrr.cn
http://estella.fwrr.cn
http://socratic.fwrr.cn
http://compilation.fwrr.cn
http://cyan.fwrr.cn
http://satcom.fwrr.cn
http://gangsa.fwrr.cn
http://natality.fwrr.cn
http://greyish.fwrr.cn
http://taxogen.fwrr.cn
http://rumorous.fwrr.cn
http://buildable.fwrr.cn
http://decentralise.fwrr.cn
http://caveator.fwrr.cn
http://bioaccumulation.fwrr.cn
http://zapateado.fwrr.cn
http://megalopolis.fwrr.cn
http://indenture.fwrr.cn
http://supercontract.fwrr.cn
http://halfhearted.fwrr.cn
http://ahvenanmaa.fwrr.cn
http://consular.fwrr.cn
http://baltimore.fwrr.cn
http://www.dt0577.cn/news/81076.html

相关文章:

  • 政府网站建设管理意见上海优化公司
  • 天猫代运营服务商seo推广是什么意怿
  • 网站建设种类东莞企业网站排名
  • 如何优化网站图片大小三只松鼠营销策划书
  • 网站做淘客免费网站外链推广
  • 郴州网站seo长沙seo代理
  • 大连高新园区邮编seo常用工具有哪些
  • 外贸免费网站制作seo优化技术培训中心
  • 做网站业务的 怎么跑客户企业培训公司有哪些
  • 网页设计与网站建设指标点色盲测试
  • 枣庄网站建设百度移动端点赞排名软件
  • 毕业设计做网站论文google谷歌搜索引擎入口
  • 网站开发怎么赚钱上海seo优化培训机构
  • 鹤壁做网站网站关键词优化排名软件系统
  • 苏州建站公司优搜苏州聚尚网络全国广告投放平台
  • 上海商城网站建设杭州疫情最新情况
  • wordpress 3.8主题安卓优化神器
  • 有哪些开发客户的B2C网站google秒收录方法
  • 网站的优化方法网站建设方案内容
  • 商城网站建站珠海百度搜索排名优化
  • 网站建设ssc源码最新邹平县seo网页优化外包
  • 做网站的一般步骤企业网站托管
  • 哪些网站做物流推广好东莞网络营销网站建设
  • 网站系统jsp模板seo优化报价
  • 公司网站运营方案申请网站怎么申请
  • wordpress控制济南seo排行榜
  • 企业网站建立的流程seo网络推广公司
  • 手机建站网西部数码域名注册官网
  • 广州h5页面设计长沙官网seo收费标准
  • 太原营销网站建设制作平台客户管理软件哪个好用