ScopedState.h
253 return space_->equalStates(static_cast<const State *>(state_), static_cast<const State *>(other.get()));
const StateSpacePtr & getSpace() const
Get the state space that the state corresponds to.
Definition: ScopedState.h:143
double operator[](const std::string &name) const
Access a double value from this state contains using its name.
Definition: ScopedState.h:303
bool operator==(const ScopedState< O > &other) const
Checks equality of two states.
Definition: ScopedState.h:242
const ScopedState operator^(const ScopedState< T > &a, const ScopedState< Y > &b)
Given state a from state space A and state b from state space B, construct a state from state space A...
Definition: ScopedState.h:534
ScopedState(StateSpacePtr space)
Given the state space that we are working with, allocate a state.
Definition: ScopedState.h:84
const ScopedState operator[](const StateSpacePtr &s) const
Extract a state that corresponds to the components in state space s. Those components will have the s...
Definition: ScopedState.h:543
ScopedState< T > & operator=(const ScopedState< O > &other)
Assignment operator that allows conversion of states.
Definition: ScopedState.h:197
A shared pointer wrapper for ompl::base::StateSpace.
const StateType & operator*() const
De-references to the contained state.
Definition: ScopedState.h:376
double distance(const ScopedState< O > &other) const
Compute the distance to another state.
Definition: ScopedState.h:318
ScopedState< T > & operator=(const double value)
Partial assignment operator. Only sets the double values of the state to a fixed value.
Definition: ScopedState.h:232
A shared pointer wrapper for ompl::base::StateSampler.
double operator[](const unsigned int index) const
Access the indexth double value this state contains.
Definition: ScopedState.h:280
double & operator[](const unsigned int index)
Access the indexth double value this state contains.
Definition: ScopedState.h:271
AdvancedStateCopyOperation copyStateData(const StateSpacePtr &destS, State *dest, const StateSpacePtr &sourceS, const State *source)
Copy data from source (state from space sourceS) to dest (state from space destS) on a component by c...
double & operator[](const std::string &name)
Access a double value from this state contains using its name.
Definition: ScopedState.h:289
STL namespace.
bool operator!=(const ScopedState< O > &other) const
Checks equality of two states.
Definition: ScopedState.h:258
ScopedState(const SpaceInformationPtr &si)
Given the space that we are working with, allocate a state from the corresponding state space...
Definition: ScopedState.h:71
ScopedState< T > & operator=(const ScopedState< T > &other)
Assignment operator.
Definition: ScopedState.h:149
double distance(const State *state) const
Compute the distance to another state.
Definition: ScopedState.h:326
ScopedState(StateSpacePtr space, const State *state)
Given the state space that we are working with, allocate a state and fill that state with a given val...
Definition: ScopedState.h:124
const ScopedState< T > & operator>>(const ScopedState< T > &from, ScopedState< Y > &to)
This is a fancy version of the assignment operator. It is a partial assignment, in some sense...
Definition: ScopedState.h:523
bool satisfiesBounds() const
Check if the maintained state satisfies bounds.
Definition: ScopedState.h:346
A shared pointer wrapper for ompl::base::SpaceInformation.
std::vector< double > reals() const
Return the real values corresponding to this state. If a conversion is not possible, an exception is thrown.
Definition: ScopedState.h:354
StateType * operator()() const
Returns a pointer to the contained state (used for Python bindings)
Definition: ScopedState.h:406
void print(std::ostream &out=std::cout) const
Print this state to a stream.
Definition: ScopedState.h:364
const StateType * operator->() const
Returns a pointer to the contained state.
Definition: ScopedState.h:388
std::shared_ptr< ScopedState<> > ScopedStatePtr
Shared pointer to a ScopedState<>
Definition: ScopedState.h:550
ScopedState(const ScopedState< O > &other)
Copy constructor that allows instantiation from states of other type.
Definition: ScopedState.h:105
ScopedState< T > & operator=(const std::vector< double > &reals)
Partial assignment operator. Only sets the double values of the state to specified real values...
Definition: ScopedState.h:221