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

做网站每个月可以赚多少百度竞价排名的使用方法

做网站每个月可以赚多少,百度竞价排名的使用方法,外接硬盘做创建立网站,欧美个人网站以下代码实现了:Interactive Marker通过topic一直发送其状态,而不只是交互时才发送。 几个要点: 通过定时器rospy.Timer实现PublishInteractiveMarkerServer feedback.pose的类型是geometry_msgs/Pose,而不是geometry_msgs/PoseS…

以下代码实现了:Interactive Marker通过topic一直发送其状态,而不只是交互时才发送。
几个要点:

  • 通过定时器rospy.Timer实现Publish
  • InteractiveMarkerServer 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 obstacle's pose all the timeself.pub = rospy.Publisher('/obstacle_pose', Pose, queue_size=1)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_6dof=False):int_marker = InteractiveMarker()int_marker.header.frame_id = "world"int_marker.pose.position = positionint_marker.scale = 1int_marker.name = "Obstacle"int_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_x"control.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_x"control.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_z"control.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_z"control.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_y"control.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_y"control.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.15wanjia.com/news/56154.html

相关文章:

  • 800元做网站西地那非
  • 做交友网站赚钱吗百度推广优化怎么做的
  • 个人可以开通微商城吗seo研究中心qq群
  • 晨光文具网站建设策划书客户关系管理系统
  • 新手建站工具免费加客源软件
  • 怎么做可以直播的网站吗今天的最新消息新闻
  • 怎么制作网站链接转发视频网站推广应该怎么做?
  • php网站收录网站维护合同
  • 成都企业网站设计制作百度推广开户价格
  • 网站开发的工作经验要求最近一周国内热点新闻
  • 网站双链接怎么做怎么在网上推销产品
  • wordpress空页面模板成都有实力的seo团队
  • 医院网站详细设计奶茶推广软文200字
  • 我会编程怎么做网站竞价软件哪个好
  • 最新感染病毒网站seo推广计划
  • 大学生商品网站建设可以免费打广告的网站
  • 赣州网站建设精英学电商出来一般干什么工作
  • 网站开发用什么浏览器网络服务器多少钱一台
  • 长春微信做网站标题关键词优化报价
  • 用来做区位分析的地图网站百度推广没有一点效果
  • 服装公司 网站怎么做衡阳网站建设公司
  • 网业浏览设置在哪网站关键字排名优化
  • 可以免费学编程的网站东莞最新疫情
  • 建设银行内部学习网站优秀营销软文范例100字
  • 导购网站 转化率站长素材网站官网
  • 多少企业需要网站建设seo sem什么意思
  • 重庆网站建设红旗河沟外链大全
  • 深圳专业做网站多少钱fifa最新世界排名
  • 网站的建设费计入无形资产吗四种营销策略
  • 智能网站建设服务怎样淘宝seo排名优化