当前位置:网站首页>[advanced ROS] Lecture 9 robot model motion based on rviz and arbotix control
[advanced ROS] Lecture 9 robot model motion based on rviz and arbotix control
2022-07-28 02:22:00 【Life is like Zhaoxu】
【ROS Advanced 】 About 9 be based on Rviz and Arbotix Controlled robot model motion

List of articles
Preface
In the last blog section, we systematically learned about URDF File programming optimization method , namely Xacro, A kind of XML Optimization language , Through the basic concepts 、 Grammar explanation 、 The description of code examples shows how to improve URDF Reusability of documents 、 Security and efficiency , The article in this section mainly introduces Rviz How to use in the environment Arbotix Control the motion of the robot model .
One 、Arbotix Introduction to function package
- Problem introduction :
In previous studies , We go through URDF The file realizes the static creation of robot model , And through visualization software Rviz Observe and implement basic operations , Then you want further simulation operations , It is necessary to complete the motion control of the robot model , Here we will introduce a corresponding function package to complete the target requirements .
1. Basic introduction :

Arbotix:Arbotix It is a control motor 、 Steering gear control panel , And provide the corresponding ros Function pack , The functions of this feature pack can not only drive real Arbotix Control panel , It also provides a differential controller , Update the robot by receiving speed control commands joint state , So as to help us realize the robot in rviz Movement in .
notes : This differential controller is located at python In the package , The complete package also includes a variety of controllers , Corresponding motor 、 Manipulator and gripper, etc ;
2. Installation tutorial :
- Command line calls directly :
sudo apt-get install ros-noetic-arbotix
- git Installation source :
git clone https://github.com/vanadiumlabs/arbotix_ros.git\qquad Call after downloading
catkin_makeAfter compiling ;

Two 、 Control the movement process
1. preparation
- Create Feature Pack , And write URDF file / adopt Xacro To optimize

- add to Arbotix To configure : The configuration file control.yaml as follows
# This file is the controller configuration file , A robot model may have multiple controllers , such as : chassis 、 Mechanical arm 、 Gripper ( manipulator ).... # therefore , root name yes controller controllers: {
# Single controller settings base_controller: {
# type : Differential controller
type: diff_controller,
# Reference coordinates
base_frame_id: base_footprint,
# The distance between the two wheels
base_width: 0.2,
# Control frequency
ticks_meter: 2000,
#PID Control parameter , Make the robot wheels reach the expected speed quickly
Kp: 12,
Kd: 12,
Ki: 0,
Ko: 50,
# Acceleration limit
accel_limit: 1.0
}
}
2. Write and start launch file
- To write launch file :
\qquad The basic requirements :
\qquad 1. Called arbotix_python Under the function package arbotix_driver node
\qquad 2. adopt file Load the configuration file to obtain the robot information in order to drive the movement
\qquad 3. To configure sim by true, Complete the simulation environment requirements
<launch>
<!--1. Load in the parameter server urdf-->
<!--<param name="robot_description" textfile="$(find urdf01_rviz)/urdf/xacro/demo05_car_base.urdf" />-->
<param name="robot_description" command="$(find xacro)/xacro $(find urdf01_rviz)/urdf/xacro/car.urdf.xacro" />
<!--2. start-up rviz-->
<node pkg="rviz" name="rviz" type="rviz" args="-d $(find urdf01_rviz)/config/show_mycar.rviz"/>
<!--3. Joint status publishing node -->
<node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher"/>
<!--4. Robot status publishing node -->
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher"/>
<!-- Integrate arbotix Motion control node , And load parameters -->
<node pkg="arbotix_python" type="arbotix_driver" name="driver" output="screen">
<rosparam command="load" file="$(find urdf01_rviz)/config/control.yaml" />
<param name="sim" value="true" />
</node>
</launch>
- start-up launch file : Use
roslaunchCommand is enough - To configure Rviz: modify Fixed Frame as well as TF、Odometry Under the Topic Set to odom etc.

