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)
89 catch (
const Ice::LocalException& e)
103 navigator_->moveToAlternatives(
106 catch (
const Ice::LocalException& e)
114 const std::optional<std::string>& providerName)
117 IceUtil::Optional<std::string> providerNameIce = IceUtil::None;
118 if (providerName.has_value())
120 providerNameIce = providerName.value();
125 navigator_->moveToLocation(
location, providerNameIce, configId_);
127 catch (
const Ice::LocalException& e)
141 navigator_->moveTowards(
144 catch (
const Ice::LocalException& e)
158 navigator_->updateMoveTo(
161 catch (
const Ice::LocalException& e)
174 navigator_->setVelocityFactor(velocityFactor, configId_);
176 catch (
const Ice::LocalException& e)
187 navigator_->pause(configId_);
189 catch (
const Ice::LocalException& e)
200 navigator_->resume(configId_);
202 catch (
const Ice::LocalException& e)
213 navigator_->stop(configId_);
215 catch (
const Ice::LocalException& e)
226 return navigator_->isPaused(configId_);
228 catch (
const Ice::LocalException& e)
240 return navigator_->isStopped(configId_);
242 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)