当前位置:网站首页>5 ROS simulation modeling (3-rviz+gazebo+ control simulation robot)
5 ROS simulation modeling (3-rviz+gazebo+ control simulation robot)
2022-07-25 23:03:00 【Climbing pigs】
5 ROS Simulation modeling
5.5 Give the model sensor information to control the simulation robot
5.5.1 Realization effect
Controlling robot movement through keyboard , At the same time, you can subscribe to radar information .
5.5.2 stay urdf File to add gazebo Sensor information
1、 Add information about the differential drive wheel
<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>base_l_wheel_joint</leftJoint>
<rightJoint>base_r_wheel_joint</rightJoint>
<wheelSeparation>0.315</wheelSeparation>
<wheelDiameter>0.18</wheelDiameter>
<broadcastTF>1</broadcastTF>
<wheelTorque>30</wheelTorque>
<wheelAcceleration>1.8</wheelAcceleration>
<commandTopic>cmd_vel</commandTopic>
<odometryFrame>odom</odometryFrame>
<odometryTopic>odom</odometryTopic>
<robotBaseFrame>base_coordinate</robotBaseFrame>
</plugin>
</gazebo>
2、 Add lidar information
<gazebo reference="laser">
<sensor type="ray" name="rplidar">
<pose>0 0 0 0 0 0</pose>
<visualize>true</visualize>
<update_rate>5.5</update_rate>
<ray>
<scan>
<horizontal>
<samples>360</samples>
<resolution>1</resolution>
<min_angle>-3</min_angle>
<max_angle>3</max_angle>
</horizontal>
</scan>
<range>
<min>0.10</min>
<max>30.0</max>
<resolution>0.01</resolution>
</range>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.01</stddev>
</noise>
</ray>
<plugin name="gazebo_rplidar" filename="libgazebo_ros_laser.so">
<topicName>/scan</topicName>
<frameName>laser</frameName>
</plugin>
</sensor>
</gazebo>
More sensor information , Refer to the official :http://gazebosim.org/tutorials?tut=ros_gzplugins
3、launch The file does not need to be modified
4、 start-up launch The file in rviz Subscribe to radar topics
stay rviz Medium add add to LaserScan, Among them topic Internal subscription /scan topic of conversation , modify size The size makes the lidar scanning result clearer .
5、 Control robot motion
New terminal input rosrun teleop_twist_keyboard teleop_twist_keyboard.py Control the robot movement through the keyboard .
5.5.3 Existing problems
In the keyboard control robot movement , There may be situations : There is no problem with the model , But the robot's forward motion is unnatural .
Subscribe to the robot at this time TF Coordinates and odometer information odometry Find out , default odom Direction to X The positive direction of the shaft is the forward direction , therefore urdf The wheel of the model needs to be considered to go around Y The shaft .

5.6 Reference content and resource connection
5.6.1 Reference content of simulation modeling
1、B standing ROS Introduction and practice :【 Aote School Park 】ROS Introduction to Robotics 《ROS Theory and practice 》 Zero basic course
2、ROS-WIKI:https://wiki.ros.org/urdf/XML
3、gazebo official :http://gazebosim.org/tutorials?tut=ros_gzplugins
5.6.2 Simulation scene resource connection
Last one : 5 ROS Simulation modeling (2- urdf Document preparation and scene construction ).
Next :5 ROS Simulation modeling (4- Navigation Navigation simulation )
边栏推荐
- Hj9 extract non duplicate integers
- HCIE终到手,路才开始
- TFrecord写入与读取
- The third programming competition of Wuhan University of technology b- save the kingdom of DAG (topological properties deal with accessibility Statistics)
- [opencv] edge detection [API and source code implementation]
- The fourth experiment nat
- We media people must have four resource tools, each of which is very practical
- Similarities and differences between equals and "= ="
- Details of notification (status bar notification)
- 汇编语言与微机原理实验一、实验二、实验三:分支程序设计/循环程序设计/子程序设计
猜你喜欢

Structure principle of micro ball vibration switch with chip

Network security and level protection

Zero crossing position search of discrete data (array)

AI首席架构师12-AICA-工业生产过程优化场景下产业落地解析

We media people must have four material websites, and don't worry about finding materials anymore

The third experiment OSPF

Design of Butterworth filter and drawing of amplitude frequency characteristic curve

firewall 命令简单操作

赋能合作伙伴,亚马逊云科技如何落地“扶上马,送一程”?
![[literature reading] - HRL -[hrl with universal policies for multi step robotic control]](/img/34/06d5ba3af4e6e775a335324c020161.png)
[literature reading] - HRL -[hrl with universal policies for multi step robotic control]
随机推荐
[PTA] 7-19 check face value (15 points)
Summary of traversal methods of six sets list, set, map, queue, deque and stack
Opencv compile and call GPU version
Summary of my 2020 online summer camp
Review of static routing
uvm_ HDL -- implementation of DPI in UVM (4)
What are the differences between FileInputStream and bufferedinputstream?
CMU AI PhD first year summary
Madness. Smbms (supermarket order management system)
Tfrecord write and read
【接口性能优化】索引失效的原因以及如何进行SQL优化
SSH服务器CBC加密模式漏洞(CVE-2008-5161)
TFrecord写入与读取
码蹄集 精准弹幕
[MySQL rights] UDF rights (with Malaysia)
CMU AI PhD 第一年总结
Simple setting of drop-down triangle
Code shoe set precision barrage
Zcmu--5015: complete the task
Qt的TQTreeWidget控件