32 #include <shared_mutex>
37 #include <Eigen/Geometry>
40 #include <Ice/Current.h>
43 #include <DynamicObstacleAvoidance/Agent.hpp>
44 #include <DynamicObstacleAvoidance/Environment.hpp>
52 #include <RobotAPI/interface/components/ObstacleAvoidance/DSObstacleAvoidanceInterface.h>
60 virtual public DSObstacleAvoidanceInterface,
72 dsobstacleavoidance::Config
getConfig(
const Ice::Current& = Ice::emptyCurrent)
override;
75 const Ice::Current& = Ice::emptyCurrent)
override;
77 std::vector<obstacledetection::Obstacle>
78 getObstacles(
const Ice::Current& = Ice::emptyCurrent)
override;
81 const Ice::Current& = Ice::emptyCurrent)
override;
84 const Ice::Current& = Ice::emptyCurrent)
override;
89 const Ice::Current& = Ice::emptyCurrent)
override;
118 void sanity_check_obstacle(
const obstacledetection::Obstacle& obstacle)
const;
122 void run_visualization();
132 unsigned task_interval = 20;
133 mutable std::mutex mutex;
134 bool needs_update =
true;
141 unsigned task_interval = 100;
145 struct dynamic_obstacle_avoidance
147 dsobstacleavoidance::Config cfg;
148 DynamicObstacleAvoidance::Environment env;
149 mutable std::shared_mutex mutex;
150 std::string load_obstacles_from_file =
151 "RobotAPI/obstacle_avoidance/r034_2d_scene_obstacles.json";
156 enum class update_type
166 DSObstacleAvoidance::buffer::update_type
type;
169 mutable std::mutex mutex;
170 std::vector<DSObstacleAvoidance::buffer::update> update_log;
171 std::map<std::string, obstacledetection::Obstacle> obstacles;
172 bool needs_env_update;
176 DSObstacleAvoidance::visualization m_vis;
178 DSObstacleAvoidance::watchdog m_watchdog;
180 DSObstacleAvoidance::dynamic_obstacle_avoidance m_doa;
182 DSObstacleAvoidance::buffer m_buf;