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

ign -> gz Macro Migration : gz-sim #1520

Merged
merged 17 commits into from
Jun 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ set (CMAKE_CXX_STANDARD 17)
option(ENABLE_PROFILER "Enable Gazebo Profiler" FALSE)

if(ENABLE_PROFILER)
add_definitions("-DIGN_PROFILER_ENABLE=1")
add_definitions("-DGZ_PROFILER_ENABLE=1")
else()
add_definitions("-DIGN_PROFILER_ENABLE=0")
add_definitions("-DGZ_PROFILER_ENABLE=0")
endif()

if (UNIX AND NOT APPLE)
Expand Down
11 changes: 8 additions & 3 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ release will remove the deprecated code.
Use `gz/...` instead.
* Configuration and log files are stored under `$HOME/.gz/sim` instead of
`$HOME/.ignition/gazebo`
* The following `IGN_` prefixed environment variables are deprecated and will be removed in future versions.
Use the `GZ_` prefixed versions instead!
* The following `IGN_GAZEBO_` prefixed environment variables are deprecated and will be removed in future versions.
Use the `GZ_SIM_` prefixed versions instead!
* `IGN_GAZEBO_RENDER_ENGINE_PATH` -> `GZ_SIM_RENDER_ENGINE_PATH`
* `IGN_GAZEBO_PHYSICS_ENGINE_PATH` -> `GZ_SIM_PHYSICS_ENGINE_PATH`
* `IGN_GAZEBO_SYSTEM_PLUGIN_PATH` -> `GZ_SIM_SYSTEM_PLUGIN_PATH`
* `IGN_DEBUG_COMPONENT_FACTORY` -> `GZ_DEBUG_COMPONENT_FACTORY`
* `IGN_GAZEBO_RESOURCE_PATH` -> `GZ_SIM_RESOURCE_PATH`
* `IGN_GAZEBO_SERVER_CONFIG_PATH` -> `GZ_SIM_SERVER_CONFIG_PATH`

* The following `IGN_GAZEBO_` prefixed macros variables are deprecated and will be removed in future versions.
Use the `GZ_SIM_` prefixed versions instead!
* `IGN_GAZEBO_REGISTER_COMPONENT`
* `IGN_GAZEBO_PLUGIN_INSTALL_DIR`
* `IGN_GAZEBO_GUI_PLUGIN_INSTALL_DIR`
* `IGN_GAZEBO_WORLD_INSTALL_DIR`

## Gazebo Sim 6.1 to 6.2

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.gz
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Purpose
#
# This docker file is used by build.bash and run.bash to build and run
# an Gazebo distribution based on binaries. See the README.md file.
# a Gazebo distribution based on binaries. See the README.md file.

# Ubuntu 20.04 with nvidia opengl support
FROM nvidia/opengl:1.2-glvnd-devel-ubuntu20.04
Expand Down
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ use the Gazebo code found in the current source tree.

## Gazebo Using Debians In Docker

This section describes how to build and run a docker image of an Gazebo
This section describes how to build and run a docker image of a Gazebo
distribution using debians.

**Requirements**
Expand Down
2 changes: 1 addition & 1 deletion docker/build.bash
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#
# Purpose
# This script is designed to build a docker image of an Gazebo distribution.
# This script is designed to build a docker image of a Gazebo distribution.
# See README.md and run.bash for more information.

