Skip to content

Commit

Permalink
3 to 4 (#933)
Browse files Browse the repository at this point in the history
Signed-off-by: Ashton Larkin <[email protected]>
  • Loading branch information
adlarkin committed Jul 27, 2021
2 parents 488cc87 + becec7e commit 02ee7c3
Show file tree
Hide file tree
Showing 35 changed files with 1,801 additions and 14 deletions.
118 changes: 118 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,124 @@

### Ignition Gazebo 3.X.X (202X-XX-XX)


### Ignition Gazebo 3.9.0 (2021-07-XX)

1. Add a convenience function for getting possibly non-existing components.
* [Pull request #629](https://github.com/ignitionrobotics/ign-gazebo/pull/629)

1. Fix topLevelModel method
* [Pull request #600](https://github.com/ignitionrobotics/ign-gazebo/pull/600)

1. World exporter
* [Pull request #474](https://github.com/ignitionrobotics/ign-gazebo/pull/474)

1. Fix finding PBR materials
* [Pull request #575](https://github.com/ignitionrobotics/ign-gazebo/pull/575)

1. Handle multiple logical cameras
* [Pull request #539](https://github.com/ignitionrobotics/ign-gazebo/pull/539)

1. Make some tests more robust
* [Pull request #314](https://github.com/ignitionrobotics/ign-gazebo/pull/314)

1. Fix codecheck
* [Pull request #887](https://github.com/ignitionrobotics/ign-gazebo/pull/887)

1. Hello world plugin added
* [Pull request #699](https://github.com/ignitionrobotics/ign-gazebo/pull/699)

1. Model info CLI `ign model`
* [Pull request #893](https://github.com/ignitionrobotics/ign-gazebo/pull/893)

1. Don't create components for entities that don't exist
* [Pull request #927](https://github.com/ignitionrobotics/ign-gazebo/pull/927)

1. Adds Mesh Tutorial
* [Pull request #915](https://github.com/ignitionrobotics/ign-gazebo/pull/915)

1. Fix updating GUI plugin on load
* [Pull request #904](https://github.com/ignitionrobotics/ign-gazebo/pull/904)

1. Fix documentation for the Sensor component
* [Pull request #898](https://github.com/ignitionrobotics/ign-gazebo/pull/898)

1. Use UINT64_MAX for kComponentTpyeIDInvalid instead of relying on underflow
* [Pull request #889](https://github.com/ignitionrobotics/ign-gazebo/pull/889)

1. Fix mouse view control target position
* [Pull request #879](https://github.com/ignitionrobotics/ign-gazebo/pull/879)

1. Set GUI camera pose
* [Pull request #863](https://github.com/ignitionrobotics/ign-gazebo/pull/863)

1. Enables confirmation dialog when closing Gazebo.
* [Pull request #850](https://github.com/ignitionrobotics/ign-gazebo/pull/850)

1. Depend on ign-rendering 3.5
* [Pull request #867](https://github.com/ignitionrobotics/ign-gazebo/pull/867)

1. Using math::SpeedLimiter on the diff_drive controller.
* [Pull request #833](https://github.com/ignitionrobotics/ign-gazebo/pull/833)

1. New example: get an ECM snapshot from an external program
* [Pull request #859](https://github.com/ignitionrobotics/ign-gazebo/pull/859)

1. Fix WindEffects Plugin bug, not configuring new links
* [Pull request #844](https://github.com/ignitionrobotics/ign-gazebo/pull/844)

1. Fix potentially flaky integration component test case
* [Pull request #848](https://github.com/ignitionrobotics/ign-gazebo/pull/848)

1. Cleanup and alphabetize plugin headers
* [Pull request #838](https://github.com/ignitionrobotics/ign-gazebo/pull/838)

1. Removed duplicated code with rendering::sceneFromFirstRenderEngine
* [Pull request #819](https://github.com/ignitionrobotics/ign-gazebo/pull/819)

1. Remove unused headers in video_recoder plugin
* [Pull request #834](https://github.com/ignitionrobotics/ign-gazebo/pull/834)

1. Use moveToHelper from ign-rendering
* [Pull request #825](https://github.com/ignitionrobotics/ign-gazebo/pull/825)

1. Remove tools/code_check and update codecov
* [Pull request #814](https://github.com/ignitionrobotics/ign-gazebo/pull/814)

1. Add service and GUI to configure physics parameters
* [Pull request #536](https://github.com/ignitionrobotics/ign-gazebo/pull/536)
* [Pull request #812](https://github.com/ignitionrobotics/ign-gazebo/pull/812)

1. Fix documentation for EntityComponentManager::EachNew
* [Pull request #795](https://github.com/ignitionrobotics/ign-gazebo/pull/795)

1. Fix macOS build: components::Name in benchmark
* [Pull request #784](https://github.com/ignitionrobotics/ign-gazebo/pull/784)

1. Don't store duplicate ComponentTypeId in ECM
* [Pull request #751](https://github.com/ignitionrobotics/ign-gazebo/pull/751)

1. [TPE] Support setting individual link velocity
* [Pull request #427](https://github.com/ignitionrobotics/ign-gazebo/pull/427)

1. 👩‍🌾 Enable Focal CI
* [Pull request #646](https://github.com/ignitionrobotics/ign-gazebo/pull/646)

1. Update benchmark comparison instructions
* [Pull request #766](https://github.com/ignitionrobotics/ign-gazebo/pull/766)

1. Use Protobuf_IMPORT_DIRS instead of PROTOBUF_IMPORT_DIRS for compatibility with Protobuf CMake config
* [Pull request #715](https://github.com/ignitionrobotics/ign-gazebo/pull/715)

1. Do not pass -Wno-unused-parameter to MSVC compiler
* [Pull request #716](https://github.com/ignitionrobotics/ign-gazebo/pull/716)

1. Scenebroadcaster sensors
* [Pull request #698](https://github.com/ignitionrobotics/ign-gazebo/pull/698)

1. Make it so joint state publisher is quieter
* [Pull request #696](https://github.com/ignitionrobotics/ign-gazebo/pull/696)

### Ignition Gazebo 3.8.0 (2021-03-17)

1. Add joint position controller GUI, also enable tests for GUI plugins
Expand Down
28 changes: 21 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ set(gui_sources
PARENT_SCOPE
)

ign_add_component(ign SOURCES ign.cc GET_TARGET_NAME ign_lib_target)
ign_add_component(ign
SOURCES
ign.cc
cmd/ModelCommandAPI.cc
GET_TARGET_NAME ign_lib_target)
target_link_libraries(${ign_lib_target}
PRIVATE
${PROJECT_LIBRARY_TARGET_NAME}
Expand Down Expand Up @@ -59,6 +63,7 @@ set (sources
Util.cc
View.cc
World.cc
cmd/ModelCommandAPI.cc
${PROTO_PRIVATE_SRC}
${network_sources}
)
Expand All @@ -74,6 +79,7 @@ set (gtest_sources
ign_TEST.cc
Link_TEST.cc
Model_TEST.cc
ModelCommandAPI_TEST.cc
SdfEntityCreator_TEST.cc
SdfGenerator_TEST.cc
Server_TEST.cc
Expand Down Expand Up @@ -134,7 +140,14 @@ ign_build_tests(TYPE UNIT
ignition-gazebo${PROJECT_VERSION_MAJOR}
)

if(TARGET UNIT_ign_TEST)
# Command line tests need extra settings
foreach(CMD_TEST
UNIT_ign_TEST
UNIT_ModelCommandAPI_TEST)

if(NOT TARGET ${CMD_TEST})
continue()
endif()

# Running `ign gazebo` on macOS has problems when run with /usr/bin/ruby
# due to System Integrity Protection (SIP). Try to find ruby from
Expand All @@ -143,26 +156,27 @@ if(TARGET UNIT_ign_TEST)
find_program(BREW_RUBY ruby HINTS /usr/local/opt/ruby/bin)
endif()

add_dependencies(UNIT_ign_TEST
add_dependencies(${CMD_TEST}
${ign_lib_target}
TestModelSystem
TestSensorSystem
TestWorldSystem
)

target_compile_definitions(UNIT_ign_TEST PRIVATE
target_compile_definitions(${CMD_TEST} PRIVATE
"BREW_RUBY=\"${BREW_RUBY} \"")

target_compile_definitions(UNIT_ign_TEST PRIVATE
target_compile_definitions(${CMD_TEST} PRIVATE
"IGN_PATH=\"${IGNITION-TOOLS_BINARY_DIRS}\"")

set(_env_vars)
list(APPEND _env_vars "IGN_CONFIG_PATH=${CMAKE_BINARY_DIR}/test/conf")
list(APPEND _env_vars "IGN_GAZEBO_SYSTEM_PLUGIN_PATH=$<TARGET_FILE_DIR:TestModelSystem>")

set_tests_properties(UNIT_ign_TEST PROPERTIES
set_tests_properties(${CMD_TEST} PROPERTIES
ENVIRONMENT "${_env_vars}")
endif()

endforeach()

if(NOT WIN32)
add_subdirectory(cmd)
Expand Down
9 changes: 9 additions & 0 deletions src/EntityComponentManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,15 @@ ComponentKey EntityComponentManager::CreateComponentImplementation(
const Entity _entity, const ComponentTypeId _componentTypeId,
const components::BaseComponent *_data)
{
// make sure the entity exists
if (!this->HasEntity(_entity))
{
ignerr << "Trying to create a component of type [" << _componentTypeId
<< "] attached to entity [" << _entity << "], but this entity does not "
<< "exist. This create component request will be ignored." << std::endl;
return ComponentKey();
}

// If type hasn't been instantiated yet, create a storage for it
if (!this->HasComponentType(_componentTypeId))
{
Expand Down
10 changes: 10 additions & 0 deletions src/EntityComponentManager_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,16 @@ TEST_P(EntityComponentManagerFixture, EntitiesAndComponents)
EXPECT_FALSE(manager.EntityHasComponentType(entity, DoubleComponent::typeId));
EXPECT_FALSE(manager.EntityHasComponentType(entity2, IntComponent::typeId));

// Try to add a component to an entity that does not exist
EXPECT_FALSE(manager.HasEntity(kNullEntity));
EXPECT_FALSE(manager.EntityHasComponentType(kNullEntity,
IntComponent::typeId));
EXPECT_EQ(ComponentKey(), manager.CreateComponent<IntComponent>(kNullEntity,
IntComponent(123)));
EXPECT_FALSE(manager.HasEntity(kNullEntity));
EXPECT_FALSE(manager.EntityHasComponentType(kNullEntity,
IntComponent::typeId));

// Query non-existing component, the default value is default-constructed
BoolComponent *boolComp = manager.ComponentDefault<BoolComponent>(entity);
ASSERT_NE(nullptr, boolComp);
Expand Down
Loading

0 comments on commit 02ee7c3

Please sign in to comment.