基于conda安装ros版本:
1. 基于高性能的mamba包工具进行管理:
conda install mamba -c conda-forge
2. 创建虚拟环境,以及设置下载ros的通道号
mamba create -n ros
mamba activate ros
# this adds the conda-forge channel to the new created environment configuration
conda config --env --add channels conda-forge
# and the robostack channel
conda config --env --add channels robostack-staging
# remove the defaults channel just in case, this might return an error if it is not in the list which is ok
conda config --env --remove channels defaults
3. 安装ros1或者ros2
# Install ros-noetic into the environment (ROS1)
mamba install ros-noetic-desktop
# Install ros-humble into the environment (ROS2)
mamba install ros-humble-desktop
4. 重新激活ros虚拟环境
mamba deactivate
mamba activate ros
5. 安装编译工具:
mamba install compilers cmake pkg-config make ninja colcon-common-extensions catkin_tools rosdep
6. 测试安装成功与否:
ros1:
mamba activate ros
roscore &
rviz
ros2:
mamba activate ros
rviz2
mamba 更新操作:
mamba update --all