Go to the documentation of this file. 1 #ifndef AIKIDO_PLANNER_WORLD_HPP_
2 #define AIKIDO_PLANNER_WORLD_HPP_
5 #include <unordered_map>
7 #include <dart/dart.hpp>
24 std::unordered_map<std::string, dart::dynamics::Skeleton::Configuration>
41 explicit World(
const std::string& name =
"");
47 static std::unique_ptr<World>
create(
const std::string& name =
"");
51 std::unique_ptr<World>
clone(
const std::string& newName =
"")
const;
55 std::string
setName(
const std::string& newName);
58 const std::string&
getName()
const;
62 dart::dynamics::SkeletonPtr
getSkeleton(std::size_t i)
const;
66 dart::dynamics::SkeletonPtr
getSkeleton(
const std::string& name)
const;
71 bool hasSkeleton(
const dart::dynamics::SkeletonPtr& skel)
const;
78 std::string
addSkeleton(
const dart::dynamics::SkeletonPtr& skeleton);
108 const World::State& state,
const std::vector<std::string>& names);
130 #endif // AIKIDO_PLANNER_WORLD_HPP_
void removeSkeleton(const dart::dynamics::SkeletonPtr &skeleton)
Remove a Skeleton from this World.
bool operator==(const State &other) const
Returns true if two world states have the same skeletons with same configurations.
dart::common::NameManager< dart::dynamics::SkeletonPtr > mSkeletonNameManager
NameManager for keeping track of Skeletons.
Definition: World.hpp:124
std::unordered_map< std::string, dart::dynamics::Skeleton::Configuration > configurations
Definition: World.hpp:25
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
World::State getState() const
Returns the state of this World.
std::mutex & getMutex() const
Get the mutex that protects the state of this World.
bool operator!=(const State &other) const
Returns true if two world states are not the same.
void setState(const World::State &state)
Sets the state of this World to match State.
std::unique_ptr< World > clone(const std::string &newName="") const
Create a clone of this World.
std::string mName
Name of this World.
Definition: World.hpp:112
bool hasSkeleton(const dart::dynamics::SkeletonPtr &skel) const
Returns true if the Skeleton is in this World.
A Kinematic world that contains a set of skeletons.
Definition: World.hpp:18
const std::string & getName() const
Get the name of this World.
World(const std::string &name="")
Construct a kinematic World.
static dart::common::NameManager< World * > mWorldNameManager
NameManager for keeping track of Worlds.
Definition: World.hpp:121
std::size_t getNumSkeletons() const
Get the number of Skeletons.
std::mutex mMutex
Mutex to protect this World.
Definition: World.hpp:118
std::string addSkeleton(const dart::dynamics::SkeletonPtr &skeleton)
Add a Skeleton to this World.
std::string setName(const std::string &newName)
Set the name of this World.
dart::dynamics::SkeletonPtr getSkeleton(std::size_t i) const
Find a Skeleton by index.
std::vector< dart::dynamics::SkeletonPtr > mSkeletons
Skeletons in this World.
Definition: World.hpp:115
#define AIKIDO_DECLARE_POINTERS(X)
Definition: pointers.hpp:21
static std::unique_ptr< World > create(const std::string &name="")
Create a new World ptr.