Go to the documentation of this file.00001 #ifndef YOUBOT_FOURSWEDISHWHEELOMNIBASEKINEMATIC_H
00002 #define YOUBOT_FOURSWEDISHWHEELOMNIBASEKINEMATIC_H
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
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #include <vector>
00055 #include <string>
00056 #include <youbot_driver/generic/Logger.hpp>
00057 #include <youbot_driver/generic/Units.hpp>
00058 #include <youbot_driver/generic/Exceptions.hpp>
00059 #include <youbot_driver/base-kinematic/WheeledBaseKinematic.hpp>
00060 #include <youbot_driver/base-kinematic/FourSwedishWheelOmniBaseKinematicConfiguration.hpp>
00061 namespace youbot
00062 {
00063
00067 class FourSwedishWheelOmniBaseKinematic : public WheeledBaseKinematic
00068 {
00069 public:
00070 FourSwedishWheelOmniBaseKinematic();
00071
00072 virtual ~FourSwedishWheelOmniBaseKinematic();
00073
00079 virtual void cartesianVelocityToWheelVelocities(const quantity<si::velocity>& longitudinalVelocity,
00080 const quantity<si::velocity>& transversalVelocity,
00081 const quantity<si::angular_velocity>& angularVelocity,
00082 std::vector<quantity<angular_velocity> >& wheelVelocities);
00083
00089 virtual void wheelVelocitiesToCartesianVelocity(const std::vector<quantity<angular_velocity> >& wheelVelocities,
00090 quantity<si::velocity>& longitudinalVelocity,
00091 quantity<si::velocity>& transversalVelocity,
00092 quantity<angular_velocity>& angularVelocity);
00093
00099 virtual void wheelPositionsToCartesianPosition(const std::vector<quantity<plane_angle> >& wheelPositions,
00100 quantity<si::length>& longitudinalPosition,
00101 quantity<si::length>& transversalPosition,
00102 quantity<plane_angle>& orientation);
00103
00109 virtual void cartesianPositionToWheelPositions(const quantity<si::length>& longitudinalPosition,
00110 const quantity<si::length>& transversalPosition,
00111 const quantity<plane_angle>& orientation,
00112 std::vector<quantity<plane_angle> >& wheelPositions);
00113
00114 void setConfiguration(const FourSwedishWheelOmniBaseKinematicConfiguration& configuration);
00115
00116 void getConfiguration(FourSwedishWheelOmniBaseKinematicConfiguration& configuration) const;
00117
00118 private:
00119 FourSwedishWheelOmniBaseKinematicConfiguration config;
00120
00121 std::vector<quantity<plane_angle> > lastWheelPositions;
00122
00123 bool lastWheelPositionInitialized;
00124
00125 quantity<si::length> longitudinalPos;
00126
00127 quantity<si::length> transversalPos;
00128
00129 quantity<plane_angle> angle;
00130
00131 };
00132
00133 }
00134 #endif