if [ $# -eq 0 ]
Expand Down
2 changes: 1 addition & 1 deletion examples/plugin/command_actor/CommandActor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <gz/sim/components/Pose.hh>
#include <gz/plugin/Register.hh>

IGNITION_ADD_PLUGIN(
GZ_ADD_PLUGIN(
command_actor::CommandActor,
gz::sim::System,
command_actor::CommandActor::ISystemConfigure,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <gz/plugin/Register.hh>

IGNITION_ADD_PLUGIN(examples::CustomComponentPlugin,
GZ_ADD_PLUGIN(examples::CustomComponentPlugin,
gz::sim::System,
examples::CustomComponentPlugin::ISystemConfigure)

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ using CustomComponent =

// Use this macro to register a component. Give it a unique name across the
// entire simulation.
IGN_GAZEBO_REGISTER_COMPONENT("examples::CustomComponent", CustomComponent)
GZ_SIM_REGISTER_COMPONENT("examples::CustomComponent", CustomComponent)

class CustomComponentPlugin :
public gz::sim::System,
Expand Down
4 changes: 2 additions & 2 deletions examples/plugin/custom_sensor_system/OdometerSystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ void OdometerSystem::RemoveSensorEntities(
});
}

IGNITION_ADD_PLUGIN(OdometerSystem, gz::sim::System,
GZ_ADD_PLUGIN(OdometerSystem, gz::sim::System,
OdometerSystem::ISystemPreUpdate,
OdometerSystem::ISystemPostUpdate
)

IGNITION_ADD_PLUGIN_ALIAS(OdometerSystem, "custom::OdometerSystem")
GZ_ADD_PLUGIN_ALIAS(OdometerSystem, "custom::OdometerSystem")
2 changes: 1 addition & 1 deletion examples/plugin/custom_sensor_system/odometer.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
</geometry>
</visual>
<!-- Here's our custom sensor -->
<sensor name="an_odometer" type="custom" ignition:type="odometer">
<sensor name="an_odometer" type="custom" gz:type="odometer">
<always_on>1</always_on>
<update_rate>30</update_rate>
<visualize>true</visualize>
Expand Down
2 changes: 1 addition & 1 deletion examples/plugin/gui_system_plugin/GuiSystemPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ void GuiSystemPlugin::SetCustomProperty(const QString &_customProperty)
}

// Register this plugin
IGNITION_ADD_PLUGIN(GuiSystemPlugin,
GZ_ADD_PLUGIN(GuiSystemPlugin,
gz::gui::Plugin)
2 changes: 1 addition & 1 deletion examples/plugin/hello_world/HelloWorld.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

// This is required to register the plugin. Make sure the interfaces match
// what's in the header.
IGNITION_ADD_PLUGIN(
GZ_ADD_PLUGIN(
hello_world::HelloWorld,
gz::sim::System,
hello_world::HelloWorld::ISystemPostUpdate)
Expand Down
2 changes: 1 addition & 1 deletion examples/plugin/rendering_plugins/RenderingGuiPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,5 @@ void RenderingGuiPlugin::FindScene()
}

// Register this plugin
IGNITION_ADD_PLUGIN(RenderingGuiPlugin,
GZ_ADD_PLUGIN(RenderingGuiPlugin,
gz::gui::Plugin)
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void RenderingServerPlugin::PreUpdate(const gz::sim::UpdateInfo &_info,
this->simTime = _info.simTime;
}

IGNITION_ADD_PLUGIN(
GZ_ADD_PLUGIN(
RenderingServerPlugin,
gz::sim::System,
RenderingServerPlugin::ISystemConfigure,
Expand Down
36 changes: 18 additions & 18 deletions examples/plugin/rendering_plugins/rendering_plugins.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

<!-- 3D scene -->
<plugin filename="MinimalScene" name="3D View">
<ignition-gui>
<gz-gui>
<title>3D View</title>
<property type="bool" key="showTitleBar">false</property>
<property type="string" key="state">docked</property>
</ignition-gui>
</gz-gui>

<engine>ogre2</engine>
<scene>scene</scene>
Expand All @@ -33,33 +33,33 @@

<!-- Plugins that add functionality to the scene -->
<plugin filename="EntityContextMenuPlugin" name="Entity context menu">
<ignition-gui>
<gz-gui>
<property key="state" type="string">floating</property>
<property key="width" type="double">5</property>
<property key="height" type="double">5</property>
<property key="showTitleBar" type="bool">false</property>
</ignition-gui>
</gz-gui>
</plugin>
<plugin filename="GzSceneManager" name="Scene Manager">
<ignition-gui>
<gz-gui>
<property key="resizable" type="bool">false</property>
<property key="width" type="double">5</property>
<property key="height" type="double">5</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
</ignition-gui>
</gz-gui>
</plugin>
<plugin filename="InteractiveViewControl" name="Interactive view control">
<ignition-gui>
<gz-gui>
<property key="resizable" type="bool">false</property>
<property key="width" type="double">5</property>
<property key="height" type="double">5</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
</ignition-gui>
</gz-gui>
</plugin>
<plugin filename="SelectEntities" name="Select Entities">
<ignition-gui>
<gz-gui>
<anchors target="Select entities">
<line own="right" target="right"/>
<line own="top" target="top"/>
Expand All @@ -69,12 +69,12 @@
<property key="height" type="double">5</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
</ignition-gui>
</gz-gui>
</plugin>

<!-- World control -->
<plugin filename="WorldControl" name="World control">
<ignition-gui>
<gz-gui>
<title>World control</title>
<property type="bool" key="showTitleBar">false</property>
<property type="bool" key="resizable">false</property>
Expand All @@ -87,7 +87,7 @@
<line own="left" target="left"/>
<line own="bottom" target="bottom"/>
</anchors>
</ignition-gui>
</gz-gui>

<play_pause>true</play_pause>
<step>true</step>
Expand All @@ -98,7 +98,7 @@

<!-- World statistics -->
<plugin filename="WorldStats" name="World stats">
<ignition-gui>
<gz-gui>
<title>World stats</title>
<property type="bool" key="showTitleBar">false</property>
<property type="bool" key="resizable">false</property>
Expand All @@ -111,7 +111,7 @@
<line own="right" target="right"/>
<line own="bottom" target="bottom"/>
</anchors>
</ignition-gui>
</gz-gui>

<sim_time>true</sim_time>
<real_time>true</real_time>
Expand All @@ -120,24 +120,24 @@
</plugin>

<plugin filename="ImageDisplay" name="Image Display">
<ignition-gui>
<gz-gui>
<title>Camera</title>
<property key="state" type="string">floating</property>
<property type="double" key="width">350</property>
<property type="double" key="height">315</property>
</ignition-gui>
</gz-gui>
<topic>camera</topic>
<topic_picker>false</topic_picker>
</plugin>

<plugin filename="RenderingGuiPlugin" name="Rendering GUI Plugin">
<ignition-gui>
<gz-gui>
<title>Rendering GUI Plugin</title>
<property key="state" type="string">floating</property>
<property type="double" key="width">350</property>
<property type="double" key="height">100</property>
<property type="double" key="y">500</property>
</ignition-gui>
</gz-gui>
</plugin>
</gui>

Expand Down
4 changes: 2 additions & 2 deletions examples/plugin/reset_plugin/JointPositionRandomizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class JointPositionRandomizer : public System,
}
else if (jointType->Data() == sdf::JointType::REVOLUTE)
{
pos = math::Rand::DblUniform(0, IGN_PI);
pos = math::Rand::DblUniform(0, GZ_PI);
std::cout << "revolute joint (" << joint
<< ") pos: (" << pos << " rad)"<< std::endl;
}
Expand All @@ -71,7 +71,7 @@ class JointPositionRandomizer : public System,
};
} // namespace reset_plugin

IGNITION_ADD_PLUGIN(reset_plugin::JointPositionRandomizer,
GZ_ADD_PLUGIN(reset_plugin::JointPositionRandomizer,
gz::sim::System,
reset_plugin::JointPositionRandomizer::ISystemConfigure,
reset_plugin::JointPositionRandomizer::ISystemReset)
2 changes: 1 addition & 1 deletion examples/plugin/system_plugin/SampleSystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <gz/plugin/Register.hh>

// Include a line in your source file for each interface implemented.
IGNITION_ADD_PLUGIN(
GZ_ADD_PLUGIN(
sample_system::SampleSystem,
gz::sim::System,
sample_system::SampleSystem::ISystemPostUpdate)
Expand Down
2 changes: 1 addition & 1 deletion examples/plugin/system_plugin/SampleSystem2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! [registerSampleSystem2]
#include <gz/plugin/RegisterMore.hh>

IGNITION_ADD_PLUGIN(
GZ_ADD_PLUGIN(
sample_system::SampleSystem2,
gz::sim::System,
sample_system::SampleSystem2::ISystemPreUpdate,
Expand Down
24 changes: 12 additions & 12 deletions examples/scripts/log_video_recorder/log_video_recorder.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -35,42 +35,42 @@

<gui fullscreen='0'>
<plugin filename='MinimalScene' name='3D View'>
<ignition-gui>
<gz-gui>
<title>3D View</title>
<property type='bool' key='showTitleBar'>false</property>
<property type='string' key='state'>docked</property>
</ignition-gui>
</gz-gui>
<engine>ogre2</engine>
<scene>scene</scene>
<ambient_light>0.4 0.4 0.4</ambient_light>
<background_color>0.8 0.8 0.8</background_color>
<camera_pose>-6 0 6 0 0.5 0</camera_pose>
</plugin>
<plugin filename="GzSceneManager" name="Scene Manager">
<ignition-gui>
<gz-gui>
<property key="resizable" type="bool">false</property>
<property key="width" type="double">5</property>
<property key="height" type="double">5</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
</ignition-gui>
</gz-gui>
</plugin>
<plugin filename="CameraTracking" name="Camera Tracking">
<ignition-gui>
<gz-gui>
<property key="resizable" type="bool">false</property>
<property key="width" type="double">5</property>
<property key="height" type="double">5</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
</ignition-gui>
</gz-gui>
<camera_follow>
<p_gain>0.01</p_gain>
<world_frame>true</world_frame>
<offset>-1.0 0 2.5</offset>
</camera_follow>
</plugin>
<plugin filename='WorldControl' name='World control'>
<ignition-gui>
<gz-gui>
<title>World control</title>
<property type='bool' key='showTitleBar'>false</property>
<property type='bool' key='resizable'>false</property>
Expand All @@ -82,7 +82,7 @@
<line own='left' target='left'/>
<line own='bottom' target='bottom'/>
</anchors>
</ignition-gui>
</gz-gui>
<play_pause>true</play_pause>
<step>true</step>
<start_paused>true</start_paused>
Expand All @@ -91,7 +91,7 @@
<use_event>true</use_event>
</plugin>
<plugin filename='WorldStats' name='World stats'>
<ignition-gui>
<gz-gui>
<title>World stats</title>
<property type='bool' key='showTitleBar'>false</property>
<property type='bool' key='resizable'>false</property>
Expand All @@ -103,7 +103,7 @@
<line own='right' target='right'/>
<line own='bottom' target='bottom'/>
</anchors>
</ignition-gui>
</gz-gui>
<sim_time>true</sim_time>
<real_time>true</real_time>
<real_time_factor>true</real_time_factor>
Expand All @@ -112,7 +112,7 @@
</plugin>
<!-- Video recorder -->
<plugin filename="VideoRecorder" name="VideoRecorder">
<ignition-gui>
<gz-gui>
<property key="resizable" type="bool">false</property>
<property key="x" type="double">0</property>
<property key="y" type="double">0</property>
Expand All @@ -121,7 +121,7 @@
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
<property key="cardBackground" type="string">#777777</property>
</ignition-gui>
</gz-gui>

<record_video>
<use_sim_time>true</use_sim_time>
Expand Down
Loading