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 Provisional Finale: Source Migration : gz-sim #1591

Merged
merged 2 commits into from
Jul 20, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/ComponentFactory_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ TEST_F(ComponentFactoryTest, Register)
// Store number of registered component types
auto registeredCount = factory->TypeIds().size();

factory->Register<MyCustom>("ign_gazebo_components.MyCustom",
factory->Register<MyCustom>("gz_sim_components.MyCustom",
new components::ComponentDescriptor<MyCustom>());

// Check now it has type id
EXPECT_NE(0u, MyCustom::typeId);
EXPECT_EQ("ign_gazebo_components.MyCustom", MyCustom::typeName);
EXPECT_EQ("ign_gazebo_components.MyCustom",
EXPECT_EQ("gz_sim_components.MyCustom", MyCustom::typeName);
EXPECT_EQ("gz_sim_components.MyCustom",
factory->Name(MyCustom::typeId));

// Check factory knows id
Expand All @@ -69,15 +69,15 @@ TEST_F(ComponentFactoryTest, Register)
EXPECT_NE(ids.end(), std::find(ids.begin(), ids.end(), MyCustom::typeId));

// Fail to register same component twice
factory->Register<MyCustom>("ign_gazebo_components.MyCustom",
factory->Register<MyCustom>("gz_sim_components.MyCustom",
new components::ComponentDescriptor<MyCustom>());

EXPECT_EQ(registeredCount + 1, factory->TypeIds().size());

// Fail to register 2 components with same name
using Duplicate = components::Component<components::NoData,
class DuplicateTag>;
factory->Register<Duplicate>("ign_gazebo_components.MyCustom",
factory->Register<Duplicate>("gz_sim_components.MyCustom",
new components::ComponentDescriptor<Duplicate>());

EXPECT_EQ(registeredCount + 1, factory->TypeIds().size());
Expand Down
2 changes: 1 addition & 1 deletion src/Component_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ TEST_F(ComponentTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(DataByMove))
// Create a custom component with shared_ptr data
using CustomComponent =
components::Component<std::shared_ptr<int>, class CustomComponentTag>;
factory->Register<CustomComponent>("ign_gazebo_components.MyCustom",
factory->Register<CustomComponent>("gz_sim_components.MyCustom",
new components::ComponentDescriptor<CustomComponent>());

EntityComponentManager ecm;
Expand Down
16 changes: 8 additions & 8 deletions src/EntityComponentManager_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,39 +50,39 @@ inline namespace GZ_SIM_VERSION_NAMESPACE {
namespace components
{
using IntComponent = components::Component<int, class IntComponentTag>;
GZ_SIM_REGISTER_COMPONENT("ign_gazebo_components.IntComponent",
GZ_SIM_REGISTER_COMPONENT("gz_sim_components.IntComponent",
IntComponent)

using UIntComponent = components::Component<int, class IntComponentTag>;
GZ_SIM_REGISTER_COMPONENT("ign_gazebo_components.UIntComponent",
GZ_SIM_REGISTER_COMPONENT("gz_sim_components.UIntComponent",
UIntComponent)

using DoubleComponent = components::Component<double, class DoubleComponentTag>;
GZ_SIM_REGISTER_COMPONENT("ign_gazebo_components.DoubleComponent",
GZ_SIM_REGISTER_COMPONENT("gz_sim_components.DoubleComponent",
DoubleComponent)

using StringComponent =
components::Component<std::string, class StringComponentTag>;
GZ_SIM_REGISTER_COMPONENT("ign_gazebo_components.StringComponent",
GZ_SIM_REGISTER_COMPONENT("gz_sim_components.StringComponent",
StringComponent)

using BoolComponent = components::Component<bool, class BoolComponentTag>;
GZ_SIM_REGISTER_COMPONENT("ign_gazebo_components.BoolComponent",
GZ_SIM_REGISTER_COMPONENT("gz_sim_components.BoolComponent",
BoolComponent)

using Even = components::Component<components::NoData, class EvenTag>;
GZ_SIM_REGISTER_COMPONENT("ign_gazebo_components.Even", Even)
GZ_SIM_REGISTER_COMPONENT("gz_sim_components.Even", Even)

using Odd = components::Component<components::NoData, class OddTag>;
GZ_SIM_REGISTER_COMPONENT("ign_gazebo_components.Odd", Odd)
GZ_SIM_REGISTER_COMPONENT("gz_sim_components.Odd", Odd)

struct Custom
{
int dummy{123};
};

using CustomComponent = components::Component<Custom, class CustomTag>;
GZ_SIM_REGISTER_COMPONENT("ign_gazebo_components.CustomComponent",
GZ_SIM_REGISTER_COMPONENT("gz_sim_components.CustomComponent",
CustomComponent)
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/SimulationRunner_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ inline namespace GZ_SIM_VERSION_NAMESPACE {
namespace components
{
using IntComponent = components::Component<int, class IntComponentTag>;
GZ_SIM_REGISTER_COMPONENT("ign_gazebo_components.IntComponent",
GZ_SIM_REGISTER_COMPONENT("gz_sim_components.IntComponent",
IntComponent)

using DoubleComponent = components::Component<double, class DoubleComponentTag>;
GZ_SIM_REGISTER_COMPONENT("ign_gazebo_components.DoubleComponent",
GZ_SIM_REGISTER_COMPONENT("gz_sim_components.DoubleComponent",
DoubleComponent)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/model.yaml.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- # Model subcommand available inside Gazebo Sim.
format: 1.0.0
library_name: gz-sim-ign
library_name: gz-sim-gz
library_version: @PROJECT_VERSION_FULL@
library_path: @gz_model_ruby_path@
commands:
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/sim.yaml.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- # Subcommands available inside Gazebo Sim
format: 1.0.0
library_name: gz-sim-ign
library_name: gz-sim-gz
library_version: @PROJECT_VERSION_FULL@
library_path: @gz_library_path@
commands:
Expand Down
4 changes: 2 additions & 2 deletions src/gui/plugins/component_inspector/Light.qml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Rectangle {

Component {
id: spinZeroMax
IgnSpinBox {
GzSpinBox {
id: writableSpin
value: writableSpin.activeFocus ? writableSpin.value : numberValue
minimumValue: 0
Expand All @@ -185,7 +185,7 @@ Rectangle {
}
Component {
id: spinNoLimit
IgnSpinBox {
GzSpinBox {
id: writableSpin
value: writableSpin.activeFocus ? writableSpin.value : numberValue
minimumValue: -100000
Expand Down
2 changes: 1 addition & 1 deletion src/gui/plugins/component_inspector/Material.qml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Rectangle {
// Used to create rgba spin boxes
Component {
id: spinBoxMaterialColor
IgnSpinBox {
GzSpinBox {
id: writableSpin
value: writableSpin.activeFocus ? writableSpin.value : numberValue
minimumValue: 0
Expand Down
2 changes: 1 addition & 1 deletion src/gui/plugins/component_inspector/Physics.qml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Rectangle {

Component {
id: writablePositiveNumber
IgnSpinBox {
GzSpinBox {
id: writableSpin
value: writableSpin.activeFocus ? writableSpin.value : numberValue
minimumValue: minPhysParam
Expand Down
2 changes: 1 addition & 1 deletion src/gui/plugins/component_inspector/Pose3d.qml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Rectangle {
*/
Component {
id: writableNumber
IgnSpinBox {
GzSpinBox {
id: writableSpin
value: writableSpin.activeFocus ? writableSpin.value : numberValue
minimumValue: -spinMax
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Rectangle {
anchors.centerIn: parent
}
}
IgnSpinBox {
GzSpinBox {
id: latSpin
Layout.fillWidth: true
height: 40
Expand Down Expand Up @@ -217,7 +217,7 @@ Rectangle {
anchors.centerIn: parent
}
}
IgnSpinBox {
GzSpinBox {
id: lonSpin
Layout.fillWidth: true
height: 40
Expand Down Expand Up @@ -255,7 +255,7 @@ Rectangle {
anchors.centerIn: parent
}
}
IgnSpinBox {
GzSpinBox {
id: elevationSpin
Layout.fillWidth: true
height: 40
Expand Down Expand Up @@ -293,7 +293,7 @@ Rectangle {
anchors.centerIn: parent
}
}
IgnSpinBox {
GzSpinBox {
id: headingSpin
Layout.fillWidth: true
height: 40
Expand Down
2 changes: 1 addition & 1 deletion src/gui/plugins/component_inspector/Vector3d.qml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Rectangle {
*/
Component {
id: writableNumber
IgnSpinBox {
GzSpinBox {
id: writableSpin
value: numberValue
minimumValue: -spinMax
Expand Down
4 changes: 2 additions & 2 deletions src/gui/plugins/component_inspector_editor/Light.qml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Rectangle {

Component {
id: spinZeroMax
IgnSpinBox {
GzSpinBox {
id: writableSpin
value: writableSpin.activeFocus ? writableSpin.value : numberValue
minimumValue: 0
Expand All @@ -177,7 +177,7 @@ Rectangle {
}
Component {
id: spinNoLimit
IgnSpinBox {
GzSpinBox {
id: writableSpin
value: writableSpin.activeFocus ? writableSpin.value : numberValue
minimumValue: -Number.MAX_VALUE
Expand Down
2 changes: 1 addition & 1 deletion src/gui/plugins/component_inspector_editor/Material.qml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Rectangle {
// Used to create rgba spin boxes
Component {
id: spinBoxMaterialColor
IgnSpinBox {
GzSpinBox {
id: writableSpin
value: writableSpin.activeFocus ? writableSpin.value : numberValue
minimumValue: 0
Expand Down
2 changes: 1 addition & 1 deletion src/gui/plugins/component_inspector_editor/Physics.qml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Rectangle {

Component {
id: writablePositiveNumber
IgnSpinBox {
GzSpinBox {
id: writableSpin
value: writableSpin.activeFocus ? writableSpin.value : numberValue
minimumValue: minPhysParam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Rectangle {
anchors.centerIn: parent
}
}
IgnSpinBox {
GzSpinBox {
id: latSpin
Layout.fillWidth: true
height: 40
Expand Down Expand Up @@ -217,7 +217,7 @@ Rectangle {
anchors.centerIn: parent
}
}
IgnSpinBox {
GzSpinBox {
id: lonSpin
Layout.fillWidth: true
height: 40
Expand Down Expand Up @@ -255,7 +255,7 @@ Rectangle {
anchors.centerIn: parent
}
}
IgnSpinBox {
GzSpinBox {
id: elevationSpin
Layout.fillWidth: true
height: 40
Expand Down Expand Up @@ -293,7 +293,7 @@ Rectangle {
anchors.centerIn: parent
}
}
IgnSpinBox {
GzSpinBox {
id: headingSpin
Layout.fillWidth: true
height: 40
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Rectangle {
*/
Component {
id: writableNumber
IgnSpinBox {
GzSpinBox {
id: writableSpin
value: writableSpin.activeFocus ? writableSpin.value : numberValue
minimumValue: minValue
Expand Down
2 changes: 1 addition & 1 deletion src/gui/plugins/component_inspector_editor/Vector3d.qml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Rectangle {
*/
Component {
id: writableNumber
IgnSpinBox {
GzSpinBox {
id: writableSpin
value: numberValue
minimumValue: -spinMax
Expand Down
2 changes: 1 addition & 1 deletion src/gui/plugins/joint_position_controller/Joint.qml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Rectangle {
}
}

IgnSpinBox {
GzSpinBox {
id: spin
value: spin.activeFocus ? joint.targetValue : model.value
minimumValue: model.min
Expand Down
16 changes: 8 additions & 8 deletions src/gui/plugins/plot_3d/Plot3D.qml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Rectangle {
Layout.column: 0
leftPadding: 5
}
IgnSpinBox {
GzSpinBox {
id: x
Layout.fillWidth: true
Layout.row: 1
Expand All @@ -155,7 +155,7 @@ Rectangle {
Layout.column: 2
leftPadding: 5
}
IgnSpinBox {
GzSpinBox {
id: y
Layout.fillWidth: true
value: Plot3D.offset.y
Expand All @@ -172,7 +172,7 @@ Rectangle {
Layout.column: 4
leftPadding: 5
}
IgnSpinBox {
GzSpinBox {
id: z
Layout.fillWidth: true
Layout.row: 1
Expand Down Expand Up @@ -204,7 +204,7 @@ Rectangle {
leftPadding: 5
}

IgnSpinBox {
GzSpinBox {
id: r
Layout.fillWidth: true
Layout.row: 3
Expand All @@ -225,7 +225,7 @@ Rectangle {
leftPadding: 5
}

IgnSpinBox {
GzSpinBox {
id: g
Layout.fillWidth: true
Layout.row: 3
Expand All @@ -246,7 +246,7 @@ Rectangle {
leftPadding: 5
}

IgnSpinBox {
GzSpinBox {
id: b
Layout.fillWidth: true
Layout.row: 3
Expand All @@ -271,7 +271,7 @@ Rectangle {
Layout.column: 0
leftPadding: 5
}
IgnSpinBox {
GzSpinBox {
id: minDist
Layout.fillWidth: true
Layout.row: 0
Expand All @@ -291,7 +291,7 @@ Rectangle {
Layout.column: 0
leftPadding: 5
}
IgnSpinBox {
GzSpinBox {
id: maxPoints
Layout.fillWidth: true
Layout.row: 1
Expand Down
Loading