ArduPilot飞控之ubuntu22.04-Gazebo模拟

2023-05-16

ArduPilot飞控之ubuntu22.04-Gazebo模拟

  • 1. 源由
  • 2. Gazebo安装
    • 2.1 ubuntu22.04系统更新
    • 2.2 安装Gazebo Garden
    • 2.3 安装ArduPilot Gazebo插件
      • 2.3.1 基础库安装
      • 2.3.2 源代码编译
      • 2.3.3 配置插件
    • 2.4 测试Gazebo Garden
  • 3. ArduPilot SITL + Gazebo模拟
    • 3.1 Gazebo Garden模拟环境
    • 3.2 ArduPilot SITL仿真环境
    • 3.3 ArduPilot SITL + Gazebo 测试视频
  • 4. 参考资料
  • 5. 补充资料
    • 5.1 官网视频
    • 5.2 关于HITL

1. 源由

Gazebo是一款知名且备受业界推崇的模拟器,已被广泛用于地面、海洋和太空机器人的许多模拟挑战,包括DARPA机器人竞赛。

这里简单介绍如何使用最新一代Gazebo作为ArduPilot Rover、Coper和Plane的外部模拟器。为后续模拟器调试奠定基础。

2. Gazebo安装

2.1 ubuntu22.04系统更新

$ sudo apt-get update
$ sudo apt-get install lsb-release wget gnupg

2.2 安装Gazebo Garden

$ sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
$ sudo apt-get update
$ sudo apt-get install gz-garden

2.3 安装ArduPilot Gazebo插件

2.3.1 基础库安装

$ sudo apt install libgz-sim7-dev rapidjson-dev

2.3.2 源代码编译

$ git clone git@github.com:ArduPilot/ardupilot_gazebo.git
$ cd ardupilot_gazebo
$ mkdir build && cd build
$ cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
$ make -j4

2.3.3 配置插件

可选择手工或者脚本配置方法

$ export GZ_SIM_SYSTEM_PLUGIN_PATH=<ardupilot_gazebo path>/build:$GZ_SIM_SYSTEM_PLUGIN_PATH
$ export GZ_SIM_RESOURCE_PATH=<ardupilot_gazebo path>/models:$HOME/ardupilot_gazebo/worlds:$GZ_SIM_RESOURCE_PATH
or
$ echo 'export GZ_SIM_SYSTEM_PLUGIN_PATH=$HOME/ardupilot_gazebo/build:${GZ_SIM_SYSTEM_PLUGIN_PATH}' >> ~/.bashrc
$ echo 'export GZ_SIM_RESOURCE_PATH=$HOME/ardupilot_gazebo/models:$HOME/ardupilot_gazebo/worlds:${GZ_SIM_RESOURCE_PATH}' >> ~/.bashrc

这里笔者采用脚本配置方法:

$ pwd
/home/daniel/Work/ardupilot_gazebo

$ echo 'export GZ_SIM_SYSTEM_PLUGIN_PATH=/home/daniel/Work/ardupilot_gazebo/build:${GZ_SIM_SYSTEM_PLUGIN_PATH}' >> ~/.bashrc
$ echo 'export GZ_SIM_RESOURCE_PATH=/home/daniel/Work/ardupilot_gazebo/models:/home/daniel/Work/ardupilot_gazebo/worlds:${GZ_SIM_RESOURCE_PATH}' >> ~/.bashrc

$ . ~/.profile

2.4 测试Gazebo Garden

