ScopedState.h
255 return space_->equalStates(static_cast<const State*>(state_), static_cast<const State*>(other.get()));
497 std::ostream& operator<<(std::ostream &out, const ScopedState<T> &state)
const StateSpacePtr & getSpace() const
Get the state space that the state corresponds to.
Definition: ScopedState.h:145
double operator[](const std::string &name) const
Access a double value from this state contains using its name.
Definition: ScopedState.h:305
bool operator==(const ScopedState< O > &other) const
Checks equality of two states.
Definition: ScopedState.h:244
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:541
ScopedState(const StateSpacePtr &space)
Given the state space that we are working with, allocate a state.
Definition: ScopedState.h:87
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:550
ScopedState< T > & operator=(const ScopedState< O > &other)
Assignment operator that allows conversion of states.
Definition: ScopedState.h:199
A boost shared pointer wrapper for ompl::base::StateSpace.
const StateType & operator*() const
De-references to the contained state.
Definition: ScopedState.h:378
double distance(const ScopedState< O > &other) const
Compute the distance to another state.
Definition: ScopedState.h:320
ScopedState< T > & operator=(const double value)
Partial assignment operator. Only sets the double values of the state to a fixed value.
Definition: ScopedState.h:234
A boost shared pointer wrapper for ompl::base::StateSampler.
boost::shared_ptr< ScopedState<> > ScopedStatePtr
Shared pointer to a ScopedState<>
Definition: ScopedState.h:557
double operator[](const unsigned int index) const
Access the indexth double value this state contains.
Definition: ScopedState.h:282
double & operator[](const unsigned int index)
Access the indexth double value this state contains.
Definition: ScopedState.h:273
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...
Definition: StateSpace.cpp:1219
double & operator[](const std::string &name)
Access a double value from this state contains using its name.
Definition: ScopedState.h:291
bool operator!=(const ScopedState< O > &other) const
Checks equality of two states.
Definition: ScopedState.h:260
ScopedState(const SpaceInformationPtr &si)
Given the space that we are working with, allocate a state from the corresponding state space...
Definition: ScopedState.h:73
ScopedState< T > & operator=(const ScopedState< T > &other)
Assignment operator.
Definition: ScopedState.h:151
double distance(const State *state) const
Compute the distance to another state.
Definition: ScopedState.h:328
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:529
bool satisfiesBounds() const
Check if the maintained state satisfies bounds.
Definition: ScopedState.h:348
A boost 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:356
StateType * operator()() const
Returns a pointer to the contained state (used for Python bindings)
Definition: ScopedState.h:408
void print(std::ostream &out=std::cout) const
Print this state to a stream.
Definition: ScopedState.h:366
const StateType * operator->() const
Returns a pointer to the contained state.
Definition: ScopedState.h:390
ScopedState(const ScopedState< O > &other)
Copy constructor that allows instantiation from states of other type.
Definition: ScopedState.h:108
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:223
ScopedState(const 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:126