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

如何做计算机网站优化大师官方网站

如何做计算机网站,优化大师官方网站,寻找石家庄网站建设,信息手机网站模板下载软件赵虚左老师讲的很详细,这里只是理一下思路,说下突然出现“新”概念之间的关系。 urdf文件:里面是配置模型的,既有模型的位置、尺寸、颜色,也包含复杂的物理模型信息比如:转动惯量,碰撞box大小等等&#xff…

赵虚左老师讲的很详细,这里只是理一下思路,说下突然出现“新”概念之间的关系。
urdf文件:里面是配置模型的,既有模型的位置、尺寸、颜色,也包含复杂的物理模型信息比如:转动惯量,碰撞box大小等等,总之是定义模型的。
xacro文件: 也是配置模型的,就是urdf的高级版。
总流程就是:定义模型-》组装模型-》在launch文件启动-》加载Gazebo里-》打开自带的ros-control键盘控车

总结:
1:link里的 fame是相对于可视化模型的偏移,如果为0,0,0。那两坐标系重合,坐标系原点在模型左下角。有时候想让坐标系在模型里面,就要改link里的
joint里的 是坐标系位置,在rviz里就表示模型放在哪里的位置,比如雷达放在高1m,则:joint里的 z=1,这里的高是相对于谁高呢? 所以要在joint里写parent,是child相对于parent的高

在这里插入图片描述


说的问题是:选择不同的frame_id时候,就不显示其他的图像在rviz里,本质原因是,坐标系没统一变换,不在一棵TF数下,导致不会全部显示
在这里插入图片描述
在这里插入图片描述
Start.sh同时启动雷达、相机、地盘

<!-- 机器人启动文件:1.启动底盘2.启动激光雷达3.启动摄像头-->
<launch><include file="$(find ros_arduino_python)/launch/arduino.launch" /><include file="$(find usb_cam)/launch/usb_cam-test.launch" /><include file="$(find rplidar_ros)/launch/rplidar.launch" />
</launch>

静态坐标变换,指定了相机、雷达相对于底盘footprint关系
args="0.08 0 0.1 0 0 0 /base_footprint /camera_link"表示:xyz和欧拉角,父级坐标系和子坐标系。

父级坐标系和子坐标系和之前launch的对应

<!-- 机器人启动文件:当不包含机器人模型时,需要发布坐标变换-->
<launch><include file="$(find mycar_start)/launch/start.launch" />    <node name="camera2basefootprint" pkg="tf2_ros" type="static_transform_publisher" args="0.08 0 0.1 0 0 0 /base_footprint /camera_link"/><node name="rplidar2basefootprint" pkg="tf2_ros" type="static_transform_publisher" args="0 0 0.1 0 0 0 /base_footprint /laser"/>
</launch>

在这里插入图片描述
实例:

    <link name="base_link"><visual><!-- 形状 --><geometry><!-- 长方体的长宽高 --><!-- <box size="0.5 0.3 0.1" /> --><!-- 圆柱,半径和长度 --><!-- <cylinder radius="0.5" length="0.1" /> --><!-- 球体,半径--><!-- <sphere radius="0.3" /> --></geometry><!-- xyz坐标 rpy翻滚俯仰与偏航角度(3.14=180度 1.57=90度) --><origin xyz="0 0 0" rpy="0 0 0" /><!-- 颜色: r=red g=green b=blue a=alpha --><material name="black"><color rgba="0.7 0.5 0 0.5" /></material></visual></link>

在这里插入图片描述
赵老师的说明写的太好复制不过来了
我的理解:先在urdf设置一堆link,表示定义模型的尺寸大小啥的,先把东西捏好,然后再设置一堆joint来连接刚刚定义的link.
我理解link里的 可以都是000,表示开始放在的位置 ,joint里的 表示parent和child相对位置。

 <!-- 添加摄像头 -->  表示摄像头放在0,0,0<link name="camera"><visual><geometry><box size="0.02 0.05 0.05" /></geometry><origin xyz="0 0 0" rpy="0 0 0" /><material name="red"><color rgba="1 0 0 0.5" /></material></visual></link><!-- 关节 -->  摄像头 作为child相对于base移动0.2 0 0.075<joint name="camera2baselink" type="continuous"><parent link="base_link"/>  <child link="camera" /><origin xyz="0.2 0 0.075" rpy="0 0 0" /><axis xyz="0 0 1" /></joint>

在这里插入图片描述