$ gz sim -v4 -r shapes.sdf
[Msg] Gazebo Sim GUI    v7.4.0
[Dbg] [gz.cc:162] Subscribing to [/gazebo/starting_world].
[Dbg] [gz.cc:164] Waiting for a world to be set from the GUI...
[Dbg] [Gui.cc:260] Waiting for subscribers to [/gazebo/starting_world]...
[Msg] Received world [shapes.sdf] from the GUI.
[Dbg] [gz.cc:168] Unsubscribing from [/gazebo/starting_world].
[Msg] Gazebo Sim Server v7.4.0
[Msg] Loading SDF world file[/usr/share/gz/gz-sim7/worlds/shapes.sdf].
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[Msg] Serving entity system service on [/entity/system/add]
[Msg] Loaded level [3]
[Msg] No systems loaded from SDF, loading defaults
[Dbg] [ServerConfig.cc:1042] Loaded (3) plugins from file [/home/daniel/.gz/sim/7/server.config]
[Dbg] [Physics.cc:869] Loaded [gz::physics::dartsim::Plugin] from library [/usr/lib/x86_64-linux-gnu/gz-physics-6/engine-plugins/libgz-physics-dartsim-plugin.so]
[Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::Physics] for entity [1]
[Msg] Create service on [/world/shapes/create]
[Msg] Remove service on [/world/shapes/remove]
[Msg] Pose service on [/world/shapes/set_pose]
[Msg] Pose service on [/world/shapes/set_pose_vector]
[Msg] Light configuration service on [/world/shapes/light_config]
[Msg] Physics service on [/world/shapes/set_physics]
[Msg] SphericalCoordinates service on [/world/shapes/set_spherical_coordinates]
[Msg] Enable collision service on [/world/shapes/enable_collision]
[Msg] Disable collision service on [/world/shapes/disable_collision]
[Msg] Material service on [/world/shapes/visual_config]
[Msg] Material service on [/world/shapes/wheel_slip]
[Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::UserCommands] for entity [1]
[Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::SceneBroadcaster] for entity [1]
[Msg] Serving world controls on [/world/shapes/control], [/world/shapes/control/state] and [/world/shapes/playback/control]
[Msg] Serving GUI information on [/world/shapes/gui/info]
[Msg] World [shapes] initialized with [default_physics] physics profile.
[Msg] Serving world SDF generation service on [/world/shapes/generate_world_sdf]
[Msg] Serving world names on [/gazebo/worlds]
[Msg] Resource path add service on [/gazebo/resource_paths/add].
[Msg] Resource path get service on [/gazebo/resource_paths/get].
[Msg] Resource path resolve service on [/gazebo/resource_paths/resolve].
[Msg] Resource paths published on [/gazebo/resource_paths].
[Msg] Server control service on [/server_control].
[Msg] Found no publishers on /stats, adding root stats topic
[Msg] Found no publishers on /clock, adding root clock topic
[Dbg] [SimulationRunner.cc:513] Creating PostUpdate worker threads: 2
[Dbg] [SimulationRunner.cc:524] Creating postupdate worker thread (0)
[Dbg] [Application.cc:96] Initializing application.
[Dbg] [Application.cc:122] Qt using OpenGL graphics interface
[Msg] Serving scene information on [/world/shapes/scene/info]
[Msg] Serving graph information on [/world/shapes/scene/graph]
[Msg] Serving full state on [/world/shapes/state]
[Msg] Serving full state (async) on [/world/shapes/state_async]
[Msg] Publishing scene information on [/world/shapes/scene/info]
[Msg] Publishing entity deletions on [/world/shapes/scene/deletion]
[Msg] Publishing state changes on [/world/shapes/state]
[Msg] Publishing pose messages on [/world/shapes/pose/info]
[Msg] Publishing dynamic pose messages on [/world/shapes/dynamic_pose/info]
[GUI] [Dbg] [Application.cc:596] Create main window
[GUI] [Wrn] [Application.cc:845] [QT] qrc:/qml/StyleDialog.qml:112:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:845] [QT] qrc:/qml/StyleDialog.qml:105:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:845] [QT] qrc:/qml/StyleDialog.qml:98:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:845] [QT] qrc:qml/Main.qml:102:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:845] [QT] qrc:/qml/PluginMenu.qml:27:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Dbg] [PathManager.cc:67] Requesting resource paths through [/gazebo/resource_paths/get]
[GUI] [Wrn] [Application.cc:845] [QT] file::/Gazebo/GazeboDrawer.qml:241:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Dbg] [PathManager.cc:56] Received resource paths.
[GUI] [Wrn] [Application.cc:845] [QT] file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for property "implicitHeight"
[GUI] [Wrn] [Application.cc:845] [QT] file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for property "implicitHeight"
[GUI] [Dbg] [Gui.cc:340] GUI requesting list of world names. The server may be busy downloading resources. Please be patient.
[GUI] [Dbg] [Gui.cc:398] Requesting GUI from [/world/shapes/gui/info]...
[GUI] [Dbg] [GuiRunner.cc:149] Requesting initial state from [/world/shapes/state]...
[GUI] [Msg] Loading config [/home/daniel/.gz/sim/7/gui.config]
[GUI] [Dbg] [Application.cc:453] Loading plugin [MinimalScene]
[Dbg] [EntityComponentManager.cc:1619] Updated state thread iterators: 2 threads processing around 15 entities each.
[Wrn] [Component.hh:144] Trying to serialize component with data type [N3sdf3v135WorldE], which doesn't have `operator<<`. Component will not be serialized.
[Wrn] [Model.hh:69] Skipping serialization / deserialization for models with //pose/@relative_to attribute.
[GUI] [Dbg] [MinimalScene.cc:657] Creating gz-rendering interface for OpenGL
[GUI] [Dbg] [MinimalScene.cc:657] Creating gz-rendering interface for OpenGL
[GUI] [Dbg] [MinimalScene.cc:813] Creating render thread interface for OpenGL
[GUI] [Msg] Added plugin [3D View] to main window
[GUI] [Msg] Loaded plugin [MinimalScene] from path [/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [EntityContextMenuPlugin]
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:57:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Msg] Added plugin [Entity Context Menu] to main window
[GUI] [Msg] Loaded plugin [EntityContextMenuPlugin] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libEntityContextMenuPlugin.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [GzSceneManager]
[GUI] [Msg] Added plugin [Scene Manager] to main window
[GUI] [Msg] Loaded plugin [GzSceneManager] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libGzSceneManager.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [InteractiveViewControl]
[GUI] [Msg] Camera view controller topic advertised on [/gui/camera/view_control]
[GUI] [Msg] Camera reference visual topic advertised on [/gui/camera/view_control/reference_visual]
[GUI] [Msg] Camera view control sensitivity advertised on [/gui/camera/view_control/sensitivity]
[GUI] [Msg] Added plugin [Interactive view control] to main window
[GUI] [Msg] Loaded plugin [InteractiveViewControl] from path [/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libInteractiveViewControl.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [CameraTracking]
[GUI] [Msg] Added plugin [Camera tracking] to main window
[GUI] [Msg] Loaded plugin [CameraTracking] from path [/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libCameraTracking.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [MarkerManager]
[GUI] [Msg] Listening to stats on [/world/shapes/stats]
[GUI] [Msg] Added plugin [Marker Manager] to main window
[GUI] [Msg] Loaded plugin [MarkerManager] from path [/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libMarkerManager.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [SelectEntities]
[GUI] [Msg] Added plugin [Select entities] to main window
[GUI] [Msg] Loaded plugin [SelectEntities] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libSelectEntities.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [Spawn]
[GUI] [Wrn] [Application.cc:845] [QT] file::/Spawn/Spawn.qml:32:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Msg] Added plugin [Spawn] to main window
[GUI] [Msg] Loaded plugin [Spawn] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libSpawn.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [VisualizationCapabilities]
[GUI] [Msg] View as transparent service on [/gui/view/transparent]
[GUI] [Msg] View as wireframes service on [/gui/view/wireframes]
[GUI] [Msg] View center of mass service on [/gui/view/com]
[GUI] [Msg] View inertia service on [/gui/view/inertia]
[GUI] [Msg] View collisions service on [/gui/view/collisions]
[GUI] [Msg] View joints service on [/gui/view/joints]
[GUI] [Msg] View frames service on [/gui/view/frames]
[GUI] [Msg] Added plugin [Visualization capabilities] to main window
[GUI] [Msg] Loaded plugin [VisualizationCapabilities] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libVisualizationCapabilities.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [WorldControl]
[GUI] [Wrn] [Application.cc:845] [QT] file::/WorldControl/WorldControl.qml:30:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Msg] Using world control service [/world/shapes/control]
[GUI] [Msg] Listening to stats on [/world/shapes/stats]
[GUI] [Dbg] [WorldControl.cc:250] Using an event to share WorldControl msgs with the server
[GUI] [Msg] Added plugin [World control] to main window
[GUI] [Msg] Loaded plugin [WorldControl] from path [/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libWorldControl.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [WorldStats]
[GUI] [Msg] Listening to stats on [/world/shapes/stats]
[GUI] [Msg] Added plugin [World stats] to main window
[GUI] [Msg] Loaded plugin [WorldStats] from path [/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libWorldStats.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [Shapes]
[GUI] [Msg] Added plugin [Shapes] to main window
[GUI] [Msg] Loaded plugin [Shapes] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libShapes.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [Lights]
[GUI] [Msg] Added plugin [Lights] to main window
[GUI] [Msg] Loaded plugin [Lights] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libLights.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [TransformControl]
[GUI] [Wrn] [Application.cc:845] [QT] file::/TransformControl/TransformControl.qml:104:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:845] [QT] file::/TransformControl/TransformControl.qml:99:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:845] [QT] file::/TransformControl/TransformControl.qml:94:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:845] [QT] file::/TransformControl/TransformControl.qml:89:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Msg] Added plugin [Transform control] to main window
[GUI] [Msg] Loaded plugin [TransformControl] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libTransformControl.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [Screenshot]
[GUI] [Msg] Screenshot service on [/gui/screenshot]
[GUI] [Msg] Added plugin [Screenshot] to main window
[GUI] [Msg] Loaded plugin [Screenshot] from path [/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libScreenshot.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [CopyPaste]
[GUI] [Msg] Added plugin [Copy/Paste] to main window
[GUI] [Msg] Loaded plugin [CopyPaste] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libCopyPaste.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [ComponentInspector]
[GUI] [Msg] Added plugin [Component inspector] to main window
[GUI] [Msg] Loaded plugin [ComponentInspector] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libComponentInspector.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [EntityTree]
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityTree/EntityTree.qml:148:7: QML ToolButton: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Msg] Added plugin [Entity tree] to main window
[GUI] [Msg] Loaded plugin [EntityTree] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libEntityTree.so]
[GUI] [Dbg] [Application.cc:323] Loading window config
[GUI] [Msg] Using server control service [/server_control]
[GUI] [Dbg] [Application.cc:610] Applying config
[GUI] [Wrn] [Component.hh:189] Trying to deserialize component with data type [N3sdf3v135WorldE], which doesn't have `operator>>`. Component will not be deserialized.
[GUI] [Wrn] [Model.hh:98] Unable to deserialize sdf::Model
[GUI] [Wrn] [Model.hh:98] Unable to deserialize sdf::Model
[GUI] [Wrn] [Model.hh:98] Unable to deserialize sdf::Model
[GUI] [Wrn] [Model.hh:98] Unable to deserialize sdf::Model
[GUI] [Wrn] [Model.hh:98] Unable to deserialize sdf::Model
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityTree/EntityTree.qml:148:7: QML ToolButton: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:845] [QT] file::/WorldStats/WorldStats.qml:53:3: QML RowLayout: Binding loop detected for property "x"
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:845] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Dbg] [MinimalScene.cc:657] Creating gz-rendering interface for OpenGL
[GUI] [Dbg] [MinimalScene.cc:813] Creating render thread interface for OpenGL
[GUI] [Wrn] [Application.cc:845] [QT] file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for property "implicitHeight"
[GUI] [Msg] Loading plugin [gz-rendering-ogre2]
[GUI] [Err] [Ogre2RenderEngine.cc:1113]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at ./RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1113]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at ./RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1113]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at ./RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1113]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at ./RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1113]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at ./RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1113]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at ./RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1113]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at ./RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1113]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at ./RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1113]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at ./RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1113]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at ./RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1121] Unable to create the rendering window after [11] attempts.
[GUI] [Err] [Ogre2RenderEngine.cc:1032] Failed to create dummy render window.
Stack trace (most recent call last):
#31   Object "/lib/x86_64-linux-gnu/libgz-sim7-gui.so.7", at 0x7f0fa26790a8, in gz::sim::v7::gui::runGui(int&, char**, char const*, char const*, int, char const*)
#30   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f0fa14c0cf3, in QCoreApplication::exec()
#29   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f0fa14b875a, in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#28   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f0fa15130b7, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#27   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f0fa03193e2, in g_main_context_iteration
#26   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f0fa03706c7, in 
#25   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f0fa031bd3a, in g_main_context_dispatch
#24   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f0fa1513a66, in 
#23   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f0fa14bcf26, in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
#22   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f0fa14b9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#21   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f0fa0b6c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#20   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f0fa14e741d, in QObject::event(QEvent*)
#19   Object "/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so", at 0x7f0f5c736513, in gz::gui::plugins::RenderWindowItem::Ready()
#18   Object "/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so", at 0x7f0f5c736120, in gz::gui::plugins::RenderThread::Initialize[abi:cxx11]()
#17   Object "/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so", at 0x7f0f5c742c7d, in gz::gui::plugins::RenderThreadRhiOpenGL::Initialize[abi:cxx11]()
#16   Object "/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so", at 0x7f0f5c73a414, in gz::gui::plugins::GzRenderer::Initialize[abi:cxx11]()
#15   Object "/lib/x86_64-linux-gnu/libgz-rendering7.so.7", at 0x7f0f5c5984bb, in gz::rendering::v7::RenderEngineManager::Engine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#14   Object "/lib/x86_64-linux-gnu/libgz-rendering7.so.7", at 0x7f0f5c59829e, in gz::rendering::v7::RenderEngineManagerPrivate::Engine(EngineInfo, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#13   Object "/lib/x86_64-linux-gnu/libgz-rendering7.so.7", at 0x7f0f5c5a2b21, in gz::rendering::v7::BaseRenderEngine::Init()
#12   Object "/usr/lib/x86_64-linux-gnu/gz-rendering-7/engine-plugins/libgz-rendering-ogre2.so", at 0x7f0f35fcaac2, in gz::rendering::v7::Ogre2RenderEngine::InitImpl()
#11   Object "/usr/lib/x86_64-linux-gnu/gz-rendering-7/engine-plugins/libgz-rendering-ogre2.so", at 0x7f0f35fd06f7, in gz::rendering::v7::Ogre2RenderEngine::InitAttempt()
#10   Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f0f35aeb228, in Ogre::ResourceGroupManager::initialiseAllResourceGroups(bool)
#9    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f0f35aeac9e, in Ogre::ResourceGroupManager::parseResourceGroupScripts(Ogre::ResourceGroupManager::ResourceGroup*)
#8    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f0f35b2abac, in Ogre::ScriptCompilerManager::parseScript(Ogre::SharedPtr<Ogre::DataStream>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#7    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f0f35b225b2, in Ogre::ScriptCompiler::compile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#6    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f0f35b222b2, in Ogre::ScriptCompiler::compile(Ogre::SharedPtr<std::__cxx11::list<Ogre::SharedPtr<Ogre::ConcreteNode>, Ogre::STLAllocator<Ogre::SharedPtr<Ogre::ConcreteNode>, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#5    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f0f35b33bdf, in Ogre::MaterialTranslator::translate(Ogre::ScriptCompiler*, Ogre::SharedPtr<Ogre::AbstractNode> const&)
#4    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f0f35b349a7, in Ogre::TechniqueTranslator::translate(Ogre::ScriptCompiler*, Ogre::SharedPtr<Ogre::AbstractNode> const&)
#3    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f0f35b3a2ce, in Ogre::PassTranslator::translate(Ogre::ScriptCompiler*, Ogre::SharedPtr<Ogre::AbstractNode> const&)
#2    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f0f35b9e9d9, in Ogre::Technique::createPass()
#1    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f0f35aa6cd0, in Ogre::Pass::Pass(Ogre::Technique*, unsigned short)
#0    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f0f359d9e3d, in Ogre::Hlms::createDatablock(Ogre::IdString, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ogre::HlmsMacroblock const&, Ogre::HlmsBlendblock const&, std::vector<std::pair<Ogre::IdString, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Ogre::STLAllocator<std::pair<Ogre::IdString, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
Segmentation fault (Address not mapped to object [0x220])
[Dbg] [SignalHandler.cc:141] Received signal[2].
[Dbg] [ServerPrivate.cc:115] Server received signal[2]
[Dbg] [gz.cc:411] Shutting down gz-sim-server
[Dbg] [SimulationRunner.cc:540] Exiting postupdate worker thread (0)

