|
The SimoxCSpace contains a set of stationary obstacles and an agent. More...
#include <RobotComponents/components/MotionPlanning/CSpace/SimoxCSpace.h>
Classes | |
struct | AgentData |
Contains information about an agent. More... | |
Public Member Functions | |
virtual void | addObjectsFromWorkingMemory (memoryx::WorkingMemoryInterfacePrx workingMemoryPrx, const std::vector< std::string > &excludedInstancesIds=std::vector< std::string >()) |
Adds all objects except the ones with ids specified in the parameter excludedInstancesIds from the working memory to the cspace. More... | |
virtual void | addPlanarObject (const std::vector< Eigen::Vector3f > &convexHull) |
void | addStationaryObject (const StationaryObject &obj, const Ice::Current &=Ice::emptyCurrent) override |
Adds a stationary object to the cspace. More... | |
virtual CSpaceBasePtr | clone (bool loadVisualizationModel) |
CSpaceBasePtr | clone (const Ice::Current &=Ice::emptyCurrent) override |
virtual Saba::CSpaceSampledPtr | createSimoxCSpace () const |
const AgentPlanningInformation & | getAgent () const |
virtual Ice::StringSeq | getAgentJointNames () const |
const VirtualRobot::RobotPtr & | getAgentSceneObj () const |
VirtualRobot::CDManager & | getCD () |
Ice::Long | getDimensionality (const Ice::Current &=Ice::emptyCurrent) const override |
FloatRangeSeq | getDimensionsBounds (const Ice::Current &=Ice::emptyCurrent) const override |
float | getStationaryObjectMargin () const |
const StationaryObjectList & | getStationaryObjects () const |
const VirtualRobot::SceneObjectSetPtr & | getStationaryObjectSet () const |
std::vector< armarx::DebugDrawerLineSet > | getTraceVisu (const Path &p, const std::vector< std::string > &nodeNames, float traceStepSize=std::numeric_limits< float >::infinity()) |
std::vector< armarx::DebugDrawerLineSet > | getTraceVisu (const PathWithCost &p, const std::vector< std::string > &nodeNames, float traceStepSize=std::numeric_limits< float >::infinity()) |
std::vector< armarx::DebugDrawerLineSet > | getTraceVisu (const VectorXfSeq &vecs, const std::vector< std::string > &nodeNames, float traceStepSize=std::numeric_limits< float >::infinity()) |
void | ice_postUnmarshal () override |
Initializes basic structures after transmission through ice. More... | |
void | initCollisionTest (const Ice::Current &=Ice::emptyCurrent) override |
Initializes the collision test. More... | |
bool | isCollisionFree (const ::std::pair< const Ice::Float *, const Ice::Float * > &cfg, const Ice::Current &=Ice::emptyCurrent) override |
bool | isCollisionFree (const ::std::pair< const Ice::Float *, const Ice::Float * > &config, const Ice::Current &=Ice::emptyCurrent) override=0 |
virtual bool | isCollisionFree (const Ice::Float *first, const Ice::Float *last) |
virtual bool | isCollisionFree (const VectorXf &config) |
VectorXf | jointMapToVector (const std::map< std::string, float > &jointMap, bool checkForNonexistenJointsInCspace=false) const |
virtual TrajectoryPtr | pathToTrajectory (const Path &p) const |
virtual TrajectoryPtr | pathToTrajectory (const PathWithCost &p) const |
virtual TrajectoryPtr | pathToTrajectory (const VectorXfSeq &p) const |
void | setAgent (const AgentPlanningInformation &agentInfo, const Ice::Current &=Ice::emptyCurrent) override |
Adds a stationary agent to the cspace. More... | |
virtual void | setConfig (const float *&&it) |
virtual void | setConfig (const float *&it) |
virtual void | setConfig (const std::vector< float > cfg) |
Sets a configuration to check for. More... | |
void | setStationaryObjectMargin (float stationaryObjectMargin) |
virtual void | setStationaryObjects (const StationaryObjectList &objList) |
SimoxCSpace (memoryx::CommonStorageInterfacePrx commonStoragePrx, bool loadVisualizationModel=false, float stationaryObjectMargin=0.0f) | |
ctor More... | |
Public Member Functions inherited from CSpace | |
void | initCollisionTest (const Ice::Current &=Ice::emptyCurrent) override |
Initializes collision checking. More... | |
virtual bool | isCollisionFree (const Ice::Float *first, const Ice::Float *last) |
virtual bool | isCollisionFree (const VectorXf &config) |
bool | isValidConfiguration (const ::std::pair< const Ice::Float *, const Ice::Float * > &config, const Ice::Current &=Ice::emptyCurrent) const override |
virtual bool | isValidConfiguration (const VectorXf &config) const |
virtual bool | usesInternalScaling () |
Static Public Member Functions | |
static SimoxCSpacePtr | PrefetchWorkingMemoryObjects (memoryx::WorkingMemoryInterfacePrx workingMemoryPrx, memoryx::CommonStorageInterfacePrx commonStoragePrx, RobotStateComponentInterfacePrx rsc) |
Load objects from WorkingMemory and puts them into the mesh cache. More... | |
Protected Member Functions | |
AgentData | getAgentDataAndLoadRobot () const |
AgentData | getAgentDataFromRobot (VirtualRobot::RobotPtr robotPtr) const |
const std::vector< VirtualRobot::RobotNodePtr > & | getAgentJoints () const |
VirtualRobot::ManipulationObjectPtr | getMovedSimoxManipulatorObject (const memoryx::ObjectClassBasePtr &object, const armarx::PoseBasePtr &pose, memoryx::GridFileManagerPtr &fileManager) const |
VirtualRobot::ManipulationObjectPtr | getSimoxManipulatorObject (const memoryx::ObjectClassBasePtr &object, const memoryx::GridFileManagerPtr &fileManager, bool inflate=true, VirtualRobot::CollisionCheckerPtr const &colChecker=VirtualRobot::CollisionCheckerPtr {}) const |
void | initAgent () |
void | initAgent (AgentData agentData) |
Initializes an agent. More... | |
void | initAgent (VirtualRobot::RobotPtr robotPtr) |
void | initStationaryObjects () |
Initializes stationary objects for collision checking. More... | |
SimoxCSpace ()=default | |
Default ctor. More... | |
Protected Attributes | |
std::vector< VirtualRobot::RobotNodePtr > | agentJoints |
VirtualRobot::RobotPtr | agentSceneObj |
VirtualRobot::CDManager | cd |
The collision checker. More... | |
memoryx::GridFileManagerPtr | fileManager |
The file manager used to load objects. More... | |
bool | isInitialized {false} |
Whether the collision check is initialized. More... | |
bool | loadVisualizationModel {false} |
Whether the visualization model of objects/agents sould be loaded. More... | |
GlobalCache< VirtualRobot::ManipulationObjectPtr, std::pair< int, std::string > > | meshCache |
GlobalCache< RobotPoolPtr, std::pair< VirtualRobot::RobotIO::RobotDescription, std::string > > | robotCache |
VirtualRobot::SceneObjectSetPtr | stationaryObjectSet {new VirtualRobot::SceneObjectSet{"StationaryObjectSet"}} |
The scene objects for stationary objects. More... | |
std::vector< std::vector< Eigen::Vector3f > > | stationaryPlanes |
Friends | |
template<class IceBaseClass , class DerivedClass > | |
class | armarx::GenericFactory |
The SimoxCSpace contains a set of stationary obstacles and an agent.
The agent can have attached objects. The objects are loaded from a memoryx::CommonStorageInterfacePrx. The number of dimensions is determined by the agent's kinematic chains.
Definition at line 67 of file SimoxCSpace.h.
SimoxCSpace | ( | memoryx::CommonStorageInterfacePrx | commonStoragePrx, |
bool | loadVisualizationModel = false , |
||
float | stationaryObjectMargin = 0.0f |
||
) |
ctor
commonStoragePrx | The common storage containing the objects. |
loadVisualizationModel | Whether to load the visualization model. (true, if you want to display the object. false if you want to plan) |
Definition at line 81 of file SimoxCSpace.cpp.
|
protecteddefault |
Default ctor.
Used for ice factories.
|
virtual |
Adds all objects except the ones with ids specified in the parameter excludedInstancesIds from the working memory to the cspace.
workingMemoryPrx | The working memory. |
excludedInstancesIds | the ids of the instances in teh working memory that should not be added |
Definition at line 628 of file SimoxCSpace.cpp.
|
virtual |
|
override |
Adds a stationary object to the cspace.
obj | The object to add. |
Definition at line 145 of file SimoxCSpace.cpp.
|
virtual |
loadVisualizationModel | Whether the clone should load the visualization model. |
Reimplemented in SimoxCSpaceWith3DPose, SimoxCSpaceWith2DPose, and VoxelGridCSpace.
Definition at line 113 of file SimoxCSpace.cpp.
|
inlineoverridevirtual |
Implements CSpace.
Reimplemented in VoxelGridCSpace.
Definition at line 118 of file SimoxCSpace.h.
|
virtual |
Definition at line 129 of file SimoxCSpace.cpp.
|
inline |
Definition at line 173 of file SimoxCSpace.h.
|
protected |
Definition at line 287 of file SimoxCSpace.cpp.
|
protected |
Definition at line 370 of file SimoxCSpace.cpp.
|
virtual |
Reimplemented in SimoxCSpaceWith3DPose, and SimoxCSpaceWith2DPose.
Definition at line 792 of file SimoxCSpace.cpp.
|
inlineprotected |
|
inline |
Definition at line 186 of file SimoxCSpace.h.
|
inline |
Definition at line 194 of file SimoxCSpace.h.
|
inlineoverride |
Definition at line 144 of file SimoxCSpace.h.
|
override |
Definition at line 778 of file SimoxCSpace.cpp.
|
protected |
object | The object. |
pose | The pose to use. |
Definition at line 609 of file SimoxCSpace.cpp.
|
protected |
object | The object. |
Definition at line 550 of file SimoxCSpace.cpp.
|
inline |
Definition at line 224 of file SimoxCSpace.h.
|
inline |
Definition at line 168 of file SimoxCSpace.h.
|
inline |
Definition at line 181 of file SimoxCSpace.h.
std::vector<armarx::DebugDrawerLineSet> getTraceVisu | ( | const VectorXfSeq & | vecs, |
const std::vector< std::string > & | nodeNames, | ||
float | traceStepSize = std::numeric_limits< float >::infinity() |
||
) |
|
override |
Initializes basic structures after transmission through ice.
Definition at line 693 of file SimoxCSpace.cpp.
|
inlineprotected |
Definition at line 332 of file SimoxCSpace.h.
|
protected |
Initializes an agent.
(Does not need to read from the file system if loadAnyModel is false)
agentData | Data about the agent. |
loadAnyModel | if unset only the robot structure is loaded. If set the robot's and objects' collision model are loaded. (depending on loadVisualizationModel the robot's visualisation model is loaded) |
Definition at line 259 of file SimoxCSpace.cpp.
|
inlineprotected |
|
override |
Initializes the collision test.
Definition at line 192 of file SimoxCSpace.cpp.
|
protected |
Initializes stationary objects for collision checking.
Definition at line 221 of file SimoxCSpace.cpp.
|
overridevirtual |
cfg | The configuration to check. |
Implements CSpace.
Definition at line 176 of file SimoxCSpace.cpp.
|
override |
config | The config to check. |
|
inline |
|
inline |
VectorXf jointMapToVector | ( | const std::map< std::string, float > & | jointMap, |
bool | checkForNonexistenJointsInCspace = false |
||
) | const |
Definition at line 803 of file SimoxCSpace.cpp.
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
|
static |
Load objects from WorkingMemory and puts them into the mesh cache.
workingMemoryPrx |
Definition at line 673 of file SimoxCSpace.cpp.
|
override |
Adds a stationary agent to the cspace.
obj | The object to add. |
Definition at line 157 of file SimoxCSpace.cpp.
|
inlinevirtual |
|
virtual |
Reimplemented in SimoxCSpaceWith3DPose, and SimoxCSpaceWith2DPose.
Definition at line 163 of file SimoxCSpace.cpp.
|
inlinevirtual |
Sets a configuration to check for.
(can be used to display a configuration)
it | A pointer to the configuration. |
Definition at line 153 of file SimoxCSpace.h.
|
inline |
Definition at line 229 of file SimoxCSpace.h.
|
virtual |
Definition at line 152 of file SimoxCSpace.cpp.
|
friend |
Definition at line 248 of file SimoxCSpace.h.
|
protected |
Definition at line 287 of file SimoxCSpace.h.
|
protected |
Definition at line 289 of file SimoxCSpace.h.
|
protected |
The collision checker.
Definition at line 280 of file SimoxCSpace.h.
|
protected |
The file manager used to load objects.
Definition at line 274 of file SimoxCSpace.h.
|
protected |
Whether the collision check is initialized.
Definition at line 264 of file SimoxCSpace.h.
|
protected |
Whether the visualization model of objects/agents sould be loaded.
Definition at line 268 of file SimoxCSpace.h.
|
mutableprotected |
Definition at line 293 of file SimoxCSpace.h.
|
mutableprotected |
Definition at line 294 of file SimoxCSpace.h.
|
protected |
The scene objects for stationary objects.
Definition at line 285 of file SimoxCSpace.h.
|
protected |
Definition at line 291 of file SimoxCSpace.h.