SimoxCSpace.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package RobotComponents
19  * @author Raphael Grimm ( raphael dot grimm at kit dot edu )
20  * @date 2015
21  * @copyright http://www.gnu.org/licenses/gpl.txt
22  * GNU General Public License
23  */
24 #pragma once
25 
26 #include <array>
27 #include <atomic>
28 
29 #include <Eigen/Core>
30 
31 #include <VirtualRobot/CollisionDetection/CDManager.h>
32 #include <VirtualRobot/Robot.h>
33 #include <VirtualRobot/SceneObjectSet.h>
34 #include <VirtualRobot/XML/RobotIO.h>
35 
37 
38 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
41 
42 #include <RobotComponents/interface/components/MotionPlanning/CSpace/SimoxCSpace.h>
43 
44 #include "CSpace.h"
45 #include "GlobalCache.h"
47 #include <MemoryX/interface/components/WorkingMemoryInterface.h>
49 
50 namespace armarx
51 {
52  class SimoxCSpace;
53  /**
54  * @brief An ice handle for a SimoxCSpace.
55  */
57 
58  /**
59  * @brief The SimoxCSpace contains a set of stationary obstacles and an agent.
60  * The agent can have attached objects.
61  * The objects are loaded from a \ref memoryx::CommonStorageInterfacePrx.
62  * The number of dimensions is determined by the agent's kinematic chains.
63  * @see armarx::SimoxCSpaceBase
64  * @see RobotComponents-Tutorial-SimoxCSpace
65  */
66  class SimoxCSpace : virtual public SimoxCSpaceBase, virtual public CSpace
67  {
68  public:
70 
71  /**
72  * @brief ctor
73  * @param commonStoragePrx The common storage containing the objects.
74  * @param loadVisualizationModel Whether to load the visualization model. (true, if you want to display the object. false if you want to plan)
75  */
76  SimoxCSpace(memoryx::CommonStorageInterfacePrx commonStoragePrx,
77  bool loadVisualizationModel = false,
78  float stationaryObjectMargin = 0.0f);
79 
80  //from setting the cspace up
81  /**
82  * @brief Adds a stationary object to the cspace.
83  * @param obj The object to add.
84  */
85  void addStationaryObject(const StationaryObject& obj,
86  const Ice::Current& = Ice::emptyCurrent) override;
87  virtual void setStationaryObjects(const StationaryObjectList& objList);
88  /**
89  * @brief Adds a stationary agent to the cspace.
90  * @param obj The object to add.
91  */
92  void setAgent(const AgentPlanningInformation& agentInfo,
93  const Ice::Current& = Ice::emptyCurrent) override;
94 
95  /**
96  * @brief Adds all objects except the ones with ids specified in the parameter excludedInstancesIds from the working memory to the cspace.
97  * @param workingMemoryPrx The working memory.
98  * @param excludedInstancesIds the ids of the instances in teh working memory that should not be added
99  */
100  virtual void addObjectsFromWorkingMemory(
101  memoryx::WorkingMemoryInterfacePrx workingMemoryPrx,
102  const std::vector<std::string>& excludedInstancesIds = std::vector<std::string>());
103 
104  /**
105  * @brief Load objects from WorkingMemory and puts them into the mesh cache.
106  * @param workingMemoryPrx
107  */
108  static SimoxCSpacePtr
109  PrefetchWorkingMemoryObjects(memoryx::WorkingMemoryInterfacePrx workingMemoryPrx,
110  memoryx::CommonStorageInterfacePrx commonStoragePrx,
112 
113  virtual void addPlanarObject(const std::vector<Eigen::Vector3f>& convexHull);
114 
115  //using it
116  /**
117  * @brief Initializes the collision test.
118  */
119  void initCollisionTest(const Ice::Current& = Ice::emptyCurrent) override;
120 
121  /**
122  * @return A clone of this cspace.
123  */
124  CSpaceBasePtr
125  clone(const Ice::Current& = Ice::emptyCurrent) override
126  {
127  return clone(false);
128  }
129 
130  /**
131  * @param loadVisualizationModel Whether the clone should load the visualization model.
132  * @return A clone of this cspace.
133  */
134  virtual CSpaceBasePtr clone(bool loadVisualizationModel);
135 
136  virtual Saba::CSpaceSampledPtr createSimoxCSpace() const;
137 
138  /**
139  * @param cfg The configuration to check.
140  * @return Whether the given configuration is collision free.
141  */
142  bool isCollisionFree(const ::std::pair<const Ice::Float*, const Ice::Float*>& cfg,
143  const Ice::Current& = Ice::emptyCurrent) override;
144 
145  /**
146  * @return The cspace's dimension bounds.
147  */
148  FloatRangeSeq getDimensionsBounds(const Ice::Current& = Ice::emptyCurrent) const override;
149 
150  /**
151  * @return The cspace's dimensionality.
152  */
153  Ice::Long
154  getDimensionality(const Ice::Current& = Ice::emptyCurrent) const override
155  {
156  return agentJoints.size();
157  }
158 
159  /**
160  * @brief Sets a configuration to check for. (can be used to display a configuration)
161  * @param it A pointer to the configuration.
162  */
163  virtual void
164  setConfig(const std::vector<float> cfg)
165  {
166  assert(cfg.size() == static_cast<std::size_t>(getDimensionality()));
167  setConfig(cfg.data());
168  }
169 
170  virtual void setConfig(const float*& it);
171 
172  virtual void
173  setConfig(const float*&& it) //deals with vector<float>::data()
174  {
175  setConfig(it); //calls the ref version
176  }
177 
178  //getter
179  /**
180  * @return The stationary objects.
181  */
182  const StationaryObjectList&
184  {
185  return stationaryObjects;
186  }
187 
188  const AgentPlanningInformation&
189  getAgent() const
190  {
191  return agentInfo;
192  }
193 
194  /**
195  * @return The set of stationary objects' scene objects.
196  */
197  const VirtualRobot::SceneObjectSetPtr&
199  {
200  return stationaryObjectSet;
201  }
202 
205  {
206  return agentSceneObj;
207  }
208 
209  /**
210  * @return The collision checker.
211  */
212  VirtualRobot::CDManager&
214  {
215  return cd;
216  }
217 
218  virtual Ice::StringSeq getAgentJointNames() const;
219 
220  //utility
221  VectorXf jointMapToVector(const std::map<std::string, float>& jointMap,
222  bool checkForNonexistenJointsInCspace = false) const;
223 
224  virtual TrajectoryPtr
225  pathToTrajectory(const Path& p) const
226  {
227  return pathToTrajectory(p.nodes);
228  }
229 
230  virtual TrajectoryPtr
231  pathToTrajectory(const PathWithCost& p) const
232  {
233  return pathToTrajectory(p.nodes);
234  }
235 
236  virtual TrajectoryPtr pathToTrajectory(const VectorXfSeq& p) const;
237 
238  std::vector<armarx::DebugDrawerLineSet>
239  getTraceVisu(const Path& p,
240  const std::vector<std::string>& nodeNames,
241  float traceStepSize = std::numeric_limits<float>::infinity())
242  {
243  return getTraceVisu(p.nodes, nodeNames, traceStepSize);
244  }
245 
246  std::vector<armarx::DebugDrawerLineSet>
247  getTraceVisu(const PathWithCost& p,
248  const std::vector<std::string>& nodeNames,
249  float traceStepSize = std::numeric_limits<float>::infinity())
250  {
251  return getTraceVisu(p.nodes, nodeNames, traceStepSize);
252  }
253 
254  std::vector<armarx::DebugDrawerLineSet>
255  getTraceVisu(const VectorXfSeq& vecs,
256  const std::vector<std::string>& nodeNames,
257  float traceStepSize = std::numeric_limits<float>::infinity());
258 
259  float
261  {
262  return stationaryObjectMargin;
263  }
264 
265  void
266  setStationaryObjectMargin(float stationaryObjectMargin)
267  {
268  if (!isInitialized)
269  {
270  this->stationaryObjectMargin = stationaryObjectMargin;
271  }
272  else
273  {
274  ARMARX_ERROR << "Could not set stationary object margin, because the cSpace is "
275  "already initialized.";
276  }
277  }
278 
279  //from ice
280  /**
281  * @brief Initializes basic structures after transmission through ice.
282  */
283  void ice_postUnmarshal() override;
284 
285  protected:
286  template <class IceBaseClass, class DerivedClass>
288 
289  const std::vector<VirtualRobot::RobotNodePtr>&
291  {
292  return agentJoints;
293  }
294 
295  /**
296  * @brief Default ctor. Used for ice factories.
297  */
298  SimoxCSpace() = default;
299 
300  //data
301  /**
302  * @brief Whether the collision check is initialized
303  */
304  bool isInitialized{false};
305  /**
306  * @brief Whether the visualization model of objects/agents sould be loaded.
307  */
309 
310 
311  /**
312  * @brief The file manager used to load objects.
313  */
315 
316  //cd data
317  /**
318  * @brief The collision checker.
319  */
320  VirtualRobot::CDManager cd;
321 
322  /**
323  * @brief The scene objects for stationary objects.
324  */
325  VirtualRobot::SceneObjectSetPtr stationaryObjectSet{
326  new VirtualRobot::SceneObjectSet{"StationaryObjectSet"}};
327 
328  std::vector<VirtualRobot::RobotNodePtr> agentJoints;
329 
331 
332  std::vector<std::vector<Eigen::Vector3f>> stationaryPlanes;
333 
336  mutable GlobalCache<RobotPoolPtr,
337  std::pair<VirtualRobot::RobotIO::RobotDescription, std::string>>
339 
340 
341  /**
342  * @brief Initializes stationary objects for collision checking.
343  */
344  void initStationaryObjects();
345 
346  /**
347  * @brief Contains information about an agent.
348  */
349  struct AgentData
350  {
351  /**
352  * @brief The agent's collision model. (contains more data but mainly used for the model)
353  */
355  /**
356  * @brief The agent's joints.
357  */
358  std::vector<VirtualRobot::RobotNodePtr> joints;
359  /**
360  * @brief The collision stes.
361  */
362  std::vector<VirtualRobot::SceneObjectSetPtr> collisionSets;
363  };
364 
365  //static functions to load data
366  /**
367  * @brief Initializes an agent.
368  * (Does not need to read from the file system if loadAnyModel is false)
369  * @param agentData Data about the agent.
370  * @param loadAnyModel if unset only the robot structure is loaded.
371  * If set the robot's and objects' collision model are loaded. (depending on
372  * loadVisualizationModel the robot's visualisation model is loaded)
373  */
374  void initAgent(AgentData agentData);
375 
376  void
378  {
380  }
381 
382  void
384  {
385  initAgent(getAgentDataFromRobot(std::move(robotPtr)));
386  }
387 
388  /**
389  * @param object The object.
390  * @return The given objects manipulation object.
391  */
392  VirtualRobot::ManipulationObjectPtr
393  getSimoxManipulatorObject(const memoryx::ObjectClassBasePtr& object,
395  bool inflate = true,
396  VirtualRobot::CollisionCheckerPtr const& colChecker =
397  VirtualRobot::CollisionCheckerPtr{}) const;
398 
399  /**
400  * @param object The object.
401  * @param pose The pose to use.
402  * @return The given objects manipulation object moved to the given pose.
403  */
404  VirtualRobot::ManipulationObjectPtr
405  getMovedSimoxManipulatorObject(const memoryx::ObjectClassBasePtr& object,
406  const armarx::PoseBasePtr& pose,
408 
409  AgentData getAgentDataAndLoadRobot() const;
410  AgentData getAgentDataFromRobot(VirtualRobot::RobotPtr robotPtr) const;
411  };
412 
413 
414  class SimoxCSpaceWith2DPose;
416 
417  /**
418  * @brief Similar to \ref armarx::SimoxCSpace, but prepends dimensions for translation in x and y and a rotation around z. (use this for path planning)
419  */
421  virtual public SimoxCSpace,
422  virtual public SimoxCSpaceWith2DPoseBase
423  {
424  public:
425  SimoxCSpaceWith2DPose(memoryx::CommonStorageInterfacePrx commonStoragePrx,
426  bool loadVisualizationModel = false,
427  float stationaryObjectMargin = 0.0f);
428 
429  void
430  setPoseBounds(const Vector3fRange& newBounds)
431  {
432  poseBounds = newBounds;
433  }
434 
435  /**
436  * @param loadVisualizationModel Whether the clone should load the visualization model.
437  * @return A clone of this cspace.
438  */
439  CSpaceBasePtr clone(bool loadVisualizationModel) override;
440 
441  /**
442  * @return The cspace's dimension bounds.
443  */
444  FloatRangeSeq getDimensionsBounds(const Ice::Current& = Ice::emptyCurrent) const override;
445 
446  /**
447  * @return The cspace's dimensionality.
448  */
449  Ice::Long
450  getDimensionality(const Ice::Current& = Ice::emptyCurrent) const override
451  {
452  return agentJoints.size() + 3;
453  }
454 
455  Ice::StringSeq getAgentJointNames() const override;
456 
457  void setConfig(const float*& it) override;
458 
459  protected:
460  template <class IceBaseClass, class DerivedClass>
462  SimoxCSpaceWith2DPose() = default;
463 
465  };
466 
467  class SimoxCSpaceWith3DPose;
469 
470  /**
471  * @brief Similar to \ref armarx::SimoxCSpace, but prepends dimensions for translation in x, y and z and rotations around x, y and z.
472  * (use this for path planning of flying robots).
473  */
475  virtual public SimoxCSpace,
476  virtual public SimoxCSpaceWith3DPoseBase
477  {
478  public:
479  SimoxCSpaceWith3DPose(memoryx::CommonStorageInterfacePrx commonStoragePrx,
481  float stationaryObjectMargin = 0.0f);
482 
483  void
484  setPoseBounds(const Vector6fRange& newBounds)
485  {
486  poseBounds = newBounds;
487  }
488 
489  /**
490  * @param loadVisualizationModel Whether the clone should load the visualization model.
491  * @return A clone of this cspace.
492  */
493  CSpaceBasePtr clone(bool loadVisualizationModel) override;
494 
495  /**
496  * @return The cspace's dimension bounds.
497  */
498  FloatRangeSeq getDimensionsBounds(const Ice::Current& = Ice::emptyCurrent) const override;
499 
500  /**
501  * @return The cspace's dimensionality.
502  */
503  Ice::Long
504  getDimensionality(const Ice::Current& = Ice::emptyCurrent) const override
505  {
506  return agentJoints.size() + 6;
507  }
508 
509  void setConfig(const float*& it) override;
510 
511  Ice::StringSeq getAgentJointNames() const override;
512 
513  protected:
514  template <class IceBaseClass, class DerivedClass>
516  SimoxCSpaceWith3DPose() = default;
517 
519  };
520 
521 } // namespace armarx
armarx::SimoxCSpace::getTraceVisu
std::vector< armarx::DebugDrawerLineSet > getTraceVisu(const PathWithCost &p, const std::vector< std::string > &nodeNames, float traceStepSize=std::numeric_limits< float >::infinity())
Definition: SimoxCSpace.h:247
armarx::SimoxCSpaceWith2DPose::setConfig
void setConfig(const float *&it) override
Definition: SimoxCSpace.cpp:948
armarx::SimoxCSpaceWith3DPose::setConfig
void setConfig(const float *&it) override
Definition: SimoxCSpace.cpp:1021
armarx::SimoxCSpace::pathToTrajectory
virtual TrajectoryPtr pathToTrajectory(const PathWithCost &p) const
Definition: SimoxCSpace.h:231
armarx::SimoxCSpace::getDimensionsBounds
FloatRangeSeq getDimensionsBounds(const Ice::Current &=Ice::emptyCurrent) const override
Definition: SimoxCSpace.cpp:844
armarx::SimoxCSpace::getAgentDataAndLoadRobot
AgentData getAgentDataAndLoadRobot() const
Definition: SimoxCSpace.cpp:316
armarx::SimoxCSpaceWith3DPose::SimoxCSpaceWith3DPose
SimoxCSpaceWith3DPose()=default
armarx::CSpace::isCollisionFree
bool isCollisionFree(const ::std::pair< const Ice::Float *, const Ice::Float * > &config, const Ice::Current &=Ice::emptyCurrent) override=0
armarx::SimoxCSpace::getAgentDataFromRobot
AgentData getAgentDataFromRobot(VirtualRobot::RobotPtr robotPtr) const
Definition: SimoxCSpace.cpp:398
armarx::SimoxCSpace::AgentData::joints
std::vector< VirtualRobot::RobotNodePtr > joints
The agent's joints.
Definition: SimoxCSpace.h:358
armarx::SimoxCSpace::getAgentSceneObj
const VirtualRobot::RobotPtr & getAgentSceneObj() const
Definition: SimoxCSpace.h:204
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:650
armarx::SimoxCSpace::AgentData::agent
VirtualRobot::RobotPtr agent
The agent's collision model.
Definition: SimoxCSpace.h:354
CSpace.h
armarx::SimoxCSpace::pathToTrajectory
virtual TrajectoryPtr pathToTrajectory(const Path &p) const
Definition: SimoxCSpace.h:225
armarx::SimoxCSpace::isInitialized
bool isInitialized
Whether the collision check is initialized.
Definition: SimoxCSpace.h:304
armarx::SimoxCSpace::setStationaryObjectMargin
void setStationaryObjectMargin(float stationaryObjectMargin)
Definition: SimoxCSpace.h:266
armarx::SimoxCSpaceWith2DPose
Similar to armarx::SimoxCSpace, but prepends dimensions for translation in x and y and a rotation aro...
Definition: SimoxCSpace.h:420
armarx::CSpace
Implementation of the slice class CSpaceBase.
Definition: CSpace.h:52
GridFileManager.h
armarx::SimoxCSpaceWith2DPose::globalPoseBuffer
Eigen::Matrix4f globalPoseBuffer
Definition: SimoxCSpace.h:464
armarx::SimoxCSpace::getTraceVisu
std::vector< armarx::DebugDrawerLineSet > getTraceVisu(const Path &p, const std::vector< std::string > &nodeNames, float traceStepSize=std::numeric_limits< float >::infinity())
Definition: SimoxCSpace.h:239
Convex::convexHull
ConvexHull< Point >::type convexHull(const std::vector< Point > &points)
Definition: convexHull.hpp:501
armarx::SimoxCSpaceWith3DPose::globalPoseBuffer
Eigen::Matrix4f globalPoseBuffer
Definition: SimoxCSpace.h:518
FactoryCollectionBase.h
armarx::RobotPoolPtr
std::shared_ptr< class RobotPool > RobotPoolPtr
Definition: RobotUnitModuleRobotData.h:35
armarx::SimoxCSpace::AgentData::collisionSets
std::vector< VirtualRobot::SceneObjectSetPtr > collisionSets
The collision stes.
Definition: SimoxCSpace.h:362
armarx::SimoxCSpaceWith2DPose::setPoseBounds
void setPoseBounds(const Vector3fRange &newBounds)
Definition: SimoxCSpace.h:430
armarx::SimoxCSpace::getCD
VirtualRobot::CDManager & getCD()
Definition: SimoxCSpace.h:213
armarx::SimoxCSpace::initStationaryObjects
void initStationaryObjects()
Initializes stationary objects for collision checking.
Definition: SimoxCSpace.cpp:239
armarx::SimoxCSpace::addObjectsFromWorkingMemory
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 wo...
Definition: SimoxCSpace.cpp:685
armarx::SimoxCSpace::createSimoxCSpace
virtual Saba::CSpaceSampledPtr createSimoxCSpace() const
Definition: SimoxCSpace.cpp:137
IceInternal::Handle< SimoxCSpace >
armarx::SimoxCSpace::getStationaryObjectMargin
float getStationaryObjectMargin() const
Definition: SimoxCSpace.h:260
armarx::SimoxCSpaceWith2DPose::getDimensionsBounds
FloatRangeSeq getDimensionsBounds(const Ice::Current &=Ice::emptyCurrent) const override
Definition: SimoxCSpace.cpp:918
armarx::SimoxCSpace::fileManager
memoryx::GridFileManagerPtr fileManager
The file manager used to load objects.
Definition: SimoxCSpace.h:314
armarx::SimoxCSpaceWith3DPose::getDimensionsBounds
FloatRangeSeq getDimensionsBounds(const Ice::Current &=Ice::emptyCurrent) const override
Definition: SimoxCSpace.cpp:995
armarx::SimoxCSpace::stationaryPlanes
std::vector< std::vector< Eigen::Vector3f > > stationaryPlanes
Definition: SimoxCSpace.h:332
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:570
armarx::SimoxCSpace::robotCache
GlobalCache< RobotPoolPtr, std::pair< VirtualRobot::RobotIO::RobotDescription, std::string > > robotCache
Definition: SimoxCSpace.h:338
armarx::SimoxCSpace::clone
CSpaceBasePtr clone(const Ice::Current &=Ice::emptyCurrent) override
Definition: SimoxCSpace.h:125
armarx::SimoxCSpace::getDimensionality
Ice::Long getDimensionality(const Ice::Current &=Ice::emptyCurrent) const override
Definition: SimoxCSpace.h:154
armarx::SimoxCSpace::getStationaryObjectSet
const VirtualRobot::SceneObjectSetPtr & getStationaryObjectSet() const
Definition: SimoxCSpace.h:198
armarx::SimoxCSpace::getAgentJointNames
virtual Ice::StringSeq getAgentJointNames() const
Definition: SimoxCSpace.cpp:858
armarx::SimoxCSpace::ice_postUnmarshal
void ice_postUnmarshal() override
Initializes basic structures after transmission through ice.
Definition: SimoxCSpace.cpp:758
armarx::SimoxCSpace::getAgent
const AgentPlanningInformation & getAgent() const
Definition: SimoxCSpace.h:189
GlobalCache.h
armarx::SimoxCSpace::addPlanarObject
virtual void addPlanarObject(const std::vector< Eigen::Vector3f > &convexHull)
Definition: SimoxCSpace.cpp:752
armarx::SimoxCSpace::getAgentJoints
const std::vector< VirtualRobot::RobotNodePtr > & getAgentJoints() const
Definition: SimoxCSpace.h:290
armarx::SimoxCSpace::setAgent
void setAgent(const AgentPlanningInformation &agentInfo, const Ice::Current &=Ice::emptyCurrent) override
Adds a stationary agent to the cspace.
Definition: SimoxCSpace.cpp:173
armarx::SimoxCSpace::initAgent
void initAgent()
Definition: SimoxCSpace.h:377
armarx::VariantType::Long
const VariantTypeId Long
Definition: Variant.h:918
armarx::SimoxCSpace::PrefetchWorkingMemoryObjects
static SimoxCSpacePtr PrefetchWorkingMemoryObjects(memoryx::WorkingMemoryInterfacePrx workingMemoryPrx, memoryx::CommonStorageInterfacePrx commonStoragePrx, RobotStateComponentInterfacePrx rsc)
Load objects from WorkingMemory and puts them into the mesh cache.
Definition: SimoxCSpace.cpp:734
ARMARX_ERROR
#define ARMARX_ERROR
Definition: Logging.h:196
armarx::SimoxCSpace::addStationaryObject
void addStationaryObject(const StationaryObject &obj, const Ice::Current &=Ice::emptyCurrent) override
Adds a stationary object to the cspace.
Definition: SimoxCSpace.cpp:159
armarx::SimoxCSpace::getMovedSimoxManipulatorObject
VirtualRobot::ManipulationObjectPtr getMovedSimoxManipulatorObject(const memoryx::ObjectClassBasePtr &object, const armarx::PoseBasePtr &pose, memoryx::GridFileManagerPtr &fileManager) const
Definition: SimoxCSpace.cpp:658
armarx::SimoxCSpace::initCollisionTest
void initCollisionTest(const Ice::Current &=Ice::emptyCurrent) override
Initializes the collision test.
Definition: SimoxCSpace.cpp:209
armarx::GlobalCache
Definition: GlobalCache.h:39
armarx::SimoxCSpaceWith2DPose::getAgentJointNames
Ice::StringSeq getAgentJointNames() const override
Definition: SimoxCSpace.cpp:936
armarx::SimoxCSpaceWith2DPose::SimoxCSpaceWith2DPose
SimoxCSpaceWith2DPose()=default
armarx::SimoxCSpaceWith3DPose::getAgentJointNames
Ice::StringSeq getAgentJointNames() const override
Definition: SimoxCSpace.cpp:1059
armarx::SimoxCSpaceWith3DPose::setPoseBounds
void setPoseBounds(const Vector6fRange &newBounds)
Definition: SimoxCSpace.h:484
armarx::SimoxCSpace::AgentData
Contains information about an agent.
Definition: SimoxCSpace.h:349
armarx::SimoxCSpace::meshCache
GlobalCache< VirtualRobot::ManipulationObjectPtr, std::pair< int, std::string > > meshCache
Definition: SimoxCSpace.h:335
Trajectory.h
armarx::SimoxCSpace::setConfig
virtual void setConfig(const float *&&it)
Definition: SimoxCSpace.h:173
armarx::SimoxCSpaceWith2DPose::clone
CSpaceBasePtr clone(bool loadVisualizationModel) override
Definition: SimoxCSpace.cpp:903
armarx::SimoxCSpace::jointMapToVector
VectorXf jointMapToVector(const std::map< std::string, float > &jointMap, bool checkForNonexistenJointsInCspace=false) const
Definition: SimoxCSpace.cpp:870
memoryx::GridFileManagerPtr
std::shared_ptr< GridFileManager > GridFileManagerPtr
Definition: AbstractEntityWrapper.h:33
armarx::SimoxCSpace::stationaryObjectSet
VirtualRobot::SceneObjectSetPtr stationaryObjectSet
The scene objects for stationary objects.
Definition: SimoxCSpace.h:325
armarx::SimoxCSpaceWith3DPose::clone
CSpaceBasePtr clone(bool loadVisualizationModel) override
Definition: SimoxCSpace.cpp:980
armarx::SimoxCSpaceWith3DPose
Similar to armarx::SimoxCSpace, but prepends dimensions for translation in x, y and z and rotations a...
Definition: SimoxCSpace.h:474
IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface >
armarx::SimoxCSpace::setStationaryObjects
virtual void setStationaryObjects(const StationaryObjectList &objList)
Definition: SimoxCSpace.cpp:167
armarx::SimoxCSpace::loadVisualizationModel
bool loadVisualizationModel
Whether the visualization model of objects/agents sould be loaded.
Definition: SimoxCSpace.h:308
armarx::SimoxCSpace::cd
VirtualRobot::CDManager cd
The collision checker.
Definition: SimoxCSpace.h:320
armarx::SimoxCSpace::agentSceneObj
VirtualRobot::RobotPtr agentSceneObj
Definition: SimoxCSpace.h:330
armarx::armem::server::ltm::detail::mixin::Path
std::filesystem::path Path
Definition: DiskStorageMixin.h:17
armarx::SimoxCSpace::initAgent
void initAgent(VirtualRobot::RobotPtr robotPtr)
Definition: SimoxCSpace.h:383
armarx::SimoxCSpace::setConfig
virtual void setConfig(const std::vector< float > cfg)
Sets a configuration to check for.
Definition: SimoxCSpace.h:164
armarx::GenericFactory
Definition: FactoryCollectionBase.h:51
armarx::SimoxCSpace
The SimoxCSpace contains a set of stationary obstacles and an agent.
Definition: SimoxCSpace.h:66
armarx::SimoxCSpace::isCollisionFree
bool isCollisionFree(const ::std::pair< const Ice::Float *, const Ice::Float * > &cfg, const Ice::Current &=Ice::emptyCurrent) override
Definition: SimoxCSpace.cpp:194
armarx::SimoxCSpace::SimoxCSpace
SimoxCSpace()=default
Default ctor.
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::SimoxCSpace::agentJoints
std::vector< VirtualRobot::RobotNodePtr > agentJoints
Definition: SimoxCSpace.h:328
armarx::SimoxCSpaceWith3DPose::getDimensionality
Ice::Long getDimensionality(const Ice::Current &=Ice::emptyCurrent) const override
Definition: SimoxCSpace.h:504
armarx::SimoxCSpace::getStationaryObjects
const StationaryObjectList & getStationaryObjects() const
Definition: SimoxCSpace.h:183
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:19
RobotPool.h
armarx::SimoxCSpaceWith2DPose::getDimensionality
Ice::Long getDimensionality(const Ice::Current &=Ice::emptyCurrent) const override
Definition: SimoxCSpace.h:450
armarx::SimoxCSpace::getSimoxManipulatorObject
VirtualRobot::ManipulationObjectPtr getSimoxManipulatorObject(const memoryx::ObjectClassBasePtr &object, const memoryx::GridFileManagerPtr &fileManager, bool inflate=true, VirtualRobot::CollisionCheckerPtr const &colChecker=VirtualRobot::CollisionCheckerPtr{}) const
Definition: SimoxCSpace.cpp:591