ros下启动omni手控器,订阅话题

  • usb设为可执行
cd ~/omni/TouchDriver2019_2_15_Linux/TouchDriver2019_2_14./ListUSBHapticDevices
# /dev/ttyACM0./ListUSBHapticDevices /dev/ttyACM0
# /dev/ttyACM0sudo chmod 777 /dev/ttyACM0
  • 运行omni_common omni_state.launch
cd ~/car_ws/src/Geomagic_Touch_ROS_Drivers-hydro-devel/omni_common/launchroslaunch omni_common omni_state.launch
  • 运行python,订阅话题
cd ~/car_ws/src/Geomagic_Touch_ROS_Drivers-hydro-devel/omni_common/src
python listener4.py

手控器相关话题

启动launch文件后的话题列表为:

$ rostopic list/phantom/button
/phantom/force_feedback
/phantom/joint_states
/phantom/pose
/phantom/state
/rosout
/rosout_agg
  • /phantom/button
guyue@guyue:~$ rostopic echo /phantom/buttongrey_button: 1
white_button: 0
---
grey_button: 0
white_button: 0
---
  • /phantom/joint_states
guyue@guyue:~$ rostopic echo /phantom/joint_states---
header: seq: 44057stamp: secs: 1627442790nsecs: 151462066frame_id: ''
name: [waist, shoulder, elbow, yaw, pitch, roll]
position: [-0.0, 0.26888954639434814, -0.6397024393081665, 3.1529915687912187, -3.13045995831292, -3.447229327755519]
velocity: []
effort: []
---
  • /phantom/pose
guyue@guyue:~$ rostopic echo /phantom/pose---
header: seq: 516525stamp: secs: 1627390215nsecs: 931911788frame_id: "/map"
pose: position: x: 0.0y: 0.0881141967773z: -0.0655107116699orientation: x: -0.181168104759y: -0.0779586342595z: -0.385540513457w: 0.901365121161
---
  • /phantom/state
guyue@guyue:~$ rostopic echo /phantom/state---
header: seq: 581194stamp: secs: 1627390280nsecs: 600925748frame_id: ''
locked: True
close_gripper: True
pose: position: x: -24.5597171783y: 15.7225236893z: -9.16426181793orientation: x: -0.132378251324y: -0.111142464598z: -0.768582546722w: 0.615957969357
current: x: 0.0y: 0.0z: 0.0
velocity: x: -0.210287976682y: -1.33447144402z: 0.610092210632
---

报错及解决

错误1 不能复制文件

ubuntu cp拷贝文件夹报错“文件系统不支持符号链接”

  • 解决
    说明待拷贝的文件夹内部有不支持拷贝的文件格式,可以将文件夹压缩为压缩包,再复制
    参考:https://blog.csdn.net/Q893448322/article/details/116023201

错误2 missing: SDL_LIBRARY SDL_INCLUDE_DIR

将复制过来的文件解压,将工作空间中的devel和build文件夹删除,运行catkin_make,报错:

Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR)
  • 解决
sudo apt-get install libsdl-dev

参考:https://blog.csdn.net/weixin_30819163/article/details/97343928

错误3 missing: SDL_LIBRARY SDL_INCLUDE_DIR

解决完上面的问题,再次运行catkin_make,报错:

Could NOT find SDL_image (missing: SDL_IMAGE_LIBRARIES SDL_IMAGE_INCLUDE_DIRS)

  • 解决
sudo apt-get install libsdl-image1.2-dev

参考:https://blog.csdn.net/weixin_30563319/article/details/97343932

错误4 Could not find a package configuration file provided by “libuvc”

解决完上面的问题,再次运行catkin_make,报错:

Could not find a package configuration file provided by "libuvc" with anyof the following names:libuvcConfig.cmakelibuvc-config.cmake

  • 解决
sudo apt-get install ros-melodic-libuvc

参考:https://blog.csdn.net/JimmyC18/article/details/108273954

问题5 Invoking “make -j16 -l16” failed

解决完上面的问题,再次运行catkin_make,报错:

Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j16 -l16" failed

  • 解决
    好多都说是在opencv中报错的,然后想到以前装opencv的时候,"make -j16 -l16"应该是多核编译,所以可能是卡住了或者什么
    重新运行catkin_make即可

问题6 找不到 -lncurses

重新运行catkin_meke后报错

