一 moveit安装配置:
安装moveit:sudo apt-get install ros-melodic-moveit
配置环境:source /opt/ros/melodic/setup.bash
安装资源文件:sudo apt-get install ros-melodic-moveit-resources
安装moveit其他包:
sudo apt install ros-melodic-moveit-visual-tools
二 geomagic touch包安装步骤:
1 下载OpenHaptics for Linux Developer Edition v3.4
1.1 Openhaptics for Linux v3.4 OpenHaptic的环境配置文件
1.2 Touch Device Driver v2019.2.15 Touch的驱动文件
3D Systems Supporthttps://support.3dsystems.com/s/article/OpenHaptics-for-Linux-Developer-Edition-v34?language=en_US
2 OpenHaptic的环境配置文件
环境配置文件是一个后缀为openhaptics的压缩包,我们把它解压到任意位置,然后打开terminal
cd到解压后的文件夹目录下
sudo ./install
Step 1: Download the .tar file and extract the folders. Once extracted there must be 2 main folders namely “Bin and Lib”
Step 2: Copy the executables for Touch Setup and Touch diagnostics from the bin folder to /usr/bin and copy LibPhantomIOLib42.so to /usr/lib
sudo cp /home/wangsj/下载/TouchDriver2019_2_15_Linux/TouchDriver2019_2_14/bin/Touch_Diagnostic /usr/bin/
sudo cp /home/wangsj/下载/TouchDriver2019_2_15_Linux/TouchDriver2019_2_14/bin/Touch_Setup /usr/bin/
sudo cp /home/wangsj/下载/TouchDriver2019_2_15_Linux/TouchDriver2019_2_14/usr/lib/libPhantomIOLib42.so /usr/lib
Step 3: In case the user does not have QT, please install QT using the command Install qt: This command is only for Debian based systems
不用操作,ubuntu版本自带qt环境
sudo apt-get install qt5-default
Step 4: Create 3DS directory to configure and save the configuration files needed to setup the Touch and Touch X devices
sudo mkdir /usr/share/3DSystems
Step 5: Set environment variable GTDD_HOME to map path of the configuration file directory created above. Add the following environment variable to the /etc/environment to make it permanent.
环境变量GTDD_HOME我们也可以直接写入/etc/enviroment文件并保存,只需添加一行GTDD_HOME="/usr/share/3DSystems"
GTDD_HOME=/usr/share/3DSystems
echo $GTDD_HOME
Logout and login again for the environmental variables to take effect use the command:
gnome-session-quit
Step 6: Create folder called "config" inside /usr/share/3DSystems.
创建文件夹config用于保存Touch连接后的配置。
sudo mkdir /usr/share/3DSystems/config
Set permissions so that the folder is accessible to all users.
sudo chmod 777 /usr/share/3DSystems/config
环境变量的生效需要先注销再重新登入ubuntu系统;
Step 7: Connect the Haptic Device (Touch or Touch X). Use the “ListUSBHapticDevices” script to find out which port the haptic device has been assigned.
检测haptics设备的端口号(在TouchDriver目录下运行)
>bash ListUSBHapticDevices
Set permission for each com port using the command
端口赋权限
sudo chmod 777 /dev/ttyACM0 (ACM1, ACM2,ACM3 etc..)
Step 8: Once the Ports have appropriate permission or the LAN devices are linked locally, users can now successfully run the Touch Setup and Touch Diagnostic applications.
在TouchDriver的bin目录下运行sudo ./Touch_Setup,
这个程序运行后会出现一个界面,确认设备号和驱动版本有显示后,我们点击"apply"和"ok"。
然后,运行sudo ./Touch_Diagnostic
对Touch进行标定(先把笔头插入孔中)
三 配置ROS包环境
从github下clone包bharatm11,针对USB版的Touch做了一点修改
1 安装依赖项:
sudo apt-get install --no-install-recommends freeglut3-dev g++ libdrm-dev libexpat1-dev libglw1-mesa libglw1-mesa-dev libmotif-dev libncurses5-dev libraw1394-dev libx11-dev libxdamage-dev libxext-dev libxt-dev libxxf86vm-dev tcsh unzip x11proto-dri2-dev x11proto-gl-dev x11proto-print-dev
2 创建一个工作空间:
mkdir -p touch_ws/src
cd touch_ws/src
catkin_init_workspace
将下载/Geomagic_Touch_ROS_Drivers-hydro-devel下的所有文件拷贝到WSJ/touch_ws/src下,完成编译
catkin_make
确定没问题后,即可运行
roslaunch omni_common omni_state.launch
查看话题
rostopic echo /phantom/pose