gazebo11 ros 集成环境安装
1、gazebo11安装
首先要搞清楚状态,环境要求很重要,gazebo11不是目前写gazebo最新版本,所以想安装gazebo11的,不要使用ubuntu22.04或更新的操作系统版本,我在这上面花了太多时间!gazebo版本与ubuntu操作系统版本有对应关系,对应关系不一致会导致安装出问题!
据我在官网了解gazebo11支持的系统为ubuntu18.04 \ ubuntu22.04 分别对应的ros 为 melodic 和 noetic!!!
常规操作,先更换ubuntu apt源
sudo vim /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
上面源加入sources.list文件中,可以将默认源#号注释掉
sudo apt-get update
sudo apt-get upgrade
更新源列表
检查gazebo版本
$ dpkg -l | grep gazebo
卸载老版本和相关插件
sudo apt-get remove gazebo9 gazebo9-common gazebo9-plugin-base libgazebo9:amd64 libgazebo9-dev:amd64 ros-melodic-gazebo-*
设置镜像源和key
$ sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
$ wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
安装gazebo11
$ sudo apt-get update
$ sudo apt-get install gazebo11
$ sudo apt-get install libgazebo11-dev
输入gazebo命令,打开正常,安装gazebo成功。
2、ros安装
添加apt源文件
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
添加key
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
更新源软件列表
sudo apt update
有需要可以安装ros 全功能版本
sudo apt install ros-
melodic
-desktop-full
也可以安装部分功能
sudo apt install ros-melodic-gazebo-ros-pkgs
sudo apt install ros-melodic-gazebo-ros-control
sudo apt install ros-
melodic
-ros-controllers
$ sudo apt install ros-
melodic
-ros-core$
sudo apt install ros-melodic-geometry2
配置ros的系统环境变量
source /opt/ros/melodic/setup.bash echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc source ~/.bashrc 测试环境
启动roscore核心服务
roscore
rosrun gazebo_ros gazebo 可以通过ros运行gazebo就OK了!
rosdep init rosdep update 下载出错解决办法转载
https://blog.csdn.net/czsnooker/article/details/120058151
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 上周热点回顾(3.3-3.9)
· AI 智能体引爆开源社区「GitHub 热点速览」