您的位置:首页 > 其它

在KUKA-youbot的板载PC上安装RT2870型无线网卡驱动并实现远程控制

2017-04-02 21:47 405 查看
实验室新进了一台KUKA-youbot,包括一个万向移动平台和一个五自由度的机械臂,之后会陆续地做一些开发工作。首先是一些准备工作。


一、在KUKA-youboy的板载PC(Ubuntu12.04系统)上安装无线网卡驱动

打开终端,输入以下命令:(需下载安装包DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2)

sudo apt-get install linux-headers-$(uname -r)
sudo apt-get install --reinstall linux-headers-generic build-essential
tar xjf DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2
cd DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/
make
sudo mkdir -p /etc/Wireless/RT2870STA/
sudo cp RT2870STA.dat /etc/Wireless/RT2870STA/RT2870STA.dat
sudo /sbin/insmod os/linux/mt7601Usta.ko
sudo make install


安装完成后可检测到无线wifi信号,但报错:

System policy prevents modification of network settings for all users。

解决方案:

首先执行:

sudo passwd


(以上为了重设密码, 重设的是root密码,不是用户密码,ubuntu系统初始时是没有固定root密码的,要人为设定)

之后进行以下操作:

1. su to root
su -
2. Type the following:
nano /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy
3. Towards the end of the file, find the section labeled:
<action id="org.freedesktop.NetworkManager.settings.modify.system">
At the the bottom of the Section, locate the following line of code:
<allow_active>auth_admin_keep</allow_active>
Change this line to read as follows:
<allow_active>yes</allow_active>
4. Save the file using:
^X  (按住Ctrl键)
5. Answer "Save modified buffer (ANSWERING "No" WILL DESTROY
CHANGES) ?" by Typing:
Y
6. Hit Enter when prompted with:
File Name to Write: /usr/share/polkit
1/actions/org.freedesktop.NetworkManager.policy
8. Restart.


搞定!

二、远程控制(一个desktop,一个robot)

用另一台安装了ubuntu系统的电脑实现对KUKA-youbot的远程无线控制。具体内容参考了《ros_by_example_2_hydro___volume_1》这本书:

使两台电脑均接入相同的局域网

To install chrony, run the command: (在两台电脑上均安装)

sudo apt-get install chrony

更改两台机器的hostname:

hostname my_robot.local

hostname my_desktop.local

尝试互相ping对方:

ping my_robot.local

可分别加入~/.bashrc中

(1)在robot上:

export ROS_HOSTNAME=my_robot.local

roscore

(2)在desktop上:

export ROS_HOSTNAME=my_desktop.local

export ROS_MASTER_URI=http://my_robot.local:11311

使desktop与robot同步,run ntpdate:

sudo ntpdate –b my_robot.local

注:由desktop采用ssh登录robot.

sudo ssh my_robot.local

输入desktop密码

输入robot密码

切换到root@ubuntu$:(kuka-youbot)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: