Skip to content

Commit

Permalink
Create AxisAlignedBox component for slotcar
Browse files Browse the repository at this point in the history
Create component in plugin's Configure() method to be used later for
other purposes including dispensing/ingesting.
  • Loading branch information
mrushyendra committed Sep 5, 2020
1 parent f5d0588 commit 4eab7e7
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <ignition/gazebo/components/Name.hh>
#include <ignition/gazebo/components/Pose.hh>
#include <ignition/gazebo/components/Static.hh>
#include <ignition/gazebo/components/AxisAlignedBox.hh>

#include <rclcpp/rclcpp.hpp>

Expand Down Expand Up @@ -122,6 +123,12 @@ void SlotcarPlugin::Configure(const Entity& entity,
// Initialize Pose3d component
if (!ecm.EntityHasComponentType(entity, components::Pose().TypeId()))
ecm.CreateComponent(entity, components::Pose());
// Initialize Bounding Box component
if (!ecm.EntityHasComponentType(entity,
components::AxisAlignedBox().TypeId()))
{
ecm.CreateComponent(entity, components::AxisAlignedBox());
}
}

void SlotcarPlugin::init_infrastructure(EntityComponentManager& ecm)
Expand Down

0 comments on commit 4eab7e7

Please sign in to comment.