Ubuntu18.04 ROS melodic 版本的rivz教程
我们学习rivz时需要一个大神写好的第三方包,这样我们才可以学习具体的命令以及方法。博主在从网上找rivz的教程时发现大部分都比较老了,不支持ROS的最新版本,所以提供的rivz第三方包安装会出现许多坑。博主经过几次踩坑后把经验分享出来。
学习rivz,首先需要安装arbotix。
1,进入源码目录
$ cd catkin_ws/src/
2,源码从git克隆到当前目录
$ git clone https://github.com/vanadiumlabs/arbotix_ros.git
3,切换到make路径
$ cd catkin_ws
4,make
$ catkin_make
uu@uu-HP-EliteBook-6930P-Notebook-PC:~/catkin_ws$ catkin_make Base path: /home/uu/catkin_ws Source space: /home/uu/catkin_ws/src Build space: /home/uu/catkin_ws/build Devel space: /home/uu/catkin_ws/devel Install space: /home/uu/catkin_ws/install #### #### Running command: "cmake /home/uu/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/uu/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/uu/catkin_ws/install -G Unix Makefiles" in "/home/uu/catkin_ws/build" #### -- Using CATKIN_DEVEL_PREFIX: /home/uu/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /home/uu/catkin_ws/devel;/opt/ros/melodic -- This workspace overlays: /home/uu/catkin_ws/devel;/opt/ros/melodic -- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.15", minimum required is "2") -- Using PYTHON_EXECUTABLE: /usr/bin/python2 -- Using Debian Python package layout -- Using empy: /usr/bin/empy -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/uu/catkin_ws/build/test_results -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /usr/bin/python2 (found version "2.7.15") -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.7.14 -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~ traversing 7 packages in topological order: -- ~~ - arbotix (metapackage) -- ~~ - arbotix_controllers -- ~~ - arbotix_firmware -- ~~ - arbotix_python -- ~~ - arbotix_sensors -- ~~ - arbotix_msgs -- ~~ - beginner_tutorials -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- +++ processing catkin metapackage: 'arbotix' -- ==> add_subdirectory(arbotix_ros/arbotix) -- +++ processing catkin package: 'arbotix_controllers' -- ==> add_subdirectory(arbotix_ros/arbotix_controllers) -- +++ processing catkin package: 'arbotix_firmware' -- ==> add_subdirectory(arbotix_ros/arbotix_firmware) -- +++ processing catkin package: 'arbotix_python' -- ==> add_subdirectory(arbotix_ros/arbotix_python) -- +++ processing catkin package: 'arbotix_sensors' -- ==> add_subdirectory(arbotix_ros/arbotix_sensors) -- +++ processing catkin package: 'arbotix_msgs' -- ==> add_subdirectory(arbotix_ros/arbotix_msgs) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- arbotix_msgs: 2 messages, 4 services -- +++ processing catkin package: 'beginner_tutorials' -- ==> add_subdirectory(beginner_tutorials) -- Configuring done -- Generating done -- Build files have been written to: /home/uu/catkin_ws/build #### #### Running command: "make -j2 -l2" in "/home/uu/catkin_ws/build" #### Scanning dependencies of target _arbotix_msgs_generate_messages_check_deps_SetupChannel Scanning dependencies of target _arbotix_msgs_generate_messages_check_deps_Relax [ 0%] Built target _arbotix_msgs_generate_messages_check_deps_SetupChannel [ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Relax Scanning dependencies of target std_msgs_generate_messages_eus Scanning dependencies of target _arbotix_msgs_generate_messages_check_deps_Analog [ 0%] Built target std_msgs_generate_messages_eus Scanning dependencies of target _arbotix_msgs_generate_messages_check_deps_Digital [ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Analog Scanning dependencies of target _arbotix_msgs_generate_messages_check_deps_Enable [ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Digital Scanning dependencies of target _arbotix_msgs_generate_messages_check_deps_SetSpeed [ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Enable Scanning dependencies of target std_msgs_generate_messages_nodejs [ 0%] Built target std_msgs_generate_messages_nodejs [ 0%] Built target _arbotix_msgs_generate_messages_check_deps_SetSpeed Scanning dependencies of target std_msgs_generate_messages_py Scanning dependencies of target std_msgs_generate_messages_lisp [ 0%] Built target std_msgs_generate_messages_lisp [ 0%] Built target std_msgs_generate_messages_py Scanning dependencies of target std_msgs_generate_messages_cpp [ 0%] Built target std_msgs_generate_messages_cpp Scanning dependencies of target arbotix_msgs_generate_messages_eus [ 2%] Generating EusLisp code from arbotix_msgs/Digital.msg [ 8%] Built target hello [ 11%] Generating EusLisp code from arbotix_msgs/Analog.msg [ 14%] Generating EusLisp code from arbotix_msgs/Relax.srv Scanning dependencies of target arbotix_msgs_generate_messages_nodejs [ 17%] Generating Javascript code from arbotix_msgs/Digital.msg [ 20%] Generating Javascript code from arbotix_msgs/Analog.msg [ 22%] Generating EusLisp code from arbotix_msgs/SetSpeed.srv [ 25%] Generating Javascript code from arbotix_msgs/Relax.srv [ 28%] Generating EusLisp code from arbotix_msgs/SetupChannel.srv [ 31%] Generating Javascript code from arbotix_msgs/SetSpeed.srv [ 37%] Generating Javascript code from arbotix_msgs/SetupChannel.srv [ 37%] Generating EusLisp code from arbotix_msgs/Enable.srv [ 40%] Generating Javascript code from arbotix_msgs/Enable.srv [ 42%] Generating EusLisp manifest code for arbotix_msgs [ 42%] Built target arbotix_msgs_generate_messages_nodejs Scanning dependencies of target arbotix_msgs_generate_messages_lisp [ 45%] Generating Lisp code from arbotix_msgs/Digital.msg [ 48%] Generating Lisp code from arbotix_msgs/Analog.msg [ 51%] Generating Lisp code from arbotix_msgs/Relax.srv [ 54%] Generating Lisp code from arbotix_msgs/SetSpeed.srv [ 57%] Generating Lisp code from arbotix_msgs/SetupChannel.srv [ 60%] Generating Lisp code from arbotix_msgs/Enable.srv [ 60%] Built target arbotix_msgs_generate_messages_lisp Scanning dependencies of target arbotix_msgs_generate_messages_py [ 62%] Generating Python from MSG arbotix_msgs/Digital [ 65%] Generating Python from MSG arbotix_msgs/Analog [ 65%] Built target arbotix_msgs_generate_messages_eus Scanning dependencies of target arbotix_msgs_generate_messages_cpp [ 68%] Generating C++ code from arbotix_msgs/Digital.msg [ 71%] Generating Python code from SRV arbotix_msgs/Relax [ 74%] Generating Python code from SRV arbotix_msgs/SetSpeed [ 77%] Generating C++ code from arbotix_msgs/Analog.msg [ 80%] Generating Python code from SRV arbotix_msgs/SetupChannel [ 82%] Generating C++ code from arbotix_msgs/Relax.srv [ 85%] Generating Python code from SRV arbotix_msgs/Enable [ 88%] Generating C++ code from arbotix_msgs/SetSpeed.srv [ 91%] Generating Python msg __init__.py for arbotix_msgs [ 94%] Generating Python srv __init__.py for arbotix_msgs [ 97%] Generating C++ code from arbotix_msgs/SetupChannel.srv [ 97%] Built target arbotix_msgs_generate_messages_py [100%] Generating C++ code from arbotix_msgs/Enable.srv [100%] Built target arbotix_msgs_generate_messages_cpp Scanning dependencies of target arbotix_msgs_generate_messages [100%] Built target arbotix_msgs_generate_messages uu@uu-HP-EliteBook-6930P-Notebook-PC:~/catkin_ws$
这样就解决了arbotix的安装问题
5,同样操作,接下来我们需要安装用来测试与学习的rivz第三方包 rbx_vol_1。
先下载rbx_vol_1 包
下载完成也需要catkin_make
这一步与上面是一样的方法。
$ cd ~/catkin_ws/src/
$ git clone https://github.com/pirobot/rbx1
/
uu@uu-HP-EliteBook-6930P-Notebook-PC:~/catkin_ws/src$ git clone https://github.com/pirobot/rbx1
Cloning into 'rbx1'...
remote: Counting objects: 1447, done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
//报错了几次才成功,N年前的资源就是不好
uu@uu-HP-EliteBook-6930P-Notebook-PC:~/catkin_ws/src$ git clone https://github.com/pirobot/rbx1/
Cloning into 'rbx1'...
remote: Counting objects: 1447, done.
remote: Total 1447 (delta 0), reused 0 (delta 0), pack-reused 1447
Receiving objects: 100% (1447/1447), 7.39 MiB | 14.00 KiB/s, done.
Resolving deltas: 100% (918/918), done.
uu@uu-HP-EliteBook-6930P-Notebook-PC:~/catkin_ws/src$
$ cd ..
$ catkin_make
uu@uu-HP-EliteBook-6930P-Notebook-PC:~/catkin_ws/src$ cd .. uu@uu-HP-EliteBook-6930P-Notebook-PC:~/catkin_ws$ catkin_make Base path: /home/uu/catkin_ws Source space: /home/uu/catkin_ws/src Build space: /home/uu/catkin_ws/build Devel space: /home/uu/catkin_ws/devel Install space: /home/uu/catkin_ws/install #### #### Running command: "cmake /home/uu/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/uu/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/uu/catkin_ws/install -G Unix Makefiles" in "/home/uu/catkin_ws/build" #### -- Using CATKIN_DEVEL_PREFIX: /home/uu/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /home/uu/catkin_ws/devel;/opt/ros/melodic -- This workspace overlays: /home/uu/catkin_ws/devel;/opt/ros/melodic -- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.15", minimum required is "2") -- Using PYTHON_EXECUTABLE: /usr/bin/python2 -- Using Debian Python package layout -- Using empy: /usr/bin/empy -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/uu/catkin_ws/build/test_results -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /usr/bin/python2 (found version "2.7.15") -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.7.14 -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~ traversing 15 packages in topological order: -- ~~ - arbotix (metapackage) -- ~~ - arbotix_controllers -- ~~ - arbotix_firmware -- ~~ - arbotix_python -- ~~ - arbotix_sensors -- ~~ - rbx1 (metapackage) -- ~~ - arbotix_msgs -- ~~ - beginner_tutorials -- ~~ - rbx1_speech -- ~~ - rbx1_bringup -- ~~ - rbx1_dynamixels -- ~~ - rbx1_vision -- ~~ - rbx1_apps -- ~~ - rbx1_nav -- ~~ - rbx1_description -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- +++ processing catkin metapackage: 'arbotix' -- ==> add_subdirectory(arbotix_ros/arbotix) -- +++ processing catkin package: 'arbotix_controllers' -- ==> add_subdirectory(arbotix_ros/arbotix_controllers) -- +++ processing catkin package: 'arbotix_firmware' -- ==> add_subdirectory(arbotix_ros/arbotix_firmware) -- +++ processing catkin package: 'arbotix_python' -- ==> add_subdirectory(arbotix_ros/arbotix_python) -- +++ processing catkin package: 'arbotix_sensors' -- ==> add_subdirectory(arbotix_ros/arbotix_sensors) -- +++ processing catkin metapackage: 'rbx1' -- ==> add_subdirectory(rbx1/rbx1) -- +++ processing catkin package: 'arbotix_msgs' -- ==> add_subdirectory(arbotix_ros/arbotix_msgs) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- arbotix_msgs: 2 messages, 4 services -- +++ processing catkin package: 'beginner_tutorials' -- ==> add_subdirectory(beginner_tutorials) -- +++ processing catkin package: 'rbx1_speech' -- ==> add_subdirectory(rbx1/rbx1_speech) -- +++ processing catkin package: 'rbx1_bringup' -- ==> add_subdirectory(rbx1/rbx1_bringup) -- +++ processing catkin package: 'rbx1_dynamixels' -- ==> add_subdirectory(rbx1/rbx1_dynamixels) -- +++ processing catkin package: 'rbx1_vision' -- ==> add_subdirectory(rbx1/rbx1_vision) -- +++ processing catkin package: 'rbx1_apps' -- ==> add_subdirectory(rbx1/rbx1_apps) -- +++ processing catkin package: 'rbx1_nav' -- ==> add_subdirectory(rbx1/rbx1_nav) -- +++ processing catkin package: 'rbx1_description' -- ==> add_subdirectory(rbx1/rbx1_description) -- Configuring done -- Generating done -- Build files have been written to: /home/uu/catkin_ws/build #### #### Running command: "make -j2 -l2" in "/home/uu/catkin_ws/build" #### [ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Relax [ 0%] Built target _arbotix_msgs_generate_messages_check_deps_SetupChannel [ 0%] Built target std_msgs_generate_messages_eus [ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Analog [ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Digital [ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Enable [ 0%] Built target _arbotix_msgs_generate_messages_check_deps_SetSpeed [ 0%] Built target std_msgs_generate_messages_nodejs [ 0%] Built target std_msgs_generate_messages_lisp [ 0%] Built target std_msgs_generate_messages_py [ 0%] Built target std_msgs_generate_messages_cpp Scanning dependencies of target rbx1_nav_gencfg [ 5%] Built target hello [ 8%] Generating dynamic reconfigure files from cfg/CalibrateAngular.cfg: /home/uu/catkin_ws/devel/include/rbx1_nav/CalibrateAngularConfig.h /home/uu/catkin_ws/devel/lib/python2.7/dist-packages/rbx1_nav/cfg/CalibrateAngularConfig.py [ 27%] Built target arbotix_msgs_generate_messages_eus [ 29%] Generating dynamic reconfigure files from cfg/CalibrateLinear.cfg: /home/uu/catkin_ws/devel/include/rbx1_nav/CalibrateLinearConfig.h /home/uu/catkin_ws/devel/lib/python2.7/dist-packages/rbx1_nav/cfg/CalibrateLinearConfig.py Generating reconfiguration files for CalibrateLinear in rbx1_nav Generating reconfiguration files for CalibrateAngular in rbx1_nav Wrote header file in /home/uu/catkin_ws/devel/include/rbx1_nav/CalibrateLinearConfig.h Wrote header file in /home/uu/catkin_ws/devel/include/rbx1_nav/CalibrateAngularConfig.h [ 45%] Built target arbotix_msgs_generate_messages_nodejs [ 62%] Built target arbotix_msgs_generate_messages_lisp [ 62%] Built target rbx1_nav_gencfg [ 83%] Built target arbotix_msgs_generate_messages_py [100%] Built target arbotix_msgs_generate_messages_cpp [100%] Built target arbotix_msgs_generate_messages uu@uu-HP-EliteBook-6930P-Notebook-PC:~/catkin_ws$
6,再打开一个终端运行roscore
$ roscore
编译结束后我们就可以使用
$ roslaunch rbx1_bringup fake_pi_robot.launch
报错:
File "/home/uu/catkin_ws/src/arbotix_ros/arbotix_python/bin/arbotix_driver", line 33, in <module>from arbotix_msgs.msg import * ImportError: No module named arbotix_msgs.msg [arbotix-2] process has died [pid 10508, exit code 1, cmd /home/uu/catkin_ws/src/arbotix_ros/arbotix_python/bin/arbotix_driver __name:=arbotix __log:=/home/uu/.ros/log/d9a20154-8f19-11e8-ba88-00216a949182/arbotix-2.log]. log file: /home/uu/.ros/log/d9a20154-8f19-11e8-ba88-00216a949182/arbotix-2*.log
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
$ echo $ROS_PACKAGE_PATH
报错:
IOError: [Errno 13] Permission denied: '/home/uu/.ros/rosdep/sources.cache/index' [arbotix-2] process has died [pid 10665, exit code 1, cmd /home/uu/catkin_ws/src/arbotix_ros/arbotix_python/bin/arbotix_driver __name:=arbotix __log:=/home/uu/.ros/log/312402ba-8f1a-11e8-ba88-00216a949182/arbotix-2.log]. log file: /home/uu/.ros/log/312402ba-8f1a-11e8-ba88-00216a949182/arbotix-2*.log
$ sudo rm -fr /home/uu/.ros/rosdep/sources.cache
$ rosdep update
命令运行模拟机器人了
仍然失败。。。。。。。。。。。。。。。。。。。后续补充吧
然后运行
$ rosrun rviz rviz -d 'rospack find rbx1_nav' /sim.rviz
rosrun rviz rviz -d `rospack find rbx1_nav`/sim.rviz
- 1
即可看到小车仿真
Ubuntu18.04 ROS melodic 版本的rivz教程相关推荐
- Ubuntu18.04 ROS Melodic版本安装gazebo_ros_pkgs包
疫情期间宅在家没法做实验,只能上手gazebo做仿真,导入实验室机器人的相关文件后,打算看看效果,运行代码 roslaunch probot_gazebo probot_anno_gazebo_wor ...
- Ubuntu18.04+Ros Melodic安装Moveit
Ubuntu18.04+Ros Melodic安装Moveit框架 感谢Robot_Tiger_原文https://blog.csdn.net/CH_monsy/article/details/108 ...
- Ubuntu18.04+ROS Melodic+RealsenseD435i+Robotiq-2F-85+UR5真实机械臂手眼标定(眼在手外)
一.配置环境 操作系统:Ubuntu 18.04 机械臂型号:UR5 :polyscope 3.14 夹爪型号:Robotiq 2F-85 深度相机:Intel RealSense - D435i 二 ...
- ubuntu18.04+ros melodic环境下手柄驱动环境安装
前言: 该博客仅作个人笔记使用,因为我已经有了手柄命令与机器人电机控制的底层协议,只是缺少手柄驱动,如需更全面的配置教程,请移步其他博客 环境:ubuntu 18.04 + Ros melodic 依 ...
- 3、速腾16线激光雷达RS-16 ----- 3D建图算法LeGO-LOAM的使用(Ubuntu18.04 + ROS Melodic)
Ubuntu18.04使用速腾16线激光雷达RS-16测试3D建图算法 LeGO-LOAM 的使用 1. 安装gtsam因子图库 2. 新建ROS工程目录文件夹,下载源码进行编译 3. 下载相关数据集 ...
- Ubuntu18.04+ROS melodic 控制UR5机器人(持续更新)
目录 0 前言 1 前置准备工作 1.1 环境配置 1.1.1 使用虚拟机安装Ubuntu系统 1.1.2 ROS melodic安装 1.2 工作空间配置 1.2.1 创建工作空间 1.2.2 导入 ...
- Ubuntu18.04+Ros melodic安装cartographer
Ros melodic安装参考Ubuntu18.04 安装ros全过程及各种问题骨灰级解决方法_gjwjw的博客-CSDN博客 本文cartographer安装主要参考cartographer环境建立 ...
- 双目立体视觉(2)- ZED2 SDK配置 Ubuntu18.04 + ROS melodic
ZED2 SDK 官方网站: https://www.stereolabs.com/developers/release/3.1/ 目录 1. 安装Ubuntu18.04+ROSmelodic 2. ...
- ubuntu18.04 ros melodic Autoware1.14源码编译安装(完整版,全过程)
一.安装NVIDIA驱动 查看推荐显卡 ubuntu-drivers devices 找到recommended推荐的版本 本机是470版本 sudo apt-get install nvidia-d ...
最新文章
- mysql中的 explain 关键字学习笔记
- 如何将一个集合里的对象进行计算再排序
- Dokan虚拟磁盘开发实战
- mybatis实现一对多关系《DeptEmp》
- 写一个易于维护使用方便性能可靠的Hybrid框架(一)—— 思路构建
- 【python】r+,w+ 全局变量
- 21个WordPress店铺必备免费工具
- 佳能c3020维修模式 白电平调整_天禹/TY流量计指示针不动维修附近厂家
- 使用Palette来对图片进行颜色提取
- TaskPaper教程——如何安装运行脚本?
- 汪华关于移动互联网兴起三大问题的解决
- Rav 瑞星产品了解
- 函数IsValid()
- Linux返回上一级目录的命令
- mysql help_深入理解mysql帮助命令(help)
- 肺癌救星:易瑞沙(吉非替尼)疗效及复查时间
- 【编译原理】构造产生如下语言的上下文无关文法各一个:
- 制作一个浪漫的表白网页
- 计算机u盘序列号,win10-u盘序列号cmd怎么查
- 数据平台初试(产品篇)——短视频直播监测案例分享
热门文章
- 力扣191.位1的个数
- C++ primer第一章练习笔记及书店程序
- 批量合并同一文件夹下工作簿-1
- write RE validation
- 《十天学会单片机和C语言编程》
- topcoder srm 628 div2 250 500
- jsp不能使用return时候,如何在出异常时退出,不在向下执行
- 电话号码正则表达式(支持手机号码,3-4位区号,7-8位直播号码,1-4位分机号)...
- (转)Spring Boot 2 (十):Spring Boot 中的响应式编程和 WebFlux 入门
- css根据屏幕大小切换样式