54 #ifndef _GAMS_PLATFORM_VREP_BASE_H_
55 #define _GAMS_PLATFORM_VREP_BASE_H_
61 #include "madara/knowledge/KnowledgeBase.h"
66 #include "madara/threads/Threader.h"
67 #include "madara/threads/BaseThread.h"
68 #include "madara/LockType.h"
69 #include "madara/knowledge/containers/Integer.h"
74 #pragma GCC diagnostic push
75 #pragma GCC diagnostic ignored "-Wpedantic"
76 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
77 #pragma GCC diagnostic ignored "-Wunused-parameter"
85 #pragma GCC diagnostic pop
110 std::string model_file,
111 simxUChar is_client_side,
112 madara::knowledge::KnowledgeBase * knowledge,
114 variables::Self *
self);
125 void operator=(
const VREPBase & rhs);
131 virtual int sense(
void)
override;
137 virtual int analyze(
void)
override;
143 virtual double get_accuracy()
const override;
148 virtual double get_move_speed()
const override;
154 virtual int land(
void)
override;
162 int move(
const pose::Position & location,
163 const PositionBounds &bounds)
override;
174 const OrientationBounds &bounds)
override;
182 virtual void set_move_speed(
const double& speed)
override;
188 virtual int takeoff(
void)
override;
202 virtual void add_model_to_environment(
const std::string& file,
203 const simxUChar client_side) = 0;
209 bool get_ready(
void);
214 virtual void get_target_handle() = 0;
219 virtual void set_initial_position();
225 virtual double get_initial_z()
const;
230 bool sim_is_running(
void);
235 bool vrep_is_ready(
void);
240 bool agent_is_ready(
void);
255 simxInt node_target_;
265 madara::knowledge::containers::Double thread_rate_;
267 madara::knowledge::containers::Double thread_move_speed_;
269 madara::knowledge::containers::Double max_delta_;
271 madara::knowledge::containers::Double max_orient_delta_;
274 const static std::string MOVE_THREAD_NAME;
279 class TargetMover :
public madara::threads::BaseThread
286 TargetMover(VREPBase &base);
293 static const std::string NAME;
298 friend class TargetMover;
304 madara::threads::Threader threader_;
306 mutable MADARA_LOCK_TYPE vrep_mutex_;
313 void create_ready_conditions(
void);
316 bool agent_is_ready_;
322 bool sim_is_running_;
327 std::string model_file_;
332 simxUChar is_client_side_;
335 madara::knowledge::containers::Integer begin_sim_;
338 madara::knowledge::containers::Integer vrep_ready_;
341 madara::knowledge::containers::Integer agent_ready_;
345 int do_move(
const pose::Position & target,
346 const pose::Position & current,
double max_delta);
354 #include "VREPBase.inl"
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
gams::pose::Orientation Orientation
Represents a orientation or orientation within a reference frame.
gams::pose::ReferenceFrame ReferenceFrame
Base class for Reference Frames.
gams::pose::Pose Pose
Represents a combination of Location and Orientation within a single reference frame.
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
Contains all GAMS-related tools, classes and code.
Copyright (c) 2015 Carnegie Mellon University.
Copyright (c) 2015 Carnegie Mellon University.
Copyright (c) 2015 Carnegie Mellon University.
Copyright (c) 2015-2018 Carnegie Mellon University.