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

应用网站如何做网上推广方法有哪些

应用网站如何做,网上推广方法有哪些,大朗做网站在,温州网站建设企业文章目录 自定义action1. 定义action文件2. 修改 package.xml3. 修改 CMakeLists.txt4. 运行 catkin build5. simple_action_server.py6. simple_action_client.py 测试 自定义action ros 版本#xff1a;kinetic 自定义test包的文件结构如下 |-- test | |-- CMakeLists.t… 文章目录 自定义action1. 定义action文件2. 修改 package.xml3. 修改 CMakeLists.txt4. 运行 catkin build5. simple_action_server.py6. simple_action_client.py 测试 自定义action ros 版本kinetic 自定义test包的文件结构如下 |-- test | |-- CMakeLists.txt | |-- action | | --Timer.action | |-- package.xml | |-- scripts | | |-- simple_action_server.py | | -- simple_action_server.py动作定义文件后缀 .action。其组成和srv非常相似。有关自定义srv见链接。 1. 定义action文件 # the goal: to be sent by the client duration time_to_wait ---# the result: to be sent by the server upon completion duration time_elapsed uint32 updates_sent ---# the feedback: to be sent periodically by the server during execution duration time_elapsed duration time_remaining2. 修改 package.xml 向其中添加如下信息 build_dependactionlib_msgs/build_dependbuild_export_dependactionlib_msgs/build_export_depend3. 修改 CMakeLists.txt find_package(catkin REQUIRED COMPONENTSrospyroscppstd_msgsmessage_generationactionlib_msgs )## Generate actions in the action folder add_action_files(FILESTimer.action )## Generate added messages and services with any dependencies listed here generate_messages(DEPENDENCIESactionlib_msgsstd_msgs # Or other packages containing msgs )catkin_package( # INCLUDE_DIRS include # LIBRARIES testCATKIN_DEPENDS rospy message_runtime std_msgs roscpp actionlib_msgs # DEPENDS system_lib )## Mark executable scripts (Python etc.) for installation ## in contrast to setup.py, you can choose the destination catkin_install_python(PROGRAMSscripts/simple_action_server.pyscripts/simple_action_client.pyDESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} )4. 运行 catkin build 动作被正确编译后会生成6个msgTimerGoal.msg, TimerResult.msg, TimerFeedback.msg, TimerActionFeedback.msg, TimerActionGoal.msg, TimerActionResult.msg。 5. simple_action_server.py #!/usr/bin/env pythonimport rospy import time import actionlib from test.msg import TimerAction, TimerGoal, TimerResultdef do_timer(goal):start_time time.time()time.sleep(goal.time_to_wait.to_sec())result TimerResult()result.time_elapsed rospy.Duration.from_sec(time.time() -start_time)result.updates_sent 0server.set_succeeded(result)rospy.init_node(timer_action_server) server actionlib.SimpleActionServer(timer, TimerAction, do_timer, False) #记得写False server.start() rospy.spin()chmod x simple_action_server.py6. simple_action_client.py #!/usr/bin/env python import rospyimport actionlib from test.msg import TimerAction, TimerGoal, TimerResultrospy.init_node(timer_action_client) client actionlib.SimpleActionClient(timer, TimerAction) client.wait_for_server() goal TimerGoal() goal.time_to_wait rospy.Duration.from_sec(5.0) client.send_goal(goal) client.wait_for_result() print(Time elapsed: %f % (client.get_result().time_elapsed.to_sec()))chmod x simple_action_client.py测试 roscorerosrun test simple_action_client.pyrosrun test simple_action_client.py如下结果
http://www.w-s-a.com/news/216602/

相关文章:

  • 南京免费发布信息网站网站建设与管理职责
  • 无锡市建设培训中心网站企业vi设计是啥
  • 宿松网站建设推荐秒搜科技国家官方网站
  • 网站的服务器选择wordpress文章底部加分享
  • 天津专业的网站建设公司阿里云服务器 wordpress
  • 家教辅导培训网站建设中东跨境电商平台有哪些
  • 商城形式的网站需要多少钱做医药商城网站的公司吗
  • 贵阳网站设计zu97彩票创建网站
  • 网站建设与分工的论文足球世界排名
  • 网站首页添加标签如何用模板建站
  • 官方网站包括哪几个网站泰安的网站建设公司哪家好
  • 域名虚拟服务器做网站如何搭建企业网站
  • 用手机做网站服务器口碑好的常州网站建设
  • 摄影网站的设计与实现开题报告太原企业自助建站
  • 做如美团式网站要多少钱做网站怎么去文化局备案
  • 桂平市住房和城乡建设局网站网站建设与管理自考题
  • 怎么做公司网站制作凡科官方网
  • 达人设计网官方网站建筑效果图网站有哪些
  • 网站定制哪家快建筑室内设计网
  • 网站创建方案论文旅游网站的设计与制作html
  • 网站建设的数据导入导出开发小程序需要多少钱费用
  • 局网站建设进入前十名wordpress user role editor
  • 网站托管如何收费搜一下百度
  • 中国建设劳动协会网站wordpress 区块链媒体
  • 网站开源是什么意思西安做网站科技有限公司
  • 自己怎么用h5做网站肇庆seo
  • 长沙网站seo优化公司东莞企业官方网站建设
  • 网站个人备案材料北京网站推广价格
  • 百度做任务的网站电子工程网网站
  • 中介订制网站开发玉溪网站建设设计