TurtleBot-Tutorial
本文根据对官方提供的TURTLEBOT功能包内的每一个功能包进行编译测试,并对出现问题的功能包纠错与更新实现了跨版本移植;
ar_track_alvar 移植编译正常
depthimage_to_laserscan 移植测试失败,终端提示错误
TurtleBot-Tutorial/depthimage_to_laserscan/src/DepthImageToLaserScanNodelet.cpp
第60行代码
PLUGINLIB_DECLARE_CLASS(depthimage_to_laserscan, DepthImageToLaserScanNodelet, depthimage_to_laserscan::DepthImageToLaserScanNodelet, nodelet::Nodelet);
修订如下
PLUGINLIB_EXPORT_CLASS(depthimage_to_laserscan::DepthImageToLaserScanNodelet, nodelet::Nodelet)
TurtleBot-Tutorial/depthimage_to_laserscan/src/DepthImageToLaserScanNodelet.cpp
第60行代码
PLUGINLIB_DECLARE_CLASS(depthimage_to_laserscan, DepthImageToLaserScanNodelet, depthimage_to_laserscan::DepthImageToLaserScanNodelet, nodelet::Nodelet);
修订如下
PLUGINLIB_EXPORT_CLASS(depthimage_to_laserscan::DepthImageToLaserScanNodelet, nodelet::Nodelet)
修订完成后,移植编译正常
hector_slam 移植编译正常
m-explore 移植编译正常
navigation 移植测试失败,终端提示错误
替换navigation包
https://github.com/ros-planning/navigation.git
通过在终端中键入如下命令进行下载
git clone https://github.com/ros-planning/navigation.git
修订完成后,移植编译正常
rbx1 移植编译正常
robot_voice 移植测试失败,终端提示错误
- 首先需要进行账号注册方可下载SDK
- 进入控制台
- 创建新服务
- 服务创建完成后返回主页进入SDK下载
- 解压下载的SDK,并执行以下命令,将libmsc.so文件拷贝至/usr/lib路径下
cd Linux_iat1227_tts_online1227_5f7c3a77/libs/x64/
sudo cp libmsc.so /usr/lib/
修订完成后,移植编译正常
rosbag 移植编译正常
rplidar_ros 移植编译正常
slam_gmapping 移植编译正常
turtlebot 移植编译正常
turtlebot3 移植编译正常
turtlebot_apps 移植编译正常
vision_detector 移植编译正常
vision_tensorflow 移植编译正常
测试
在rviz上仿真
调出TurtleBot3机器人模型
/TurtleBot-Tutorial/turtlebot3/turtlebot3_simulations/turtlebot3_fake/launch
roslaunch turtlebot3_fake turtlebot3_fake.launch
turtlebot3_fake.launch
<launch>
<!-- Set the arg which name model and the default value from the enviroment TURTLEBOT3_MODEL -->
<arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
<!-- Set the param which name is tb3_model and the value is from the arg model -->
<param name="tb3_model" value="$(arg model)"/>
<!-- load the xml file which contain the turtlebot3_description patn -->
<!-- Set the arg model which value from the arg model -->
<include file="$(find turtlebot3_bringup)/launch/includes/description.launch.xml">
<arg name="model" value="$(arg model)" />
</include>
<!-- Start a node which name turtlebot3_fake_node and pkg name is turtlebot3_fake and type is turtlebot3_fake_node , also output the log in the screen -->
<node pkg="turtlebot3_fake" type="turtlebot3_fake_node" name="turtlebot3_fake_node" output="screen" />
<!-- Start a node which name robot_state_publisher and pkg name is robot_state_publisher and type is robot_state_publisher , also output the log in the screen -->
<!-- Set the param which name is publish_frequency and type is double , value is 50.0 -->
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen">
<param name="publish_frequency" type="double" value="50.0" />
</node>
<!-- Start a node whic name rviz and pkg is rviz and type is rviz , and args is a rviz config where is in the /turtlebot3_fake/rviz/turtlebot3_fake.rviz -->
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find turtlebot3_fake)/rviz/turtlebot3_fake.rviz"/>
</launch>
description.launch.xml
<launch>
<!-- Set arg name is model -->
<arg name="model"/>
<!-- Set arg name is urdf_file and default value is a path which point to /turtlebot3_description/urdf/turtlebot3_model(value).urdf.xacro -->
<!-- Set param name is robot_description and load the arg urdf_file which is turtlebot3_description to the param server -->
<arg name="urdf_file" default="$(find xacro)/xacro --inorder '$(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro'" />
<param name="robot_description" command="$(arg urdf_file)" />
</launch>
在启动的终端中可以看到如下输出
SUMMARY
========
PARAMETERS
* /robot_description: <?xml version="1....
* /robot_state_publisher/publish_frequency: 50.0
* /rosdistro: melodic
* /rosversion: 1.14.9
* /tb3_model: waffle_pi
NODES
/
robot_state_publisher (robot_state_publisher/robot_state_publisher)
rviz (rviz/rviz)
turtlebot3_fake_node (turtlebot3_fake/turtlebot3_fake_node)
使TurtleBot3可以通过键盘控制
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch