KUKA youBot在ROS下的驱动问题

来源:互联网 发布:2017开淘宝店要多少钱 编辑:程序博客网 时间:2024/05/22 12:07

接触youBot也很久了,但还是常常也遇到一些can not find slave on eth的问题,后来师弟建议我写篇博客整理下,在查阅youBot Store和网友的一些方法,总结起来如下:主要是驱动、权限、网口配置、网线等这几个方面,可靠连接,软件和硬件为基础,结合起来才能够起作用。

youBot的驱动是利用上位机,结合网线作为传输介质,同时借助于开源的SOEM(Simple Open EtherCAT Master)来进行数据传输与解析。

这个在我们编译youbot的驱动的时候可以看到相关的一些动态链接库


  • 驱动

驱动的话现在主要是youbot_driver_ros_interface这个包,但是它依赖与youbot_driver和youbot_description这两个

sudo apt-get install ros-indigo-youbot-driver-ros-interface ros-indigo-youbot-description
这种方式是装在系统的/opt/ros/indigo/share下的,推荐这种方式

  • 权限

安装完毕以后,还需要给普通用户赋予网络通信的权限,不然无论怎么换网口,改变ethecat的配置都会can not find slave on eth*的。

sudo setcap cap_net_raw+ep /opt/ros/indigo/lib/youbot_driver_ros_interface/youbot_driver_ros_interface
sudo ldconfig /opt/ros/indigo/lib
在youbot的官网也有提到这个http://www.youbot-store.com/wiki/index.php/ROS_Wrapper

  • 网口设置

网口的设置文件在我这的是~/catkin_ws/src/youbot_driver/config/youbot-ethercat.cfg,这个是我在github上clone下来的放在了本地catkin_ws下。在~/.bashrc环境变量配置文件中加入句export YOUBOT_CONFIG_FOLDER_LOCATION=~/catkin_ws/src/youbot_driver/config指明配置文件的位置。

按照youbot_user_manual上说的,只用改EthernetDevice = eth1这行的这个条目就行,所以常常需要我们看看host宿主机的ip端口。如我这里是eth1和eth2

  • 网线问题
  • firmware问题

这个地方非常特别,官方做法是说改cfg,但是并不能解决问题,http://www.youbot-store.com/wiki/index.php/The_youBot_base_motor_controller_have_to_be_of_type:_174_or_1632 后来我试过这个发现可以解决问题,indigo也一样可以用点击打开链接

最后,有其他我再补充。以下是官网上的常见问题

Errors

  1. No EtherCAT connection / No EtherCAT slaves found!
  2. The youBot base motor controller have to be of type: 174 or 1632
  3. Execute as a root
  4. error while loading shared libraries
  5. X EtherCAT slaves found
  6. ROS commands like roscd or rosmake are not working properly, although ROS was installed
  7. l2t exception

Other problems

  1. Setting password protected control board parameters
  2. Reading voltage values from the battery
  3. Visualizing performance of robot connected via SSH in Rviz on master device

1 0