当前位置: 代码迷 >> 综合 >> Turtlebot1入门教程-安装Turtlebot(Ubuntu18.04+Melodic)
  详细解决方案

Turtlebot1入门教程-安装Turtlebot(Ubuntu18.04+Melodic)

热度:86   发布时间:2024-01-18 08:40:23.0

安装turtlebot的依赖:

sudo apt-get install ros-melodic-kobuki-*sudo apt-get install ros-melodic-ecl-streamssudo apt-get install libusb-devsudo apt-get install libspnav-devsudo apt-get install ros-melodic-joystick-driverssudo apt-get install bluetoothsudo apt-get install libbluetooth-devsudo apt-get install libcwiid-dev

新建工作空间,准备相关包

mkdir -p ~/turtlebot_ws/src cd ~/turtlebot_ws/src git clone https://github.com/turtlebot/turtlebot_simulatorgit clone https://github.com/turtlebot/turtlebot.gitgit clone https://github.com/turtlebot/turtlebot_apps.gitgit clone https://github.com/udacity/robot_pose_ekfgit clone https://github.com/ros-perception/depthimage_to_laserscan.git git clone https://github.com/yujinrobot/kobuki_msgs.gitgit clone https://github.com/yujinrobot/kobuki_desktop.gitcd kobuki_desktop/rm -r kobuki_qtestsuitegit clone https://github.com/toeklk/orocos-bayesian-filtering.gitgit clone https://github.com/turtlebot/turtlebot_msgs.gitgit clone https://github.com/ros-drivers/joystick_drivers.git

复制kobuki和yujin_ocs依赖库到turtlebot_ws / src工作空间下

mkdir -p ~/repos/cd ~/repos/git clone https://github.com/yujinrobot/kobuki.gitcp -r kobuki/* ~/turtlebot_ws/src/git clone https://github.com/yujinrobot/yujin_ocs.gitcp -r yujin_ocs/yocs_cmd_vel_mux/ yujin_ocs/yocs_controllers ~/turtlebot_ws/src/ 

编译工作空间

cd ~/turtlebot_wscatkin_make

这里编译的时候会出先这个报错:

-- Checking for module 'orocos-bfl'
--   No package 'orocos-bfl' found
CMake Error at /usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:415 (message):A required package was not found
Call Stack (most recent call first):/usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:593 (_pkg_check_modules_internal)robot_pose_ekf/CMakeLists.txt:6 (pkg_check_modules)-- Configuring incomplete, errors occurred!
See also "/home/zdg/turtlebot_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/zdg/turtlebot_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

原因:系统缺少bfl包
解决方法:1、安装bfl包:

sudo apt-get install ros-melodic-bfl

2、再编译,成功解决!

------------------by–>帕帕尼
2020.11.13

添加工作空间到bashrc文件

echo "source ~/turtlebot_ws/devel/setup.bash" >> ~/.bashrc

启用环境变量

source ~/.bashrc 

启动底盘:

roslaunch turtlebot_bringup minimal.launch

启动键盘控制:

roslaunch turtlebot_teleop keyboard_teleop.launch

本文的大部分内容转载于:创客智造turtlebot入门教程