Skip to content

Commit

Permalink
adressed final remarks from pr #3
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub-Krakowiak committed Nov 10, 2022
1 parent c2f6ab1 commit 2841ef2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@
.idea
build
cmake-build-debug
RGLServerPlugin/include/rgl
2 changes: 1 addition & 1 deletion RGLServerPlugin/include/RGLServerPluginManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ namespace rgl {
////////////////////////////////////////////// Functions /////////////////////////////////////////////
////////////////////////////// Scene ////////////////////////////////

bool CheckNewLidarsCb(
bool RegisterNewLidarsCb(
ignition::gazebo::Entity entity,
const ignition::gazebo::EntityComponentManager& ecm);

Expand Down
3 changes: 3 additions & 0 deletions RGLServerPlugin/src/Mesh.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ const ignition::common::Mesh* RGLServerPluginManager::LoadBox(
return mesh_manager->MeshByName(UNIT_BOX_TEXT);
}

//The difference between capsule and other primitive geometry types is
// that "unit_capsule" mesh is not created by the gazebo MeshManager,
// while other primitive types have their unit meshes created and ready to query by name
const ignition::common::Mesh* RGLServerPluginManager::LoadCapsule(
const sdf::Geometry& data,
double& scale_x,
Expand Down
4 changes: 2 additions & 2 deletions RGLServerPlugin/src/RGLServerPluginManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void RGLServerPluginManager::Configure(
ignition::gazebo::EventManager& evm) {

ecm.Each<>([&](const ignition::gazebo::Entity& entity)-> bool {
return CheckNewLidarsCb(entity, ecm);});
return RegisterNewLidarsCb(entity, ecm);});

ecm.Each<ignition::gazebo::components::Visual, ignition::gazebo::components::Geometry>
(std::bind(&RGLServerPluginManager::LoadEntityToRGLCb, this, _1, _2, _3));
Expand All @@ -55,7 +55,7 @@ void RGLServerPluginManager::PostUpdate(
const ignition::gazebo::EntityComponentManager& ecm) {

ecm.EachNew<>([&](const ignition::gazebo::Entity& entity)-> bool {
return CheckNewLidarsCb(entity, ecm);});
return RegisterNewLidarsCb(entity, ecm);});

ecm.EachNew<ignition::gazebo::components::Visual, ignition::gazebo::components::Geometry>
(std::bind(&RGLServerPluginManager::LoadEntityToRGLCb, this, _1, _2, _3));
Expand Down
2 changes: 1 addition & 1 deletion RGLServerPlugin/src/Scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ using namespace rgl;
#pragma ide diagnostic ignored "ConstantFunctionResult"

// always returns true, because the ecm will stop if it encounters false
bool RGLServerPluginManager::CheckNewLidarsCb(
bool RGLServerPluginManager::RegisterNewLidarsCb(
ignition::gazebo::Entity entity,
const ignition::gazebo::EntityComponentManager& ecm) {
auto data = ecm.ComponentData<ignition::gazebo::components::SystemPluginInfo>(entity);
Expand Down

0 comments on commit 2841ef2

Please sign in to comment.