笔记本硬件环境遇到问题:不支持OpenGL3.3

$ sudo apt-get install mesa-utils
[sudo] password for daniel: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  tightvncpasswd usb-modeswitch usb-modeswitch-data
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  mesa-utils-bin
The following NEW packages will be installed:
  mesa-utils mesa-utils-bin
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,118 kB of archives.
After this operation, 2,455 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://cn.archive.ubuntu.com/ubuntu jammy/universe amd64 mesa-utils-bin amd64 8.4.0-1ubuntu1 [53.8 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu jammy/universe amd64 mesa-utils amd64 8.4.0-1ubuntu1 [1,065 kB]
Fetched 1,118 kB in 5s (242 kB/s)       
Selecting previously unselected package mesa-utils-bin:amd64.
(Reading database ... 310676 files and directories currently installed.)
Preparing to unpack .../mesa-utils-bin_8.4.0-1ubuntu1_amd64.deb ...
Unpacking mesa-utils-bin:amd64 (8.4.0-1ubuntu1) ...
Selecting previously unselected package mesa-utils.
Preparing to unpack .../mesa-utils_8.4.0-1ubuntu1_amd64.deb ...
Unpacking mesa-utils (8.4.0-1ubuntu1) ...
Setting up mesa-utils-bin:amd64 (8.4.0-1ubuntu1) ...
Setting up mesa-utils (8.4.0-1ubuntu1) ...
Processing triggers for man-db (2.10.2-1) ...

