ros2中ros_gz_bridge/gazebo安装的注意事项

 这个搞错了:这个是安装ros_gz_bridge的,不是安装gazebo的

ros2中ros_gz_bridge/gazebo安装的注意事项_第1张图片

AT:如果是安装的Harmonic,在安装ros_gz_bridge的时候要从源码编译

 ros2完整版里面好像已经包含了gazebo的一个版本

ros2中ros_gz_bridge/gazebo安装的注意事项_第2张图片

ros2中ros_gz_bridge/gazebo安装的注意事项_第3张图片

ros2中ros_gz_bridge/gazebo安装的注意事项_第4张图片

ros2中ros_gz_bridge/gazebo安装的注意事项_第5张图片

 包名应该就是叫ros-humble-ros-ign-gazebo

ros2中ros_gz_bridge/gazebo安装的注意事项_第6张图片

 所以gazebo是作为一个普通的apt包安装的,不是作为ros2的包安装的

Install From source(推荐安装Fortress版本,好像很方便

ROS

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

Gazebo

Install either Edifice, Fortress, or Garden.(没有harmonic,我觉得最好还是使用Fortress版本好了,因为我安装了一个Harmonic版本出现了异常说是某个库找不到什么的)

Set the GZ_VERSION environment variable to the Gazebo version you'd like to compile against. For example:

export GZ_VERSION=edifice # IMPORTANT: Replace with correct version

You only need to set this variable when compiling, not when running.

Compile ros_gz

The following steps are for Linux and OSX.

  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 humble
    
  2. Install dependencies (this may also install Gazebo):

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

    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//setup.bash
    
    # Build and install into workspace
    cd ~/ws
    colcon build
    

    If colcon build fails with this issue

    CMake Error at CMakeLists.txt:81 (find_package):
      By not providing "Findactuator_msgs.cmake" in CMAKE_MODULE_PATH this
      project has asked CMake to find a package configuration file provided by
      "actuator_msgs", but CMake did not find one.
    
    cd src
    git clone [email protected]:rudislabs/actuator_msgs.git
    cd ../
    colcon build

你可能感兴趣的:(ros2,gazebo,ros_gz_bridge)