如何键盘控制小车在Gazebo里运动??

  • 下载库 sudo apt-get install ros-noetic-teleop-twist-keyboard
  • Launch 文件中添加 Gazebo 键盘控制程序
<launch>
<node name="twist_keyboard" pkg="teleop_twist_keyboard"type="teleop_twist_keyboard.py" output="screen" />
</launch>
  • 添加Gazebo控制器插件 (使用Gazebo自带的控制程序控制,我们只需要发对应的信号)
    开启Gazebo后会订阅/cmd_vel等待被控制,之前的键盘控制程序会发布/cmd_vel话题
    我们只需新建一个xacro 类似于:
<robot name="my_car_move" xmlns:xacro="http://wiki.ros.org/xacro"><!-- 传动实现:用于连接控制器与关节 --><xacro:macro name="joint_trans" params="joint_name"><!-- Transmission is important to link the joints and the controller --><transmission name="${joint_name}_trans"><type>transmission_interface/SimpleTransmission</type><joint name="${joint_name}"><hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface></joint><actuator name="${joint_name}_motor"><hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface><mechanicalReduction>1</mechanicalReduction></actuator></transmission></xacro:macro><!-- 每一个驱动轮都需要配置传动装置 --><xacro:joint_trans joint_name="left_wheel2base_link" /><xacro:joint_trans joint_name="right_wheel2base_link" /><!-- 控制器 --><gazebo><plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so"><rosDebugLevel>Debug</rosDebugLevel><publishWheelTF>true</publishWheelTF><robotNamespace>/</robotNamespace><publishTf>1</publishTf><publishWheelJointState>true</publishWheelJointState><alwaysOn>true</alwaysOn><updateRate>100.0</updateRate><legacyMode>true</legacyMode><leftJoint>left_wheel2base_link</leftJoint> <!-- 左轮 --><rightJoint>right_wheel2base_link</rightJoint> <!-- 右轮 --><wheelSeparation>${base_link_radius * 2}</wheelSeparation> <!-- 车轮间距 --><wheelDiameter>${wheel_radius * 2}</wheelDiameter> <!-- 车轮直径 --><broadcastTF>1</broadcastTF><wheelTorque>30</wheelTorque><wheelAcceleration>1.8</wheelAcceleration><commandTopic>cmd_vel</commandTopic> <!-- 运动控制话题 --><odometryFrame>odom</odometryFrame> <odometryTopic>odom</odometryTopic> <!-- 里程计话题 --><robotBaseFrame>base_footprint</robotBaseFrame> <!-- 根坐标系 --></plugin></gazebo></robot>

在这里插入图片描述

base_footprint设置controler所控制的机器人的坐标系是哪个坐标系

然后集成,启动launch即可:
在这里插入图片描述

显示里程计的方法:

在这里插入图片描述

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

相关文章:

  • 网站怎么让百度收录广告网络推广
  • 小型网站设计及建设论文定制网站制作公司
  • 视频网站建设费用排名优化网站seo排名
  • 怎么自己做网站服务器linux百度账号查询
  • 梧州网站推广方案百度热搜 百度指数
  • 网站不兼容ie6自助建站模板
  • 甘肃网站建设公司百中搜优化软件
  • 国内外贸网站建设公司seo教程 百度网盘
  • 一物一码二维码生成系统最好用的系统优化软件
  • 如何在大网站做外链镇江网站建站
  • 杭州网站建设公司导航短视频营销案例
  • 昆明做网站建设有哪些长尾关键词排名工具
  • 一女被多男做的视频网站网站seo系统
  • 网站建设 青海网站建设找哪家好
  • win7 网站配置优化方案官网电子版
  • 广州seo优化公司排名浙江seo博客
  • 全网推广的方式有哪些抖音seo推荐算法
  • 网站开发开源架构抖音营销软件
  • 自己做的网站能放到网上么青岛seo经理
  • 营业推广策划方案邵阳网站seo
  • 手机网站横向切换kol合作推广
  • 专门做超市海报的网站宁波seo咨询
  • 仿网站上的焦点图在线看seo网站
  • 做网站的业务员艾滋病阻断药有哪些
  • web集团网站建设广告投放平台有哪些
  • 大连做网站建设广告资源对接平台
  • 做网站怎么写工作日志泉州网站seo公司
  • wordpress外链站内打开搜索引擎是什么意思啊
  • 做论坛网站需要什么备案新站seo优化快速上排名
  • 动漫网站html百度网盘搜索