(一)turtlebot3学习,运行的开源代码解析

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/ktigerhero3/article/details/80575785

1.文件解析和系统运行思路

turtlebot3要动起来,需要运行一些程序.下面对运行的程序进行解析
(1)启动激光和控制命令发送程序及传感器接收程序

roslaunch turtlebot3_bringup turtlebot3_robot.launch

这个文件包括下面两个程序

roslaunch turtlebot3_bringup turtlebot3_lidar.launch
roslaunch turtlebot3_bringup turtlebot3_core.launch

其中turtlebot3_core.launch文件内容为

<launch>
  <node pkg="rosserial_python" type="serial_node.py" name="turtlebot3_core" output="screen">
    <param name="port" value="/dev/ttyACM0"/>
    <param name="baud" value="115200"/>
  </node>
</launch>

就是打开rosserial_python包下的turtlebot3_core节点,设置通信端口为/dev/ttyACM0,波特率为
控制文件:115200
其中turtlebot3_lidar.launch 文件内容为

<launch>
  <node pkg="hls_lfcd_lds_driver" type="hlds_laser_publisher" name="turtlebot3_lds" output="screen">
    <param name="port" value="/dev/ttyUSB0"/>
    <param name="frame_id" value="base_scan"/>
  </node>
</launch>

就是打开hls_lfcd_lds_driver包下的turtlebot3_ldse节点,设置通信端口为/dev/ttyUSB0
(2)运行下面使用鼠标操作

roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch

猜你喜欢

转载自blog.csdn.net/ktigerhero3/article/details/80575785