Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge ign-gazebo3 ➡️ ign-gazebo6 #1626

Merged
merged 12 commits into from
Aug 4, 2022
Merged
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
# Initialize the project
#============================================================================
project(ignition-gazebo6 VERSION 6.10.0)
set (GZ_DISTRIBUTION "Fortress")

#============================================================================
# Find ignition-cmake
Expand Down Expand Up @@ -74,7 +75,7 @@ set(IGN_TRANSPORT_VER ${ignition-transport11_VERSION_MAJOR})

#--------------------------------------
# Find ignition-msgs
ign_find_package(ignition-msgs8 REQUIRED VERSION 8.5)
ign_find_package(ignition-msgs8 REQUIRED VERSION 8.6)
set(IGN_MSGS_VER ${ignition-msgs8_VERSION_MAJOR})

#--------------------------------------
Expand All @@ -96,7 +97,7 @@ set(IGN_FUEL_TOOLS_VER ${ignition-fuel_tools7_VERSION_MAJOR})

#--------------------------------------
# Find ignition-gui
ign_find_package(ignition-gui6 REQUIRED VERSION 6.3)
ign_find_package(ignition-gui6 REQUIRED VERSION 6.5)
set(IGN_GUI_VER ${ignition-gui6_VERSION_MAJOR})
ign_find_package (Qt5
COMPONENTS
Expand Down
51 changes: 25 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Ignition Gazebo : A Robotic Simulator
# Gazebo Sim : A Robotic Simulator

**Maintainer:** louise AT openrobotics DOT org

[![GitHub open issues](https://img.shields.io/github/issues-raw/ignitionrobotics/ign-gazebo.svg)](https://github.com/ignitionrobotics/ign-gazebo/issues)
[![GitHub open pull requests](https://img.shields.io/github/issues-pr-raw/ignitionrobotics/ign-gazebo.svg)](https://github.com/ignitionrobotics/ign-gazebo/pulls)
[![GitHub open issues](https://img.shields.io/github/issues-raw/gazebosim/gz-sim.svg)](https://github.com/gazebosim/gz-sim/issues)
[![GitHub open pull requests](https://img.shields.io/github/issues-pr-raw/gazebosim/gz-sim.svg)](https://github.com/gazebosim/gz-sim/pulls)
[![Discourse topics](https://img.shields.io/discourse/https/community.gazebosim.org/topics.svg)](https://community.gazebosim.org)
[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](https://www.apache.org/licenses/LICENSE-2.0)

Build | Status
-- | --
Test coverage | [![codecov](https://codecov.io/gh/ignitionrobotics/ign-gazebo/branch/ign-gazebo6/graph/badge.svg)](https://codecov.io/gh/ignitionrobotics/ign-gazebo)
Ubuntu Bionic | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_gazebo-ci-ign-gazebo6-bionic-amd64)](https://build.osrfoundation.org/job/ignition_gazebo-ci-ign-gazebo6-bionic-amd64)
Test coverage | [![codecov](https://codecov.io/gh/ignitionrobotics/ign-gazebo/branch/ign-gazebo6/graph/badge.svg)](https://codecov.io/gh/ignitionrobotics/ign-gazebo/branch/ign-gazebo6)
Ubuntu Focal | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_gazebo-ci-ign-gazebo6-focal-amd64)](https://build.osrfoundation.org/job/ignition_gazebo-ci-ign-gazebo6-focal-amd64)
Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_gazebo-ci-ign-gazebo6-homebrew-amd64)](https://build.osrfoundation.org/job/ignition_gazebo-ci-ign-gazebo6-homebrew-amd64)
Windows | [![Build Status](https://build.osrfoundation.org/job/ign_gazebo-ign-6-win/badge/icon)](https://build.osrfoundation.org/job/ign_gazebo-ign-6-win/)

Ignition Gazebo is an open source robotics simulator. Through Ignition Gazebo, users have access to high fidelity physics, rendering, and sensor models. Additionally, users and developers have multiple points of entry to simulation including a graphical user interface, plugins, and asynchronous message passing and services.
Gazebo Sim is an open source robotics simulator. Through Gazebo sim, users have access to high fidelity physics, rendering, and sensor models. Additionally, users and developers have multiple points of entry to simulation including a graphical user interface, plugins, and asynchronous message passing and services.

Ignition Gazebo is derived from [Gazebo](http://gazebosim.org) and represents over 16 years of development and experience in robotics and simulation. This library is part of the [Ignition Robotics](https://ignitionrobotics.org) project.
Gazebo Sim is derived from [Gazebo Classic](http://classic.gazebosim.org) and represents over 16 years of development and experience in robotics and simulation. This library is part of the [Gazebo](https://gazebosim.org) project.

# Table of Contents

Expand Down Expand Up @@ -44,34 +44,33 @@ Ignition Gazebo is derived from [Gazebo](http://gazebosim.org) and represents ov

* **Dynamics simulation**: Access multiple high-performance physics engines
through
[Ignition Physics](https://github.com/ignitionrobotics/ign-physics).
[Gazebo Physics](https://github.com/gazebosim/gz-physics).

* **Advanced 3D graphics**: Through
[Ignition Rendering](https://github.com/ignitionrobotics/ign-rendering),
[Gazebo Rendering](https://github.com/gazebosim/gz-rendering),
it's possible to use rendering engines such as OGRE v2 for realistic rendering
of environments with high-quality lighting, shadows, and textures.

* **Sensors and noise models**: Generate sensor data, optionally with noise,
from laser range finders, 2D/3D cameras, Kinect style sensors, contact sensors,
force-torque, IMU, GPS, and more, all powered by
[Ignition Sensors](https://github.com/ignitionrobotics/ign-sensors)
[Gazebo Sensors](https://github.com/gazebosim/gz-sensors)

* **Plugins**: Develop custom plugins for robot, sensor, and
environment control.

* **Graphical interface**: Create, instrospect and interact with your simulations
* **Graphical interface**: Create, introspect and interact with your simulations
through plugin-based graphical interfaces powered by
[Ignition GUI](https://github.com/ignitionrobotics/ign-gui).
[Gazebo GUI](https://github.com/gazebosim/gz-gui).

* **Simulation models**: Access numerous robots including PR2, Pioneer2 DX,
iRobot Create, and TurtleBot, and construct environments using other physically
accurate models available through
[Ignition Fuel](https://app.ignitionrobotics.org/fuel). You can also build a
[Gazebo Fuel](https://app.gazebosim.org/fuel). You can also build a
new model using [SDF](http://sdformat.org).

* **TCP/IP Transport**: Run simulation on remote servers and interface to Ignition
Gazebo through socket-based message passing using
[Ignition Transport](https://github.com/ignitionrobotics/ign-transport).
* **TCP/IP Transport**: Run simulation on remote servers and interface to Gazebo Sim through socket-based message passing using
[Gazebo Transport](https://github.com/gazebosim/gz-transport).

* **Command line tools**: Extensive command line tools for increased simulation
introspection and control.
Expand All @@ -82,7 +81,7 @@ See the [installation tutorial](https://gazebosim.org/api/gazebo/6.9/install.htm

# Usage

Gazebo can be run from the command line, once [installed](#install), using:
Gazebo Sim can be run from the command line, once [installed](#install), using:

```
ign gazebo
Expand All @@ -100,7 +99,7 @@ In the event that the installation is a mix of Debian and from source, command
line tools from `ign-tools` may not work correctly.

A workaround for a single package is to define the environment variable
`IGN_CONFIG_PATH` to point to the location of the Ignition library installation,
`IGN_CONFIG_PATH` to point to the location of the Gazebo library installation,
where the YAML file for the package is found, such as
```
export IGN_CONFIG_PATH=/usr/local/share/ignition
Expand All @@ -109,7 +108,7 @@ export IGN_CONFIG_PATH=/usr/local/share/ignition
However, that environment variable only takes a single path, which means if the
installations from source are in different locations, only one can be specified.

Another workaround for working with multiple Ignition libraries on the command
Another workaround for working with multiple Gazebo libraries on the command
line is using symbolic links to each library's YAML file.
```
mkdir ~/.ignition/tools/configs -p
Expand All @@ -121,7 +120,7 @@ ln -s /usr/local/share/ignition/transportlog11.yaml .
export IGN_CONFIG_PATH=$HOME/.ignition/tools/configs
```

This issue is tracked [here](https://github.com/ignitionrobotics/ign-tools/issues/8).
This issue is tracked [here](https://github.com/gazebosim/gz-tools/issues/8).

# Documentation

Expand All @@ -131,14 +130,14 @@ See the [installation tutorial](https://gazebosim.org/api/gazebo/6.9/install.htm

See the [installation tutorial](https://gazebosim.org/api/gazebo/6.9/install.html).

See the [Writing Tests section of the contributor guide](https://github.com/ignitionrobotics/ign-gazebo/blob/main/CONTRIBUTING.md#writing-tests) for help creating or modifying tests.
See the [Writing Tests section of the contributor guide](https://gazebosim.org/docs/all/contributing#writing-tests) for help creating or modifying tests.

# Folder Structure

Refer to the following table for information about important directories and files in this repository.

```
ign-gazebo
gz-sim
├── examples Various examples that can be run against binary or source installs of ign-gazebo.
│   ├── plugin Example plugins.
│   ├── standalone Example standalone programs that use ign-gazebo as a library.
Expand All @@ -163,17 +162,17 @@ ign-gazebo
# Contributing

Please see
[CONTRIBUTING.md](https://github.com/ignitionrobotics/ign-gazebo/blob/main/CONTRIBUTING.md).
[CONTRIBUTING.md](https://github.com/gazebosim/gz-sim/blob/main/CONTRIBUTING.md).

# Code of Conduct

Please see
[CODE_OF_CONDUCT.md](https://github.com/ignitionrobotics/ign-gazebo/blob/main/CODE_OF_CONDUCT.md).
[CODE_OF_CONDUCT.md](https://github.com/gazebosim/gz-sim/blob/main/CODE_OF_CONDUCT.md).

# Versioning

This library uses [Semantic Versioning](https://semver.org/). Additionally, this library is part of the [Ignition Robotics project](https://ignitionrobotics.org) which periodically releases a versioned set of compatible and complimentary libraries. See the [Ignition Robotics website](https://ignitionrobotics.org) for version and release information.
This library uses [Semantic Versioning](https://semver.org/). Additionally, this library is part of the [Gazebo project](https://gazebosim.org) which periodically releases a versioned set of compatible and complimentary libraries. See the [Gazebo website](https://gazebosim.org) for version and release information.

# License

This library is licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0). See also the [LICENSE](https://github.com/ignitionrobotics/ign-gazebo/blob/main/LICENSE) file.
This library is licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0). See also the [LICENSE](https://github.com/gazebosim/gz-sim/blob/main/LICENSE) file.
2 changes: 2 additions & 0 deletions examples/worlds/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
file(GLOB files "*.sdf")
install(FILES ${files}
DESTINATION ${IGN_DATA_INSTALL_DIR}/worlds)

add_subdirectory(thumbnails)
163 changes: 163 additions & 0 deletions examples/worlds/apply_link_wrench.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
<?xml version="1.0" ?>
<!--

Demostrates the ApplyLinkWrench plugin.

When simulation starts, the box model starts moving due to the persistent force defined in this file.

Wrenches can also be applied through transport.
For example, apply a force to the cylinder model (i.e. its canonical link) with:

ign topic -t "/world/apply_link_wrench/wrench" -m ignition.msgs.EntityWrench -p "entity: {name: 'cylinder', type: MODEL}, wrench: {force: {y: 1000, z: 10000}}"

Apply a wrench to the cylinder link with:

ign topic -t "/world/apply_link_wrench/wrench" -m ignition.msgs.EntityWrench -p "entity: {name: 'cylinder::link', type: LINK}, wrench: {force: {y: -1000, z: 10000}, torque: {x: -1000}}"

Apply a persistent force to the cylinder with:

ign topic -t "/world/apply_link_wrench/wrench/persistent" -m ignition.msgs.EntityWrench -p "entity: {name: 'cylinder', type: MODEL}, wrench: {force: {x: -20}}"

Clear the persistent force from the box with:

ign topic -t "/world/apply_link_wrench/wrench/clear" -m ignition.msgs.Entity -p "name: 'box', type: MODEL"

-->
<sdf version="1.6">
<world name="apply_link_wrench">
<plugin
filename="ignition-gazebo-physics-system"
name="ignition::gazebo::systems::Physics">
</plugin>
<plugin
filename="ignition-gazebo-scene-broadcaster-system"
name="ignition::gazebo::systems::SceneBroadcaster">
</plugin>
<plugin
filename="ignition-gazebo-apply-link-wrench-system"
name="ignition::gazebo::systems::ApplyLinkWrench">
<persistent>
<entity_name>box</entity_name>
<entity_type>model</entity_type>
<force>-10 0 0</force>
<torque>0 0 0.1</torque>
</persistent>
</plugin>

<light type="directional" name="sun">
<cast_shadows>true</cast_shadows>
<pose>0 0 10 0 0 0</pose>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.2 0.2 0.2 1</specular>
<attenuation>
<range>1000</range>
<constant>0.9</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
<direction>-0.5 0.1 -0.9</direction>
</light>
<model name="ground_plane">
<static>true</static>
<link name="link">
<collision name="collision">
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
</collision>
<visual name="visual">
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
<material>
<ambient>0.8 0.8 0.8 1</ambient>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.8 0.8 0.8 1</specular>
</material>
</visual>
</link>
</model>

<model name="box">
<pose>0 -2 0.5 0 0 0</pose>
<link name="link">
<inertial>
<inertia>
<ixx>1</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>1</iyy>
<iyz>0</iyz>
<izz>1</izz>
</inertia>
<mass>1.0</mass>
</inertial>
<collision name="collision">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</collision>

<visual name="visual">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
<material>
<ambient>1 0 0 1</ambient>
<diffuse>1 0 0 1</diffuse>
<specular>1 0 0 1</specular>
</material>
</visual>
</link>
</model>

<model name="cylinder">
<pose>0 2 0.5 0 0 0</pose>
<link name="link">
<inertial>
<inertia>
<ixx>2</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>2</iyy>
<iyz>0</iyz>
<izz>2</izz>
</inertia>
<mass>2.0</mass>
</inertial>
<collision name="collision">
<geometry>
<cylinder>
<radius>0.5</radius>
<length>1.0</length>
</cylinder>
</geometry>
</collision>

<visual name="visual">
<geometry>
<cylinder>
<radius>0.5</radius>
<length>1.0</length>
</cylinder>
</geometry>
<material>
<ambient>0 1 0 1</ambient>
<diffuse>0 1 0 1</diffuse>
<specular>0 1 0 1</specular>
</material>
</visual>
</link>
</model>
</world>
</sdf>
3 changes: 3 additions & 0 deletions examples/worlds/thumbnails/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
file(GLOB files "*.png")
install(FILES ${files}
DESTINATION ${IGN_DATA_INSTALL_DIR}/worlds/thumbnails)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions include/ignition/gazebo/Model.hh
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ namespace ignition
public: void SetWorldPoseCmd(EntityComponentManager &_ecm,
const math::Pose3d &_pose);

/// \brief Get the model's canonical link entity.
/// \param[in] _ecm Entity-component manager.
/// \return Link entity.
public: gazebo::Entity CanonicalLink(
const EntityComponentManager &_ecm) const;

/// \brief Pointer to private data.
private: std::unique_ptr<ModelPrivate> dataPtr;
};
Expand Down
8 changes: 1 addition & 7 deletions include/ignition/gazebo/SystemLoader.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#ifndef IGNITION_GAZEBO_SYSTEMLOADER_HH_
#define IGNITION_GAZEBO_SYSTEMLOADER_HH_

#include <list>
#include <memory>
#include <optional>
#include <string>
Expand Down Expand Up @@ -62,8 +61,7 @@ namespace ignition

/// \brief Load and instantiate system plugin from name/filename.
/// \param[in] _filename Shared library filename to load plugin from.
/// \param[in] _name Class name to be instantiated. If empty, the first
/// plugin in the shared library will be loaded.
/// \param[in] _name Class name to be instantiated.
/// \param[in] _sdf SDF Element describing plugin instance to be loaded.
/// \returns Shared pointer to system instance or nullptr.
/// \note This will be deprecated in Gazebo 7 (Garden), please the use
Expand All @@ -83,10 +81,6 @@ namespace ignition
/// \returns A pretty string
public: std::string PrettyStr() const;

/// \brief Get the plugin search paths used for loading system plugins
/// \return Paths to search for plugins
public: std::list<std::string> PluginPaths() const;

/// \brief Pointer to private data.
private: std::unique_ptr<SystemLoaderPrivate> dataPtr;
};
Expand Down
Loading