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

php后台网站开发教程百度引擎的搜索方式是什么

php后台网站开发教程,百度引擎的搜索方式是什么,用vs2010做网站的好处,打码赚钱题目 现有一移动机器人,该机器人的基坐标系为“base_link”,机器人包含3个子坐标系分别为“joint1”,“joint2”,“joint3”。 要求:利用多坐标转换,实现joint1下的坐标向joint2下的坐标转换,…

题目

现有一移动机器人,该机器人的基坐标系为“base_link”,机器人包含3个子坐标系分别为“joint1”,“joint2”,“joint3”。

要求:利用多坐标转换,实现joint1下的坐标向joint2下的坐标转换,joint2下的坐标向joint3下的坐标转换。静态坐标的位置发布和最终的程序启动采用launch文件形式,基于已有功能包进行发布,编写多坐标变换的订阅方实现,打印输出两个转换后的坐标信息

已知坐标关系:

​ joint1相对于base_link的坐标为:x = 0.2 y = 0.0 z = 0.3

​ joint2相对于base_link的坐标为:x = 0.5 y = 0.1 z = 0.4

​ joint3相对于base_link的坐标为:x = 0.3 y = 0.3 z = 0.0

已知坐标点:

joint1坐标系下的坐标为:(1.0,1.0,1.0)

joint2坐标系下的坐标为:(2.0,2.0,2.0)

方案

一.订阅方(text_tf_sub.py)

  • my_tf功能包下的scripts文件夹下创建python文件text_tf_sub.py

  • 撰写代码

#! /usr/bin/env python"""
订阅方
"""import rospy
import tf2_ros
from tf2_geometry_msgs import PointStampeddef one_two():# tfs = sub.lookup_transform("joint2","joint1",rospy.Time(0))# 创建消息对象source_point = PointStamped()  # 使用正确的消息类型    source_point.header.stamp = rospy.Time.now()source_point.header.frame_id = "joint1"    source_point.point.x = 1.0     # x偏移量source_point.point.y = 1.0 source_point.point.z = 1.0target_point_1 = sub.transform(source_point, "joint2",rospy.Duration(1))  return target_point_1def two_three():# tfs = sub.lookup_transform("joint2","joint1",rospy.Time(0))# 创建消息对象source_point = PointStamped()  # 使用正确的消息类型    source_point.header.stamp = rospy.Time.now()source_point.header.frame_id = "joint2"source_point.point.x = 2.0source_point.point.y = 2.0source_point.point.z = 2.0target_point_2 = sub.transform(source_point, "joint3",rospy.Duration(1))  return target_point_2if __name__ == '__main__':rospy.init_node("text_tf_sub_p")  # 初始化节点# 创建缓冲区对象sub = tf2_ros.Buffer()# 创建TF订阅对象listener = tf2_ros.TransformListener(sub)# 设置发布频率rate = rospy.Rate(1)while not rospy.is_shutdown():try:target_point_1 = one_two()target_point_2 = two_three()rospy.loginfo("joint1向joint2的坐标转换: x = %.2f, y = %.2f, z = %.2f ",target_point_1.point.x,target_point_1.point.y,target_point_1.point.z)rospy.loginfo("joint2向joint3的坐标转换: x = %.2f, y = %.2f, z = %.2f \n",target_point_2.point.x,target_point_2.point.y,target_point_2.point.z)except Exception as e:rospy.logwarn("不可用")rate.sleep()rospy.spin()
  • CMakeLists.txt中添加scripts/text_tf_sub.py

  • 从终端进入工作空间下的src下的功能包的scripts ~/ros_ws/src/my_tf/scripts为python文件添加可执行权限

    chmod +x *.py

二.发布方(text_tf_pub.launch)

  • my_tf下的launch文件夹下创建 text_tf_pub.launch

  • 撰写launch文件

<?xml version="1.0"?>
<launch><node name="joint1" pkg="tf2_ros" type="static_transform_publisher" args="0.2 0.0 0.3 0 0 0 /base_link /joint1" output="screen"/><node name="joint2" pkg="tf2_ros" type="static_transform_publisher" args="0.5 0.1 0.4 0 0 0 /base_link /joint2" output="screen"/><node name="joint3" pkg="tf2_ros" type="static_transform_publisher" args="0.3 0.3 0 0 0 0 /base_link /joint3" output="screen"/><node name="text_tf_sub" pkg="my_tf" type="text_tf_sub.py" output="screen"/></launch>

三.编译运行

  • 从终端进入工作空间ros_ws

    cd ros_ws

  • 编译工作空间 catkin_make

  • 刷新工作空间 source ./devel/setup.bash

  • 运行launch文件 roslaunch my_tf text_tf_pub.launch

在这里插入图片描述

http://www.hkea.cn/news/604039/

相关文章:

  • 如何做电子书网站域名站长工具
  • 物联网平台有哪些排名优化外包公司
  • 秦皇岛汽车网站制作数字营销工具
  • 培训教育的网站怎么做东莞做网站的联系电话
  • 云南做网站的公司外贸谷歌优化
  • 网页设计学徒培训可试学巢湖seo推广
  • 让顾客心动的句子seo模拟点击软件源码
  • 设计类专业包括哪些kj6699的seo综合查询
  • 手机网站制作哪家好查关键词
  • 米拓企业网站管理系统电商培训机构排名前十
  • 做效果图有哪些网站seo点击排名
  • 网络营销推广网站收录seo推广排名平台有哪些
  • 产品经理如何看待网站开发广州软件系统开发seo推广
  • wordpress 忘记管理员如何做网站seo
  • app和网站哪个有优势淘宝关键词排名
  • wordpress该域名宁波网站seo公司
  • 建购物网站怎么建呀简单的网站建设
  • 江苏省建设教育协会网站首页百度知道合伙人答题兼职入口
  • 做优化的网站平台搭建
  • 做网站需要多久网络推广是什么专业
  • 厦门加盟网站建设线上推广营销
  • 定制网站案例seo搜索引擎优化薪酬
  • 网站制作成功后怎么使用浏览器观看b站视频的最佳设置
  • 一家专门做开网店的网站北京seo专员
  • 专业企业网站搭建服务头条权重查询
  • 去哪儿网站上做民宿需要材料免费的黄冈网站有哪些平台
  • 网站建设网现在推广什么app最挣钱
  • 嘉兴装修公司做网站安装百度到桌面
  • 电商网站特点外贸营销网站建站
  • 上海市住房城乡建设管理委员会网站网络营销软文范例大全800