Go to the documentation of this file.
26 #include <SimoxUtility/algorithm/string/string_tools.h>
27 #include <VirtualRobot/SceneObjectSet.h>
41 #include <range/v3/view/for_each.hpp>
51 const std::string Component::defaultName =
"distance_to_obstacle_costmap_provider";
59 def->required(properties.robotName,
"p.robotName",
"Robot name.");
105 runningTask->start();
119 const std::vector<std::string> primitiveModelIds = [&]() -> std::vector<std::string>
121 if (not properties.primitiveModelIds.empty())
123 const std::vector<std::string> primitiveModelIds =
126 return primitiveModelIds;
132 const auto loadMode = primitiveModelIds.empty()
133 ? VirtualRobot::RobotIO::RobotDescription::eCollisionModel
134 : VirtualRobot::RobotIO::RobotDescription::eStructure;
136 const auto robot = virtualRobotReaderPlugin->get().getRobot(
139 if (not primitiveModelIds.empty())
141 ARMARX_INFO <<
"Using primitive approximation model";
142 robot->setPrimitiveApproximationModel(primitiveModelIds);
156 const VirtualRobot::SceneObjectSetPtr objects =
160 ARMARX_INFO << objects->getSize() <<
" objects in the scene";
176 "Platform-navigation-colmodel");
178 const auto costmap = costmapBuilder.
create();
181 return costmapWriterPlugin->get().store(
199 return Component::defaultName;
205 return Component::defaultName;
bool createAndStoreCostmap()
void onDisconnectComponent() override
static std::string GetDefaultName()
Get the component's default name.
std::vector< ObjectPose > ObjectPoseSeq
void onConnectComponent() override
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
PluginT * addPlugin(const std::string prefix="", ParamsT &&...params)
void onInitComponent() override
VirtualRobot::SceneObjectSetPtr asSceneObjects(const objpose::ObjectPoseSeq &objectPoses)
ARMARX_REGISTER_COMPONENT_EXECUTABLE(Component, Component::GetDefaultName())
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Default component property definition container.
Costmap create(const SceneBounds &init=SceneBounds())
void onExitComponent() override
objpose::ObjectPoseSeq staticObjects(objpose::ObjectPoseSeq objects)
static DateTime Now()
Current time on the virtual clock.
std::string getName() const
Retrieve name of object.
objpose::ObjectPoseClient getClient() const
static DateTime Invalid()
An object pose as stored by the ObjectPoseStorage.
std::string getDefaultName() const override
std::vector< std::string > split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)