3#include <ompl/base/State.h>
4#include <ompl/base/spaces/RealVectorStateSpace.h>
8 namespace ob = ompl::base;
15 template <
typename Robot>
16 inline auto ompl_to_vamp(
const ob::State *state) ->
typename Robot::Configuration
18 using Configuration =
typename Robot::Configuration;
20 alignas(Configuration::S::Alignment) std::array<typename Configuration::S::ScalarT, Configuration::num_scalars>
24 for (std::size_t i = 0; i < Robot::dimension; ++i)
26 aligned_buffer[i] =
static_cast<float>(as->values[i]);
29 return Configuration(aligned_buffer.data());
33 template <
typename Robot>
34 inline void vamp_to_ompl(
const typename Robot::Configuration &config,
ob::State *state)
37 for (std::size_t i = 0; i < Robot::dimension; ++i)
39 as->values[i] =
static_cast<double>(config[{i, 0}]);
The definition of a state in Rn.
Definition of an abstract state.
const T * as() const
Cast this instance to a desired type.
This namespace contains sampling based planning routines shared by both planning under geometric cons...