9#include <Ice/Exception.h>
10#include <IceUtil/Optional.h>
17#include <armarx/navigation/client/ice/NavigatorInterface.h>
26 std::vector<Eigen::Matrix4f>
27 convert(
const std::vector<armarx::navigation::core::Pose>& ps)
29 using namespace armarx::navigation;
30 std::vector<Eigen::Matrix4f> ms;
31 ms.reserve(ps.size());
32 std::transform(ps.begin(),
34 std::back_inserter(ms),
35 [](
const auto& p) { return p.matrix(); });
40 IceNavigatorHandle::IceNavigatorHandle(
const NavigatorInterfacePrx& navigator,
41 const std::string& configId_) :
42 navigator_(navigator), configId_(configId_)
52 navigator_->removeConfig(configId_);
54 catch (
const Ice::LocalException& e)
56 ARMARX_WARNING <<
"Failed to remove navigation config '" << configId_
57 <<
"' on navigator: " << e.what();
69 navigator_->begin_moveTo(
72 catch (
const Ice::LocalException& e)
90 catch (
const Ice::LocalException& e)
105 navigator_->moveToAlternatives(
108 catch (
const Ice::LocalException& e)
117 const std::optional<std::string>& providerName)
120 IceUtil::Optional<std::string> providerNameIce = IceUtil::None;
121 if (providerName.has_value())
123 providerNameIce = providerName.value();
128 navigator_->moveToLocation(
location, providerNameIce, configId_);
130 catch (
const Ice::LocalException& e)
145 navigator_->moveTowards(
148 catch (
const Ice::LocalException& e)
163 navigator_->updateMoveTo(
166 catch (
const Ice::LocalException& e)
180 navigator_->setVelocityFactor(velocityFactor, configId_);
182 catch (
const Ice::LocalException& e)
193 navigator_->pause(configId_);
195 catch (
const Ice::LocalException& e)
206 navigator_->resume(configId_);
208 catch (
const Ice::LocalException& e)
219 navigator_->stop(configId_);
221 catch (
const Ice::LocalException& e)
233 return navigator_->isPaused(configId_);
235 catch (
const Ice::LocalException& e)
247 return navigator_->isStopped(configId_);
249 catch (
const Ice::LocalException& e)
SpamFilterDataPtr deactivateSpam(SpamFilterDataPtr const &spamFilter, float deactivationDurationSec, const std::string &identifier, bool deactivate)
void convert(const std::filesystem::path &in, const std::filesystem::path &out, bool print_progress)
Performs the actual conversion.
void moveToAlternatives(const std::vector< core::TargetAlternative > &targets, core::NavigationFrame navigationFrame) override
void moveTowards(const core::Direction &direction, core::NavigationFrame navigationFrame) override
void update(const std::vector< core::Pose > &waypoints, core::NavigationFrame navigationFrame) override
void setVelocityFactor(float velocityFactor) override
void moveToLocation(const std::string &location, const std::optional< std::string > &providerName) override
bool isPaused() const noexcept override
~IceNavigatorHandle() override
void moveTo(const std::vector< core::Pose > &waypoints, core::NavigationFrame navigationFrame) override
bool isStopped() const noexcept override
Brief description of class targets.
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
This file is part of ArmarX.
client::detail::GlobalPlanningStrategy freeze(const client::GlobalPlanningStrategy &strategy)
Eigen::Vector3f Direction
const simox::meta::EnumNames< NavigationFrame > NavigationFrameNames
This file is part of ArmarX.
std::vector< core::Pose > convert(const std::vector< Eigen::Matrix4f > &wps)