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

linux 网站服务器搭建外网加速

linux 网站服务器搭建,外网加速,类似于美团的网站怎么做,企业官方网站系统建设以下代码实现了#xff1a;Interactive Marker通过topic一直发送其状态#xff0c;而不只是交互时才发送。 几个要点#xff1a; 通过定时器rospy.Timer实现PublishInteractiveMarkerServer feedback.pose的类型是geometry_msgs/Pose#xff0c;而不是geometry_msgs/PoseS…以下代码实现了Interactive Marker通过topic一直发送其状态而不只是交互时才发送。 几个要点 通过定时器rospy.Timer实现PublishInteractiveMarkerServer feedback.pose的类型是geometry_msgs/Pose而不是geometry_msgs/PoseStamped #!/usr/bin/env pythonimport rospy import copyfrom interactive_markers.interactive_marker_server import * from visualization_msgs.msg import * from geometry_msgs.msg import Point from geometry_msgs.msg import Poseclass ObstaclePublisher:def __init__(self, obs_init_position: list):# self.server Noneself.server InteractiveMarkerServer(obstacle_controls)position Point(obs_init_position[0], obs_init_position[1], obs_init_position[2])# include orientation# self.make6DofMarker(False, InteractiveMarkerControl.MOVE_ROTATE_3D, position, True)# without orientationself.make6DofMarker(False, InteractiveMarkerControl.MOVE_3D, position, False)self.ps Pose()self.ps.position position# a topic to publish obstacles pose all the timeself.pub rospy.Publisher(/obstacle_pose, Pose, queue_size1)rospy.Timer(rospy.Duration(0.02), self.publish_obs_pose)rospy.loginfo(Publishing pose of the obstacle at topic: str(self.pub.name))self.server.applyChanges()def processFeedback(self, feedback):rospy.loginfo(You are operating the obstacle.)self.ps feedback.poseself.server.applyChanges()def makeBox(self, msg):marker Marker()marker.type Marker.SPHEREmarker.scale.x msg.scale * 0.2marker.scale.y msg.scale * 0.2marker.scale.z msg.scale * 0.2marker.color.r 0.8marker.color.g 0.1marker.color.b 0.1marker.color.a 1.0return markerdef makeBoxControl(self, msg):control InteractiveMarkerControl()control.always_visible Truecontrol.markers.append(self.makeBox(msg))msg.controls.append(control)return control###################################################################### Marker Creationdef normalizeQuaternion(self, quaternion_msg):norm quaternion_msg.x**2 quaternion_msg.y**2 quaternion_msg.z**2 quaternion_msg.w**2s norm ** (-0.5)quaternion_msg.x * squaternion_msg.y * squaternion_msg.z * squaternion_msg.w * sdef make6DofMarker(self, fixed, interaction_mode, position, show_6dofFalse):int_marker InteractiveMarker()int_marker.header.frame_id worldint_marker.pose.position positionint_marker.scale 1int_marker.name Obstacleint_marker.description Obstacle# insert a obstacleself.makeBoxControl(int_marker)int_marker.controls[0].interaction_mode interaction_modeif show_6dof:control InteractiveMarkerControl()control.orientation.w 1control.orientation.x 1control.orientation.y 0control.orientation.z 0self.normalizeQuaternion(control.orientation)control.name rotate_xcontrol.interaction_mode InteractiveMarkerControl.ROTATE_AXISif fixed:control.orientation_mode InteractiveMarkerControl.FIXEDint_marker.controls.append(control)control InteractiveMarkerControl()control.orientation.w 1control.orientation.x 1control.orientation.y 0control.orientation.z 0self.normalizeQuaternion(control.orientation)control.name move_xcontrol.interaction_mode InteractiveMarkerControl.MOVE_AXISif fixed:control.orientation_mode InteractiveMarkerControl.FIXEDint_marker.controls.append(control)control InteractiveMarkerControl()control.orientation.w 1control.orientation.x 0control.orientation.y 1control.orientation.z 0self.normalizeQuaternion(control.orientation)control.name rotate_zcontrol.interaction_mode InteractiveMarkerControl.ROTATE_AXISif fixed:control.orientation_mode InteractiveMarkerControl.FIXEDint_marker.controls.append(control)control InteractiveMarkerControl()control.orientation.w 1control.orientation.x 0control.orientation.y 1control.orientation.z 0self.normalizeQuaternion(control.orientation)control.name move_zcontrol.interaction_mode InteractiveMarkerControl.MOVE_AXISif fixed:control.orientation_mode InteractiveMarkerControl.FIXEDint_marker.controls.append(control)control InteractiveMarkerControl()control.orientation.w 1control.orientation.x 0control.orientation.y 0control.orientation.z 1self.normalizeQuaternion(control.orientation)control.name rotate_ycontrol.interaction_mode InteractiveMarkerControl.ROTATE_AXISif fixed:control.orientation_mode InteractiveMarkerControl.FIXEDint_marker.controls.append(control)control InteractiveMarkerControl()control.orientation.w 1control.orientation.x 0control.orientation.y 0control.orientation.z 1self.normalizeQuaternion(control.orientation)control.name move_ycontrol.interaction_mode InteractiveMarkerControl.MOVE_AXISif fixed:control.orientation_mode InteractiveMarkerControl.FIXEDint_marker.controls.append(control)self.server.insert(int_marker, self.processFeedback)def publish_obs_pose(self, *args):self.pub.publish(self.ps)if __name__ __main__:rospy.init_node(obstacle_controls)op ObstaclePublisher([0.6, 0.6, 0.6])rospy.spin()
http://www.hkea.cn/news/14570891/

相关文章:

  • 可以做兼职的网站有哪些工作怎样给自己的网站做防红连接
  • 济南建设集团招聘信息网站利尔化学股票
  • 用钩针做花网站微信从事网站开发需要什么
  • 好用的磁力搜索引擎谷歌seo是做什么的
  • 怎么把在EXCEL做的查询系统做到网站上郑州网站建设工作室
  • 怀化职院网站百度云打开的wordpress
  • 网站建设买阿里云云服务器张家港网站建设
  • 建设学校网站前的需求分析报告找人做网站 自己购买服务器
  • wordpress有留言时邮件提醒宁波seo怎么选
  • 电子商务网站建设技能实训答案家具设计软件
  • 重庆最大的网站制作公司seo排名培训公司
  • 怎样做的英文网站商品seo关键词优化
  • 济宁网站建设制作设计百度动态排名软件
  • 哪个网站做餐饮推广最好母婴网站源码php
  • 门户网站样式马鞍山网站开发流程
  • 湖北智能网站建设制作星月教你做网站的文档
  • 超市网站建设策划书wordpress模板怎么修改字体
  • 浙江专业网页设计免费建站jquery上传wordpress
  • 图片设计师网站大学校园门户网站建设方案
  • 网站类网站建设pr值高的网站
  • 专业做物业网站的公司莆田建设信息网站
  • 狼人最新网站wordpress 页面生成器
  • 网站建设公司电话咨询android网站开发实例
  • 网站商城建设如何避免内部竞争网站开发外包合同
  • 德兴市建设局网站佛山网站建设锐艺a068
  • 百度站长工具使用方法快站如何做网站
  • 工程建筑公司网站网站主页设计布局图
  • 全国城市雕塑建设官方网站网站怎么做移动端的
  • 德州手机网站建设报价大眼睛网站建设
  • 写小说的小网站wordpress 安装要求