orca-robotics


INTRODUCTION
Overview
Download and Install
Documentation

REPOSITORY
Interfaces
Drivers
Libraries
Utilities
Software Map

DEVELOPER
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

vehiclesimulator.h

00001 #ifndef HYDROSIM2D_VEHICLESIMULATOR_H
00002 #define HYDROSIM2D_VEHICLESIMULATOR_H
00003 
00004 #include <hydroogmap/hydroogmap.h>
00005 #include <hydronavutil/hydronavutil.h>
00006 #include <hydrosim2d/iposepublisher.h>
00007 
00008 namespace hydrosim2d {
00009 
00015 class VehicleSimulator
00016 {
00017 
00018 public: 
00019 
00020     class Config {
00021     public:
00022         double robotRadius;
00023         double timeStep;
00024         bool   checkDifferentialConstraints;
00025         double maxLinearAcceleration;
00026         double maxRotationalAcceleration;
00027         bool   checkLateralAcceleration;
00028         double maxLateralAcceleration;
00029         bool   checkVelocityConstraints;
00030         hydronavutil::Velocity minVelocity;
00031         hydronavutil::Velocity maxVelocity;
00032     };
00033 
00035 
00036     VehicleSimulator( const Config            &config,
00037                       const hydroogmap::OgMap &ogMap,
00038                       IPosePublisher          &posePublisher );
00039 
00041     void act( const hydronavutil::Velocity &cmd );
00042 
00044     bool isCollided() const;
00045 
00046     hydronavutil::Pose     pose() const { return pose_; }
00047     hydronavutil::Velocity velocity() { return velocity_; }
00048 
00049     const Config &config() const { return config_; }
00050 
00051 private: 
00052 
00053     const Config config_;
00054 
00055     // Grow the OG map by the robot radius, so we can treat the robot as a point.
00056     hydroogmap::OgMap       grownOgMap_;
00057 
00058     hydronavutil::Pose      pose_;
00059     hydronavutil::Velocity  velocity_;
00060 
00061     IPosePublisher &posePublisher_;
00062 };
00063 
00064 }
00065 
00066 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5