当前位置:网站首页>如何在gazebo进行 joint的转动控制
如何在gazebo进行 joint的转动控制
2022-08-09 10:36:00 【华为云】
下面总结 如何在gazebo进行 joint的转动控制
xacro文件
设置两个link
<link name="rotate_link"> <visual> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry > <box size="${size_rotate_link_x} ${size_rotate_link_y} ${size_rotate_link_z}" /> </geometry> <material name="LightGray" /> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry > <box size="${size_rotate_link_x} ${size_rotate_link_y} ${size_rotate_link_z}" /> </geometry> </collision> <inertial> <mass value="${massGain*1}"/> <inertia ixx="${massGain*1}" ixy="0.0" ixz="0.0" iyy="${massGain*1}" iyz="0.0" izz="${massGain*1}"/> </inertial> </link> <gazebo reference="rotate_link"> <material>Gazebo/Grey</material> <turnGravityOff>true</turnGravityOff> </gazebo> <link name="rotate_platform_base_link"> <visual> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry > <box size="${size_rotate_platform_base_link_x} ${size_rotate_platform_base_link_y} ${size_rotate_platform_base_link_z}" /> </geometry> <material name="LightGray" /> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry > <box size="${size_rotate_platform_base_link_x} ${size_rotate_platform_base_link_y} ${size_rotate_platform_base_link_z}" /> </geometry> </collision> <inertial> <mass value="${massGain*1}"/> <inertia ixx="${massGain*1}" ixy="0.0" ixz="0.0" iyy="${massGain*1}" iyz="0.0" izz="${massGain*1}"/> </inertial> </link> <gazebo reference="rotate_platform_base_link"> <material>Gazebo/Black</material> <turnGravityOff>true</turnGravityOff> </gazebo> </xacro:macro>两个基本的link
设置完后,设置 joint
设置joint
<joint name="rotate_joint" type="continuous"> <parent link="rotate_platform_base_link"/> <child link="rotate_link"/> <origin xyz="0.075 0 0.225" rpy="0 0 0" /> <axis xyz="1 0 0" /> <limit effort="10" velocity="1000" /> </joint>- continuous 进行速度控制 一直转
- revolute 进行位置控制 有上下限
设置transmission
<transmission name="rotate_joint_transmission"> <type>transmission_interface/SimpleTransmission</type> <joint name="rotate_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="motor1"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission>设置 gazebo
<gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <robotNamespace>/rotate_platform</robotNamespace> <controlPeriod>0.01</controlPeriod> <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType> </plugin> </gazebo>xacro设置完毕
配置yaml文件
rotate_platform: joint_state_controller: type: joint_state_controller/JointStateController publish_rate: 50 rotate_velocity_controller: type: effort_controllers/JointVelocityController joint: rotate_joint pid: {p: 1, i: 0.0, d: 0.0, i_clamp: 0.0}joint的名字要和上面对应
配置launch文件
<rosparam file="$(find slam_sensor_sim_gazebo)/config/rotate_control.yaml" command="load"/> <node name="controller_manager" pkg="controller_manager" type="spawner" respawn="false" output="screen" ns="/rotate_platform" args="joint_state_controller rotate_velocity_controller --shutdown-timeout 3"/>边栏推荐
- 深度学习--生成对抗网络(Generative Adversarial Nets)
- 程序员的专属浪漫——用3D Engine 5分钟实现烟花绽放效果
- ESIM(Enhanced Sequential Inference Model)- 模型详解
- unix环境编程 第十四章 14.8 存储映射I/O
- The common problems in laptops, continuously updated
- [贴装专题] 视觉贴装平台与贴装流程介绍
- [贴装专题] 基于多目视觉的手眼标定
- SQL Server查询优化
- 开源SPL,WebService/Restful广泛应用于程序间通讯,如微服务、数据交换、公共或私有的数据服务等。
- 小程序员的发展计划
猜你喜欢

分类预测 | MATLAB实现CNN-LSTM(卷积长短期记忆神经网络)多特征分类预测

机器学习--线性回归(Linear Regression)
今天做了手机播放器的均衡器

编解码(seq2seq)+注意机制(attention) 详细讲解
![[Original] Usage of @PrePersist and @PreUpdate in JPA](/img/a0/5aebdef4a12fe55b4782b69e39b817.png)
[Original] Usage of @PrePersist and @PreUpdate in JPA

【 original 】 VMware Workstation implementation Openwrt soft routing, the ESXI, content is very detailed!

【MySQL】mysql因为字符集导致left join出现Using join buffer (Block Nested Loop)

【原创】解决阿里云oss-browser.exe双击没反应打不开,提供一种解决方案

笔记本电脑使用常见问题,持续更新

深度学习--循环神经网络(Recurrent Neural Network)
随机推荐
分类预测 | MATLAB实现CNN-GRU(卷积门控循环单元)多特征分类预测
判断一段文字的width
OneNote 教程,如何在 OneNote 中搜索和查找笔记?
libavcodec.dll导致游戏不能运行及explorer关闭
好久没上博客了,好长时间没有进展了
第二周作业
Database connection operations for MySQL and MyEclipse
Oracle数据库常用函数总结
学长告诉我,大厂MySQL都是通过SSH连接的
MySQL和MyEclipse的数据库连接操作
[Original] Usage of @PrePersist and @PreUpdate in JPA
【报错记录】解决华擎J3455-ITX不插显示器无法开机的问题
By asking where the variables are stored, the shepherd boy laughed and said to use pointers, Go lang1.18 introductory refining tutorial, from Bai Ding to Hongru, the use of go lang type pointers (Poin
爬虫实例,获取豆瓣上某部电影的评论
unix环境编程 第十五章 15.7消息队列
Qt 国际化翻译
Oracle数据库:for update 和for update nowait的区别
山东招远通报星童幼儿园食品安全问题最新调查情况
Battery modeling, analysis and optimization (Matlab code implementation)
开源SPL,WebService/Restful广泛应用于程序间通讯,如微服务、数据交换、公共或私有的数据服务等。