Skip to content

Commit

Permalink
Address reviewer feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
  • Loading branch information
azeey committed Mar 23, 2021
1 parent dca717a commit b836a0a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
5 changes: 3 additions & 2 deletions dartsim/src/EntityManagementFeatures.cc
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ std::size_t EntityManagementFeatures::GetNestedModelCount(
Identity EntityManagementFeatures::GetNestedModel(
const Identity &_modelID, const std::size_t _modelIndex) const
{
auto modelInfo = this->ReferenceInterface<ModelInfo>(_modelID);
const auto modelInfo = this->ReferenceInterface<ModelInfo>(_modelID);
if (_modelIndex >= modelInfo->nestedModels.size())
{
return this->GenerateInvalidId();
Expand All @@ -303,7 +303,7 @@ Identity EntityManagementFeatures::GetNestedModel(
Identity EntityManagementFeatures::GetNestedModel(
const Identity &_modelID, const std::string &_modelName) const
{
auto modelInfo = this->ReferenceInterface<ModelInfo>(_modelID);
const auto modelInfo = this->ReferenceInterface<ModelInfo>(_modelID);

const std::string fullName =
::sdf::JoinName(modelInfo->model->getName(), _modelName);
Expand All @@ -325,6 +325,7 @@ Identity EntityManagementFeatures::GetNestedModel(
return this->GenerateInvalidId();
}
}

/////////////////////////////////////////////////
std::size_t EntityManagementFeatures::GetLinkCount(
const Identity &_modelID) const
Expand Down
16 changes: 12 additions & 4 deletions include/ignition/physics/ConstructEmpty.hh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace ignition {
namespace physics {

/////////////////////////////////////////////////
/// \brief This feature constructs an empty world and return its pointer
/// \brief This feature constructs an empty world and returns its pointer
/// from the current physics engine in use.
class ConstructEmptyWorldFeature : public virtual Feature
{
Expand All @@ -36,6 +36,8 @@ class ConstructEmptyWorldFeature : public virtual Feature
public: using WorldPtrType = WorldPtr<PolicyT, FeaturesT>;

/// \brief Construct an empty world and attach a given name to it.
/// \param[in] _name
/// Name of the world.
/// \return
/// The WorldPtrType of the constructed world.
public: WorldPtrType ConstructEmptyWorld(const std::string &_name);
Expand All @@ -50,7 +52,7 @@ class ConstructEmptyWorldFeature : public virtual Feature
};

/////////////////////////////////////////////////
/// \brief This feature constructs an empty model and return its pointer
/// \brief This feature constructs an empty model and returns its pointer
/// from the given world.
class ConstructEmptyModelFeature : public virtual Feature
{
Expand All @@ -60,6 +62,8 @@ class ConstructEmptyModelFeature : public virtual Feature
public: using ModelPtrType = ModelPtr<PolicyT, FeaturesT>;

/// \brief Construct an empty model and attach a given name to it.
/// \param[in] _name
/// Name of the model.
/// \return
/// The ModelPtrType of the constructed model.
public: ModelPtrType ConstructEmptyModel(const std::string &_name);
Expand All @@ -74,7 +78,7 @@ class ConstructEmptyModelFeature : public virtual Feature
};

/////////////////////////////////////////////////
/// \brief This feature constructs an empty nested model and return its pointer
/// \brief This feature constructs an empty nested model and returns its pointer
/// from the given world.
class ConstructEmptyNestedModelFeature : public virtual Feature
{
Expand All @@ -84,6 +88,8 @@ class ConstructEmptyNestedModelFeature : public virtual Feature
public: using ModelPtrType = ModelPtr<PolicyT, FeaturesT>;

/// \brief Construct an empty model and attach a given name to it.
/// \param[in] _name
/// Name of the nested model.
/// \return
/// The ModelPtrType of the constructed model.
public: ModelPtrType ConstructEmptyModel(const std::string &_name);
Expand All @@ -98,7 +104,7 @@ class ConstructEmptyNestedModelFeature : public virtual Feature
};

/////////////////////////////////////////////////
/// \brief This feature constructs an empty link and return its pointer
/// \brief This feature constructs an empty link and returns its pointer
/// from the given model.
class ConstructEmptyLinkFeature : public virtual Feature
{
Expand All @@ -108,6 +114,8 @@ class ConstructEmptyLinkFeature : public virtual Feature
public: using LinkPtrType = LinkPtr<PolicyT, FeaturesT>;

/// \brief Construct an empty link and attach a given name to it.
/// \param[in] _name
/// Name of the link.
/// \return
/// The LinkPtrType of the constructed link.
public: LinkPtrType ConstructEmptyLink(const std::string &_name);
Expand Down
3 changes: 2 additions & 1 deletion include/ignition/physics/GetEntities.hh
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ namespace ignition

/////////////////////////////////////////////////
/// \brief This feature retrieves the nested model pointer from the parent
/// model by specifying the model index and model index/name.
/// model by specifying the name or index of the nested model.
class IGNITION_PHYSICS_VISIBLE GetNestedModelFromModel
: public virtual FeatureWithRequirements<GetModelFromWorld>
{
Expand Down Expand Up @@ -263,6 +263,7 @@ namespace ignition
const Identity &_modelID, const std::string &_modelName) const = 0;
};
};

/////////////////////////////////////////////////
/// \brief This feature retrieves the link pointer from the model
/// by specifying model index and link index/name.
Expand Down

0 comments on commit b836a0a

Please sign in to comment.