$ glxinfo | grep "OpenGL version"
OpenGL version string: 3.0 Mesa 22.2.5

更换Gazebo启动命令,性能可能会不太好!

$ gz sim -v4 -r shapes.sdf --render-engine ogre

在这里插入图片描述

3. ArduPilot SITL + Gazebo模拟

笔记本环境

daniel@daniel-ThinkPad-SL410:~$ uname -r
5.19.0-35-generic
daniel@daniel-ThinkPad-SL410:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy

ArduPilot版本

$ git log -n 1
commit c33653cd4ebec780d6961c0bcbd42a38c787fb28 (HEAD -> Copter-4.3, origin/Copter-4.3)
Author: bugobliterator <siddharthbharatpurohit@gmail.com>
Date:   Sat Mar 18 09:04:26 2023 +1100

    bootloaders: add CubeOrangePlus-bdshot bootloader

Gazebo版本

$ gz sim --version
Gazebo Sim, version 7.4.0
Copyright (C) 2018 Open Source Robotics Foundation.
Released under the Apache 2.0 License.

ArduPilot Gazebo plugin版本

$ git log -n 1
commit 0753b067a5a20219930818de34395577b930c129 (HEAD -> main, origin/main, origin/HEAD)
Author: Rhys Mainwaring <rhys.mainwaring@me.com>
Date:   Mon Mar 20 15:51:29 2023 +0000

    Update README (#50)

    Update example models section with links to recent additions to SITL_Models/Gazebo.

    Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>

3.1 Gazebo Garden模拟环境

$ gz sim -v4 -r iris_runway.sdf --render-engine ogre

在这里插入图片描述

3.2 ArduPilot SITL仿真环境

$ sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --map --console

注:SITL安装,详见:ArduPilot飞控之ubuntu22.04-SITL安装
在这里插入图片描述

3.3 ArduPilot SITL + Gazebo 测试视频

ArduPilot SITL + Gazebo Demo Try

MAVProxy输入命令如下:

mode guided
arm throttle
takeoff 5
position 0 0 3
position 100 100 0
position 100 -200 0
rtl

4. 参考资料

【1】Using SITL with Gazebo
【2】Gazebo Garden/7th major release of Gazebo
【3】ArduPilot Gazebo Plugin
【4】ArduPilot飞控之ubuntu22.04-SITL安装
【5】MAVProxy

5. 补充资料

5.1 官网视频

Gazebo Ship Landing Demo

5.2 关于HITL

当前ArdupilotCopter尚没有HITL模拟的方法,后面将跳过Copter HITL部分。

有兴趣的朋友可以适时去跟进了解下hitl-simulators。

在这里插入图片描述

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ArduPilot飞控之ubuntu22.04-Gazebo模拟 的相关文章

  • Gazebo 详细介绍

    Gazebo is a 3D multi robot simulator with dynamics It is capable of simulating articulated robot in complex and realisti
  • gazebo模型下载以及配置

    最近在学习ROS xff0c 主要是为了结合SLAM仿真使用 启动gazebo命令 roscore 在另一个终端执行 gazebo 就可以进入清爽的gazebo界面 xff08 如果屏幕出现黑屏并不是安装错误可以稍微等待一会 xff09 x
  • 在ROS2中,通过MoveIt2控制Gazebo中的自定义机械手

    目前的空余时间主要都在研究ROS2 xff0c 最终目的是控制自己用舵机组装的机械手 由于种种原因 xff0c 先控制Gazebo的自定义机械手 先看看目前的成果 左侧是rviz2中的moveit组件的机械手 xff0c 右侧是gazebo
  • Gazebo中针对Gazebo软件或生成模型出现process has died问题的参考方案

    在基于ROS机器人仿真时 xff0c 打开Gazebo经常出现一些问题 xff0c 比如Gazebo窗口打开了 xff0c 终端却显示gazebo进程已死 本文记录了一次遇到的类似问题 xff0c 并给出了在部分情况下能够适用的参考方案 问
  • Ubuntu22.04启用root账户 2208120941

    Ubuntu22 04启用root账户 2208120941 Ubuntu是有root账户的 只是没有密码 所以无法切换 所以启用的方法是 管理员账户用 sudo passwd root 给 root 设置密码 span class tok
  • Ardupilot添加自定义日志(AP_LOG)

    1 在libraries AP Logger LogStructure h中添加自定义的结构体 span class token keyword struct span span class token class name PACKED
  • Ardupilot 编译Bootloader

    1 清理之前的编译中间文件 xff0c 一定要清理一下 xff0c 能避免很多奇怪的问题 span class token punctuation span span class token operator span waf distcl
  • SITL Simulator —— ArduPilot —— Windows

    版权声明 xff1a 本文为博主原创博文 xff0c 未经允许不得转载 xff0c 若要转载 xff0c 请说明出处并给出博文链接 参考网页 xff1a http ardupilot org dev docs sitl native on
  • 解决多个Ardupilot运行仿真环境冲突问题

    情况说明 分别安装了4 2和4 3两个版本的ardupilot工作环境 xff0c 出现运行4 3版本sim vehicle py时路径链接到4 2版本工作路径 解决 为防止文件识别错误 xff0c 更改sim vehicle py文件名为
  • gazebo 中创建含有二维码的墙的模型

    1 新建空白墙的模型 在gazebo中添加一个Edit gt Building Editor xff0c 生成sdf文件 xff0c 放在 gazebo models文件夹下 如图Untitled1 编辑model sdf文件 xff0c
  • MAVROS +ardupilot +gazebo 无人机集群仿真 (一)

    MAVROS 43 ardupilot 43 gazebo 无人机集群仿真 xff08 一 xff09 无人机仿真环境搭建仿真软件安装仿真环境测试无人机多机仿真apm launch文件修改修改 iris ardupilot world修改
  • ROS Gazebo(三):启动gazebo/URDF

    打开Gazebo的方式主要有两种 xff1a rosrun 和 roslaunch 1 启动ROS节点 启动ROS节点 bring up 机器人的标准工具是roslaunch 打开一个空的Gazebo世界命令如下 xff1a roslaun
  • gazebo仿真之xacro文件

    span class token operator lt span span class token operator span xml version span class token operator 61 span span clas
  • Ardupilot飞控编译环境搭建

    构建环境 Ardupilot具有完整的开发库 xff0c 其编译代码可以直接下载 xff0c 在Windows上 xff0c 可以利用Cygwin编译器来进行下载并编译 xff0c 对此怒飞垂云的教程中有详细的下载方法 xff1a 飞控固件
  • Gazebo显示加载xacro模型文件---改变模型的颜色注意事项

    在xacro文件中 xff0c 有下列语句是修改模型颜色的 xff1a 例 xff1a lt link name 61 34 base link 34 gt lt visual gt lt geometry gt lt box size 6
  • 运行Gazebo+moveit+Rviz,报错,提示无控制器

    在rviz里规划成功后 xff0c 执行显示failed rviz里能规划 xff0c 但是Gazebo里动不了 moveit报错如下 xff1a WARN 1679466487 132361192 26 763000000 Waiting
  • gazebo仿真——controller配置(transmission/hardwareInterface标签)

    参考roswiki controller官方说明 本文作为古月大神的补充ROS探索总结 xff08 三十一 xff09 ros control 为了在gazebo中实现机器人关节的控制 xff0c 需要求建立一个controller控制器
  • Ardupilot笔记:Rover auto模式下的执行流程

    先从mode auto cpp的update 开始分析 流程如图 xff1a 进入函数update 后会执行函数navigate to waypoint mode auto cpp span class token keyword void
  • 25B无人直升机调试(Tuning)

    要知道的直升机原理 首先要掌握的5个飞行模式 本文首先调试自稳模式 Stabilize 自稳模式 Alt Hold 定高模式 Loiter OF loiter 悬停模式 RTL Return to Launch 返航模式 Auto 自动模式
  • ardupilot开发 --- 避障篇

    避障的类型 空中防碰撞ADSB 主要是防止与其他飞行器的碰撞 避障 防止与天花板地板障碍物的碰撞 实现避障必要的传感器 ADSB receivers Rangefinders or Proximity Sensors or Realsens

随机推荐