整理一下Aubo机器人的ROS环境搭建步骤
- 完成WSL(Window system for Linux)下安装ROS
- 安装部分依赖包
sudo apt-get install ros-kinetic-moveit
sudo apt-get install ros-kinetic-industrial-core
- 建立工作空间
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
- 从GitHub中下载Aubo源代码
git clone https://github.com/lg609/aubo_robot.git
- 编译源代码
sudo apt-get install ros-kinetic-moveit-visual-tools
//rosdep install --from-paths src --ignore-src -r -y
cd ~/catkin_ws
catkin_make
如果编译时提示类似下方关于boost的Cmake Warning:
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
catkin_package() DEPENDS on 'boost' but neither 'boost_INCLUDE_DIRS' nor
'boost_LIBRARIES' is defined.
只需在~/WS_name/src/aubo_robot/aubo_kinematics
目录中编辑CMakeLists
文件,将其中的DEPENDS boost
修改为DEPENDS Boost
即可。
将工作空间加入环境变量中
echo 'source ~/WS_name/devel/setup.bash' >> ~/.bashrc
- 更新
Moveit_core_lib
cd ~/catkin_ws/src/aubo_robot/UpdateMoveitLib/Kinetic
chmod +x Update.sh
//赋以所有用户对Update.sh的执行权限,去除用chmod -x
sudo ./Update.sh
- 编辑.bashrc文件
sudo edit ~/.bashrc
在文件末尾添加
export ROS_PACKAGE_PATH=${
ROS_PACKAGE_PATH}:/你的工作空间路径/src
例如:
export ROS_PACKAGE_PATH=${
ROS_PACKAGE_PATH}:~/catkin_ws/src
并确认文件中包含类似下面的文字指明环境信息
source /opt/ros/kinetic/setup.bash
source ~