ros_control
来源:互联网 发布:基价的算法和作用 编辑:程序博客网 时间:2024/06/06 16:57
按照官网调试时候遇到了各种bug,主要是却依赖,安装gazebo_ros_pkgs+toolbox+realtime_tool等几个包之后就好了,在github下载时,记得选择正确的版本!!
We add a <transmission>
block similar to the following for every joint that we wish to have Gazebo actuate. Note that the<hardwareInterface>
must be included in both the <joint>
and <actuator>
tags (see ros_control issue here). Open yourrrbot.xacro
file and at the bottom of the file you should see:
1、在rrbot.xacro文件下添加标签<transmission>.在每个想要添加启动器的关节处,需要添加标签<transmission>,这个标签中的《joint》和《actuator》中都要添加《hardwareInterface》标签
<transmission name="tran1"> <type>transmission_interface/SimpleTransmission</type> <joint name="joint1"> <hardwareInterface>EffortJointInterface</hardwareInterface> </joint> <actuator name="motor1"> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="tran2"> <type>transmission_interface/SimpleTransmission</type> <joint name="joint2"> <hardwareInterface>EffortJointInterface</hardwareInterface> </joint> <actuator name="motor2"> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission>
You'll also see the gazebo_ros_control plugin in
rrbot.gazebo
that reads in all the<transmission>
tags:2、在文件rrbot.gazebo中也要添加gazebo_ros_control的插件说明
<gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <robotNamespace>/rrbot</robotNamespace> </plugin></gazebo>
The PID gains and controller settings must be saved in a yaml file that gets loaded to the param server via the roslaunch file. In the config folder of your
MYROBOT\_control
package, adapt the following RRBot example to your robot asMYROBOT_control/config/rrbot_control.yaml
:3、新建一个功能包叫myrobot_control,下方建立config文件夹,新建一个rrbot_control.yaml的配置文件,用于给参数服务器载入ros_controller的PID参数
rrbot: # Publish all joint states ----------------------------------- joint_state_controller: type: joint_state_controller/JointStateController publish_rate: 50 # Position Controllers --------------------------------------- joint1_position_controller: type: effort_controllers/JointPositionController joint: joint1 pid: {p: 100.0, i: 0.01, d: 10.0} joint2_position_controller: type: effort_controllers/JointPositionController joint: joint2 pid: {p: 100.0, i: 0.01, d: 10.0}
Create a roslaunch file
Create a roslaunch file for starting the ros_control controllers. Within the launch folder create a
MYROBOT_control/launch/MYROBOT_control.launch
file and adapt the following RRBot example to your robot:4、在myrobot_control建立launch文件夹,并书写launch文件如下:
<launch> <!-- Load joint controller configurations from YAML file to parameter server -->
<!--这里应该是给ros的参数服务load你的参数文件,把对应名称的参数都load到ros参数服务器里-->
<rosparam file="$(find rrbot_control)/config/rrbot_control.yaml" command="load"/
><!-- load the controllers -->
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" ns="/rrbot" args="joint1_position_controller joint2_position_controller joint_state_controller"/> <!-- convert joint states to TF transforms for rviz, etc --> <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="false" output="screen"> <remap from="/joint_states" to="/rrbot/joint_states" /> </node></launch><!-- 启动了一个节点,这个节点的作用就是让你能够控制刚才添加了控制器的关节 -->
- ros_control
- 9.ros_control
- ros/ros_control/controller_manager介绍
- Gazebo tutorial学习-----ros_control+Gazebo
- gazebo与ros_control学习 (1)
- ros_control 如何写一个controller
- Gazebo与ros_control(1):让模型动起来
- Gazebo与ros_control(4):举一反三,实战youBot
- ROS Gazebo(五):ros_control和gazebo仿真总结
- Gazebo与ros_control(2):七自由度机械臂和两轮差速运动小车
- Gazebo与ros_control(3):Moveit输出规划轨迹到Gazebo
- Windows平台下OpenCV3源码编译(VS2013)
- CodeForces
- CSU1803: 2016(湖南省第十二届大学生计算机程序设计竞赛A)
- [PlantSimulation]矢量图vector graphic的应用
- dubbo系列(一)——dubbo简介和dubbo+spring+zookeeper配置整合
- ros_control
- 【剑指offer之数字在排序数组中出现的次数】
- python 图像分类
- nodejs里向buffer写入字符串
- Cisco交换机的基本配置命令学习小结
- UNIX环境高级编程习题之第三章第二题
- graphite
- 洛谷日记4
- java几种常见的数据库连接