/usr/bin/ld: 找不到 -lncurses
collect2: error: ld returned 1 exit status
/usr/bin/ld: 找不到 -lncurses
collect2: error: ld returned 1 exit status
Geomagic_Touch_ROS_Drivers-hydro-devel/omni_common/CMakeFiles/omni.dir/build.make:118: recipe for target '/home/guyue/catkin_ws/devel/lib/omni_common/omni' failed
make[2]: *** [/home/guyue/catkin_ws/devel/lib/omni_common/omni] Error 1
CMakeFiles/Makefile2:11777: recipe for target 'Geomagic_Touch_ROS_Drivers-hydro-devel/omni_common/CMakeFiles/omni.dir/all' failed
make[1]: *** [Geomagic_Touch_ROS_Drivers-hydro-devel/omni_common/CMakeFiles/omni.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
Geomagic_Touch_ROS_Drivers-hydro-devel/omni_common/CMakeFiles/omni_state.dir/build.make:118: recipe for target '/home/guyue/catkin_ws/devel/lib/omni_common/omni_state' failed
make[2]: *** [/home/guyue/catkin_ws/devel/lib/omni_common/omni_state] Error 1
CMakeFiles/Makefile2:11738: recipe for target 'Geomagic_Touch_ROS_Drivers-hydro-devel/omni_common/CMakeFiles/omni_state.dir/all' failed
make[1]: *** [Geomagic_Touch_ROS_Drivers-hydro-devel/omni_common/CMakeFiles/omni_state.dir/all] Error 2

  • 解决
sudo apt-get install ros-melodic-libuvc

参考:https://blog.csdn.net/weixin_43723326/article/details/103427351

问题7 [omni_state.launch] is neither a launch file in package [omni_common] nor is [omni_common] a launch file name

catkin_make成功后,运行launch文件,报错:

RLException: [omni_state.launch] is neither a launch file in package [omni_common] nor is [omni_common] a launch file name
The traceback for the exception was written to the log file

  • 解决
    这应该是因为新复制过来的工作空间没有添加路径
echo "source ~/car_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

添加完路径后,需要重新打开终端

在ros下使用omni相关推荐

  1. 深入理解ROS技术 【2】ROS下的模块详解(66-128)

    概述: 本篇以字典方式,列出所有的Ros下模块,给出初步解释.并针对其重要程度,用星级标出重要性.这些概念解释中,还列出其它文章的链接. 模块表述: 65 interactive_marker_tut ...

  2. 深入理解ROS技术 【1】ROS下的模块详解(1-65)

    ROS初探--意义.基本模块_Peace-CSDN博客 概述: 初学者要想快速入门,必须对于众多的ROS模块初步有个认识,需要主动地.有计划地查阅.本篇以字典方式,列出所有的Ros下模块,给出初步解释 ...

  3. ZED 相机 ORB-SLAM2安装环境配置与ROS下的调试

    注:1. 对某些地方进行了更新(红色标注),以方便进行配置. 2. ZED ROS Wrapper官方github已经更新,根据描述新的Wrapper可能已经不适用与Ros Indigo了,如果大家想 ...

  4. ROS下获取kinectv2相机的仿照TUM数据集格式的彩色图和深度图

    准备工作: 1. ubuntu16.04上安装iai-kinect2, 2. 运行roslaunch kinect2_bridge kinect2_bridge.launch, 3. 运行 rosru ...

  5. ros下的python代码的编写与回调函数

    在做的一个项目有用到pytorch,然后需要利用rviz来进行显示,因此只能是在ros下编写python的功能包,在此做一下记录. 1 ROS下的python代码的编写 实际一个scripts的文件夹 ...

  6. NLOPT ros下的使用

    NLOPT是优化库,在路径规划中可以用于对目标函数的优化,在这里对它的使用进行记录,这个是初稿,后面还会进行修改. 1.NLOPT的安装 直接使用安装包进行编译安装,否则ros下会无法找到这个包. 2 ...

  7. ROS下使用C++读取txt文本数据并使用

    本代码功能:在ROS下使用C++读取txt文本数据并对数据进行处理 分析:ROS的核心是话题订阅与发布,但作为ROS小白的我经常被各种话题搞得云里雾里,故本博客将可以处理的数据存入txt文本,通过读取 ...

  8. basler相机外部硬触发,转换图像格式并发送到ROS下的topic

    运行环境:Ubuntu20.04 (64-Bit) 运行软件:pylon Viewer 64-Bit,pylon Release 6.3.0 相机型号:acA 1920-25gc (GigE接口) 触 ...

  9. ORB-SLAM2(2) ROS下配置和编译

    1配置USB相机 1.1网友参考: http://www.liuxiao.org/2016/07/ubuntu-orb-slam2-%E5%9C%A8-ros-%E4%B8%8A%E7%BC%96%E ...

最新文章

  1. c语言lang变量,02-GoLang定义变量
  2. RESTful协议【软件架构】
  3. Swift2.0语言教程之函数嵌套调用形式
  4. [css] 如何取消页面中选中的文字?
  5. matlab 等势面立体图,求助大牛MATLAB画三维等势面
  6. ESFramework介绍之(28)―― Udp组件
  7. python自学行吗-自学python有用吗?
  8. 个人知识管理能解决什么问题?
  9. 十八、完成登录与注册页面的前端
  10. leapmotion 运行出错,看不到手势
  11. linux:云端 ubuntu下挂载数据盘
  12. 网络工程制图论文计算机,工程制图论文
  13. Vue2实现长按图片识别二维码
  14. 设计模式:设计模式经典总结
  15. 【我的Android进阶之旅】解决使用DiskLruCache报错: keys must match regex [a-z0-9_-]{1,64}
  16. 人工智能与大数据就业前景_学大数据和人工智能哪个方向好?
  17. Dev C++可以编译但运行时提示Failed to execute且Error 0:操作成功完成。
  18. 2021章节练习基础(案例精选)30-40
  19. 在沙箱运行游戏链接不上服务器,地牢猎手5连接不上服务器怎么办 无法进入游戏解决方法...
  20. 探索在原生网页中使用自定义数据属性

热门文章

  1. FPGA验证学习(五):SoC的总线架构
  2. 怎么把图片修改成600x800像素图片?
  3. FreeBSD安装时的参考文章
  4. Android 实战制作简易天气预报
  5. 每个月存500零花钱,第9年就会有10W?
  6. 平价音质好的蓝牙耳机推荐:为蓝牙耳机小白避坑
  7. 一、ABP启动运行项目
  8. 打印四年级计算机,(完整版)四年级上下册数学公式汇总,电子版打印给孩子背!...
  9. SVN插件提交报错Attempted to lock an already-locked dir svn: Working copy
  10. Linux下置空文件的方法小结