Skip to content
项目

关于

ROS(1 和 2)与 Gazebo 仿真的集成

科学与工程

这些数字如何统计

实测星标增长

24小时
-1
7天
+1
15天
+3
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Build Status

Package Build Status: Package Build Status

ROS 2 version Gazebo version Branch Binaries hosted at
Humble Fortress humble https://packages.ros.org
Humble Garden humble gazebo packages[^1] [^2]
Humble Harmonic humble gazebo packages[^1]
Jazzy Garden ros2 only from source [^2]
Jazzy Harmonic jazzy https://packages.ros.org
Kilted Ionic kilted https://packages.ros.org
Lyrical Harmonic ros2 only from source
Lyrical Ionic ros2 only from source
Lyrical Jetty ros2 https://packages.ros.org
Rolling Harmonic ros2 only from source
Rolling Ionic ros2 only from source
Rolling Jetty ros2 https://packages.ros.org

[^1]: Binaries for these pairings are provided from the packages.osrfoundation.org repository. Refer to https://gazebosim.org/docs/latest/ros_installation for installation instructions. [^2]: Note that the Gazebo version on this row has reached end-of-life.

For information on ROS(1) and Gazebo compatibility, refer to the noetic branch README

Note: The ros_ign prefixed packages are shim packages that redirect to their ros_gz counterpart. Under most circumstances you want to be using the ros_gz counterpart.

Integration between ROS and Gazebo

Packages

This repository holds packages that provide integration between ROS and Gazebo:

Install

This branch supports ROS Rolling. See above for other ROS versions.

Binaries

Rolling binaries are available for Rotary. They are hosted at https://packages.ros.org.

  1. Add https://packages.ros.org with the ros2-apt-source package (see the ROS installation instructions):

     sudo apt-get update && sudo apt-get install -y curl
     export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}')
     curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo ${UBUNTU_CODENAME:-${VERSION_CODENAME}})_all.deb"
     sudo dpkg -i /tmp/ros2-apt-source.deb
     sudo apt-get update
    
  2. Install ros_gz

     sudo apt install ros-rolling-ros-gz
    

From source

ROS

Be sure you've installed ROS Rolling (at least ROS-Base). More ROS dependencies will be installed below.

Gazebo

The version of Gazebo paired with Rolling will automatically be installed when running rosdep below.

Compile ros_gz

The following steps are for Linux and macOS.

  1. Create a colcon workspace:

    # Setup the workspace
    mkdir -p ~/ws/src
    cd ~/ws/src
    
    # Download needed software
    git clone https://github.com/gazebosim/ros_gz.git -b ros2
    
  2. Install dependencies (this may also install Gazebo):

    cd ~/ws
    rosdep install -r --from-paths src -i -y --rosdistro rolling
    

    If rosdep fails to install Gazebo libraries and you have not installed them before, please follow Gazebo installation instructions.

  3. Build the workspace:

    # Source ROS distro's setup.bash
    source /opt/ros/<distro>/setup.bash
    
    # Build and install into workspace
    cd ~/ws
    colcon build
    

[!TIP] The ros_gz library makes heavy use of templates which causes compilers to consume a lot of memory. If your build fails with c++: fatal error: Killed signal terminated program cc1plus try building with colcon build --parallel-workers=1 --executor sequential. You might also have to set export MAKEFLAGS="-j 1" before running colcon build to limit the number of processors used to build a single package.

ROSCon 2022

Project Template

A template project integrating ROS and Gazebo simulator

探索相关项目

加载中…