16 #include <mrpt/gui/CDisplayWindow3D.h> 18 #include <mrpt/version.h> 19 #if MRPT_VERSION<0x199 20 #include <mrpt/utils/utils_defs.h> 21 #include <mrpt/utils/CTimeLogger.h> 22 #include <mrpt/utils/CTicTac.h> 23 #include <mrpt/utils/TColor.h> 24 using mrpt::utils::CTicTac;
25 using mrpt::utils::CTimeLogger;
26 using mrpt::utils::CTimeLoggerEntry;
27 using mrpt::utils::TColor;
28 using mrpt::utils::TColorf;
29 using mrpt::utils::keep_max;
30 using mrpt::utils::DEG2RAD;
31 using mrpt::utils::RAD2DEG;
33 #include <mrpt/core/format.h> 34 #include <mrpt/core/bits_math.h> 35 #include <mrpt/system/CTimeLogger.h> 36 #include <mrpt/system/CTicTac.h> 37 #include <mrpt/img/TColor.h> 38 using mrpt::system::CTicTac;
39 using mrpt::system::CTimeLogger;
40 using mrpt::system::CTimeLoggerEntry;
41 using mrpt::img::TColor;
42 using mrpt::img::TColorf;
48 #include <mrpt/version.h> 49 #if MRPT_VERSION >= 0x130 50 #include <mrpt/obs/CObservation.h> 52 #include <mrpt/slam/CObservation.h> 75 void clear_all(
bool acquire_mt_lock =
true);
92 const std::string& xml_text,
93 const std::string& fileNameForPath = std::string(
"."));
166 typedef std::multimap<std::string, VehicleBase*>
168 typedef std::list<WorldElementBase*>
171 typedef std::multimap<std::string, Block*>
193 std::string
resolvePath(
const std::string& in_path)
const;
222 #
if MRPT_VERSION >= 0x130
223 const mrpt::obs::CObservation* obs
225 const mrpt::slam::CObservation* obs
std::list< WorldElementBase * > TListWorldElements
getListOfVehicles()
double force_scale
In meters/Newton.
mrpt::gui::CDisplayWindow3D::Ptr m_gui_win
const TListBlocks & getListOfBlocks() const
void set_simul_timestep(double timestep)
Simulation fixed-time interval for numerical integration.
int m_b2d_pos_iters
Velocity and position iteration count (Box2D)
TListWorldElements m_world_elements
void update_GUI(TUpdateGUIParams *params=NULL)
TListVehicles & getListOfVehicles()
CTicTac m_timer_iteration
double m_simul_time
evaluate weights for friction, etc.
void runVisitorOnWorldElements(WorldElementVisitorBase &v)
std::multimap< std::string, VehicleBase * > TListVehicles
void clear_all(bool acquire_mt_lock=true)
std::string follow_vehicle
Name of the vehicle to follow (empty=none)
virtual void onNewObservation(const VehicleBase &veh, const mrpt::slam::CObservation *obs)
void internal_one_timestep(double dt)
TGUIKeyEvent keyevent
Keystrokes in the window are returned here.
double get_gravity() const
const b2World * getBox2DWorld() const
double get_simul_timestep() const
Simulation fixed-time interval for numerical integration.
A rigid body. These are created via b2World::CreateBody.
void set_gravity(double accel)
CTimeLogger & getTimeLogger()
TListBlocks & getListOfBlocks()
bool is_GUI_open() const
Forces closing the GUI window, if any.
std::string resolvePath(const std::string &in_path) const
std::mutex m_world_cs
first time the GUI window is created.
b2Body * m_b2_ground_body
Used to declare friction between vehicles-ground.
std::multimap< std::string, Block * > TListBlocks
TGUI_Options m_gui_options
std::string msg_lines
Messages to show.
void load_from_XML(const std::string &xml_text, const std::string &fileNameForPath=std::string("."))
int m_b2d_vel_iters
integration.
mrpt::gui::mrptKeyModifier key_modifier
b2Body * getBox2DGroundBody()
const TListVehicles & getListOfVehicles() const
void runVisitorOnVehicles(VehicleVisitorBase &v)
b2World * getBox2DWorld()
World()
Default ctor: inits an empty world.
void run_simulation(double dt)
std::string m_base_path
Path from which to take relative directories.
const TListWorldElements & getListOfWorldElements() const
b2World * m_box2d_world
objects from multithreading access.
double get_simul_time() const
Simulation wall-clock time.
int keycode
0=no Key. Otherwise, ASCII code.
void close_GUI()
a previous call to update_GUI()