Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef DWB_PLUGINS_KINEMATIC_PARAMETERS_H
00036 #define DWB_PLUGINS_KINEMATIC_PARAMETERS_H
00037
00038 #include <ros/ros.h>
00039 #include <dynamic_reconfigure/server.h>
00040 #include <dwb_plugins/KinematicParamsConfig.h>
00041
00042 namespace dwb_plugins
00043 {
00044
00049 class KinematicParameters
00050 {
00051 public:
00052 KinematicParameters();
00053 void initialize(const ros::NodeHandle& nh);
00054
00055 inline double getMinX() { return min_vel_x_; }
00056 inline double getMaxX() { return max_vel_x_; }
00057 inline double getAccX() { return acc_lim_x_; }
00058 inline double getDecelX() { return decel_lim_x_; }
00059
00060 inline double getMinY() { return min_vel_y_; }
00061 inline double getMaxY() { return max_vel_y_; }
00062 inline double getAccY() { return acc_lim_y_; }
00063 inline double getDecelY() { return decel_lim_y_; }
00064
00065 inline double getMinSpeedXY() { return min_speed_xy_; }
00066
00067 inline double getMinTheta() { return -max_vel_theta_; }
00068 inline double getMaxTheta() { return max_vel_theta_; }
00069 inline double getAccTheta() { return acc_lim_theta_; }
00070 inline double getDecelTheta() { return decel_lim_theta_; }
00071 inline double getMinSpeedTheta() { return min_speed_theta_; }
00072
00089 bool isValidSpeed(double x, double y, double theta);
00090
00091 using Ptr = std::shared_ptr<KinematicParameters>;
00092 protected:
00093
00094 double min_vel_x_, min_vel_y_;
00095 double max_vel_x_, max_vel_y_, max_vel_theta_;
00096
00097 double min_speed_xy_, max_speed_xy_;
00098 double min_speed_theta_;
00099
00100 double acc_lim_x_, acc_lim_y_, acc_lim_theta_;
00101 double decel_lim_x_, decel_lim_y_, decel_lim_theta_;
00102
00103
00104 double min_speed_xy_sq_, max_speed_xy_sq_;
00105
00106 void reconfigureCB(KinematicParamsConfig &config, uint32_t level);
00107 std::shared_ptr<dynamic_reconfigure::Server<KinematicParamsConfig> > dsrv_;
00108 };
00109
00110 }
00111
00112 #endif // DWB_PLUGINS_KINEMATIC_PARAMETERS_H