19 #ifndef SNARK_SENSORS_VELODYNE_DB_H_
20 #define SNARK_SENSORS_VELODYNE_DB_H_
22 #include <boost/array.hpp>
23 #include <comma/base/types.h>
25 #include <snark/sensors/velodyne/impl/serializable_db.h>
27 namespace snark {
namespace velodyne {
40 angle(
const angle& rhs );
42 angle(
double v,
double s,
double c );
45 struct corrention_angles_type
51 double horizontal_offset;
53 double vertical_offset;
55 double distance_correction;
57 corrention_angles_type correction_angles;
61 laser_data( comma::uint32
id,
double horizOffsetCorrection,
double vertOffsetCorrection,
double distCorrection, angle rotCorrection, angle vertCorrection );
63 std::pair< ::Eigen::Vector3d, ::Eigen::Vector3d > ray(
double range,
double angle )
const;
65 ::Eigen::Vector3d point(
double range,
double angle )
const;
67 double range(
double range )
const;
69 double azimuth(
double azimuth )
const;
72 boost::array< laser_data, 64 > lasers;
78 db(
const std::string& filename );
80 static bool is_upper(
unsigned int laser );
82 static bool is_lower(
unsigned int laser );
84 void operator<<( std::istream& s );
87 template <
class Istream >
inline void operator>>( Istream& s, db& db ) { db << s; }
91 #endif // SNARK_SENSORS_VELODYNE_DB_H_