- Control motion : Topic at this time
/cmd_velappear , Therefore, we can complete motion control by publishing topic messages or entering commands , The effect is as follows :
rostopic pub -r 10 /cmd_vel geometry_msgs/Twist '{linear: {x: 0.2, y: 0, z: 0}, angular: {x: 0, y: 0, z: 0.5}}'

Be careful : If you want to further operate, you can modify Rviz Set up :
- Display the direction of trolley movement : take Odometry Next status Under the topic It is amended as follows /odom;
- Change the arrow represented by the direction of motion : take Odometry Next shape Of shaft radius Make changes ;
- Display the robot coordinate system : Turn on TF arrow ;
summary
- Statement : The blog section of this section refers to CSDN User zhaoxuzuo ROS course , The main content of this paper is to use Arbotix The function package is Rviz Complete the motion control of the static model of the robot in the environment , From the basic introduction 、 Install the tutorial to the final actual control example , Put it in simple terms from practice , Experience how to actually control robot movement . The next section will introduce in Gazebo Robot model simulation in , Coming soon .
边栏推荐
- 数据输出-绘制动图
- 11 Django basics database operation
- CeresDAO:全球首个基于DAO赋能Web3.0的去中心化数字资产管理协议
- Two ways for wechat applet to realize dynamic horizontal step bar
- 54: Chapter 5: develop admin management services: 7: face warehousing process; Face login process; The browser turns on the video debugging mode (so that the camera can also be turned on in the case o
- 样本不均衡-入门0
- WMS you don't know
- go 学习02 基础知识
- Flume(5个demo轻松入门)
- 视频常用分辨率
猜你喜欢

新零售业态下,零售电商RPA助力重塑增长

LeetCode 热题 HOT 100 -> 3. 无重复字符的最长子串

Flume (5 demos easy to get started)

一文读懂Plato&nbsp;Farm的ePLATO,以及其高溢价缘由

53:第五章:开发admin管理服务:6:开发【admin管理员退出登录,接口】;(一个点:我们想要修改一个采用了某种编码方式的值时,新的值最好也按照这种编码方式编码后,再去修改;)
![53: Chapter 5: develop admin management service: 6: develop [admin administrator exit login, interface]; (one point: when we want to modify a value with a certain coding method, the new value should b](/img/9a/674308c7a21fa2be0943ca7967e274.png)
53: Chapter 5: develop admin management service: 6: develop [admin administrator exit login, interface]; (one point: when we want to modify a value with a certain coding method, the new value should b

The level "trap" of test / development programmers is not a measure of one-dimensional ability

How to put app on the app store?
![Likeshop takeout ordering system [100% open source, no encryption]](/img/e6/a73aa817b5b30339d755aa53708072.png)
Likeshop takeout ordering system [100% open source, no encryption]

微信小程序实现动态横向步骤条的两种方式
随机推荐
实际工作中,我是如何使用 Postman 做接口测试?
学会这招再也不怕手误让代码崩掉
微信小程序图片根据屏幕比例缩放
Likeshop takeout ordering system [100% open source, no encryption]
C# 使用Abp仓储访问数据库时报错记录集
【ROS进阶篇】第十讲 基于Gazebo的URDF集成仿真流程及实例
获取两个集合相差数据
Go learning 01
如何评估研发人员效能?软件工程师报告帮你看见每个人的贡献
Promise从入门到精通(第3章 自定义(手写)Promise)
Promise from introduction to mastery (Chapter 1 Introduction and basic use of promise)
网络必知题目
「冒死上传」Proe/Creo产品结构设计-止口与扣位
Vxe table/grid cell grouping and merging
剑指offer专项突击版第12天
都在说DevOps,你真正了解它吗?
一文读懂Plato&nbsp;Farm的ePLATO,以及其高溢价缘由
cn+dt
Starfish Os打造的元宇宙生态,跟MetaBell的合作只是开始
记录一次生产死锁