ROS MoveIT1(Noetic)安装总结

前言

由于MoveIT2的Humble的教程好多用的还是moveit1的环境,所以又装了Ubutun20.04和ROS1(Noetic)。【2022年12月6日】

环境

系统:Ubutun20.04LTS
Ros:Noetic
虚拟机:VMware

安装 ROS Noetic

安装教程:

http://wiki.ros.org/noetic/Installation/Ubuntu
https://blog.csdn.net/lemon_TT/article/details/124672682

安装 ROS 后,请确保您拥有最新的软件包:

rosdep update
sudo apt update
sudo apt dist-upgrade

安装catkin ROS构建系统:

sudo apt install ros-noetic-catkin python3-catkin-tools python3-osrf-pycommon

安装wstool:

sudo apt install python3-wstool

创建 Catkin 工作区并下载 MoveIt 源

需要从源代码构建所有 MoveIt。您将需要有一个catkin工作区设置:

mkdir -p ~/ws_moveit/src
cd ~/ws_moveit/src

wstool init .
wstool merge -t . https://raw.githubusercontent.com/ros-planning/moveit/master/moveit.rosinstall
wstool remove  moveit_tutorials  # this is cloned in the next section
wstool update -t .

如果报错:ERROR in config: Unable to download URL [https://raw.githubusercontent.com/r
把https://raw.githubusercontent.com/ros-planning/moveit/master/moveit.rosinstall打开直接复制内容到隐藏文件.rosinstall即可。

此处可能下载不成功,把隐藏文件可见,在所有的网址前面加上https://ghproxy.com/,如果不动了,Ctrl+C后,重新来一遍wstool update -t .

- git:
    local-name: geometric_shapes
    uri: https://ghproxy.com/github.com/ros-planning/geometric_shapes.git
    version: noetic-devel
- git:
    local-name: moveit
    uri: https://ghproxy.com/github.com/ros-planning/moveit.git
    version: master
- git:
    local-name: moveit_msgs
    uri: https://ghproxy.com/github.com/ros-planning/moveit_msgs.git
    version: master
- git:
    local-name: moveit_resources
    uri: https://ghproxy.com/github.com/ros-planning/moveit_resources.git
    version: master
- git:
    local-name: moveit_visual_tools
    uri: https://ghproxy.com/github.com/ros-planning/moveit_visual_tools.git
    version: master
- git:
    local-name: panda_moveit_config
    uri: https://ghproxy.com/github.com/ros-planning/panda_moveit_config.git
    version: noetic-devel
- git:
    local-name: rviz_visual_tools
    uri: https://ghproxy.com/github.com/PickNikRobotics/rviz_visual_tools
    version: master
- git:
    local-name: srdfdom
    uri: https://ghproxy.com/github.com/ros-planning/srdfdom
    version: noetic-devel

下载示例代码

在catkin工作区中,下载教程和panda_moveit_config软件包。

cd ~/ws_moveit/src
git clone https://github.com/ros-planning/moveit_tutorials.git -b master

建立 Catkin 工作区

ROS原始的编译和打包系统是rosbuild,而catkin是现在ROS官方指定的系统。catkin的原理和流程和CMake很类似,与rosbuild相比,它的可移植性,以及对交叉编译的支持更好。

cd ~/ws_moveit/src
rosdep install -y --from-paths . --ignore-src --rosdistro noetic

如果报错:ERROR: the following rosdeps failed to install apt: command [sudo -H apt-get install -y ros-noetic-controller-manager-msgs] failed
不要换源,一级一级网上找发现:依赖: libpoco-dev 但无法安装它。安装它并重新安装

sudo apt-get install libpoco-dev.
rosdep install -y --from-paths . --ignore-src --rosdistro noetic

配置你的 catkin 工作区:

cd ~/ws_moveit
catkin config --extend /opt/ros/${ROS_DISTRO} --cmake-args -DCMAKE_BUILD_TYPE=Release
catkin build

这一步需要挺久的,可以临时加大虚拟机的内存。

source ~/ws_moveit/devel/setup.bash
echo 'source ~/ws_moveit/devel/setup.bash' >> ~/.bashrc

RViz 可视化

roslaunch panda_moveit_config demo.launch rviz_tutorial:=true

ROS MoveIT1(Noetic)安装总结_第1张图片
ROS MoveIT1(Noetic)安装总结_第2张图片

ROS MoveIT1(Noetic)安装总结_第3张图片

参考

https://blog.csdn.net/qq_27545821/article/details/123036044
https://ros-planning.github.io/moveit_tutorials/doc/getting_started/getting_started.html

你可能感兴趣的:(机器人,软件安装及故障,Linux,机器人,ros,moveit)