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
00039 #include <karto_scan_matcher/karto_scan_matcher.h>
00040 #include <boost/python.hpp>
00041 #include <boost/python/suite/indexing/vector_indexing_suite.hpp>
00042
00043 namespace karto_scan_matcher
00044 {
00045
00046 namespace sm=sensor_msgs;
00047 namespace gm=geometry_msgs;
00048
00049
00050 BOOST_PYTHON_MODULE(karto_scan_matching)
00051 {
00052 using namespace boost::python;
00053 using sm::LaserScan;
00054 using gm::Pose2D;
00055 using boost::shared_ptr;
00056 using std_msgs::Header;
00057 using ros::Time;
00058
00059 class_<LaserScan, shared_ptr<LaserScan> >("LaserScanCpp", init<>())
00060 .def_readwrite("header", &LaserScan::header)
00061 .def_readwrite("angle_min", &LaserScan::angle_min)
00062 .def_readwrite("angle_max", &LaserScan::angle_max)
00063 .def_readwrite("angle_increment", &LaserScan::angle_increment)
00064 .def_readwrite("range_min", &LaserScan::range_min)
00065 .def_readwrite("range_max", &LaserScan::range_max)
00066 .def_readwrite("ranges", &LaserScan::ranges)
00067 ;
00068
00069 class_<Pose2D>("Pose2DCpp", init<>())
00070 .def_readwrite("x", &Pose2D::x)
00071 .def_readwrite("y", &Pose2D::y)
00072 .def_readwrite("theta", &Pose2D::theta)
00073 ;
00074
00075 class_<ScanMatchResult>("ScanMatchResultCpp", init<>())
00076 .def_readonly("pose", &ScanMatchResult::pose)
00077 .def_readonly("response", &ScanMatchResult::response)
00078 ;
00079
00080 class_<ScanWithPose>("ScanWithPoseCpp", init<LaserScan, Pose2D>());
00081
00082 class_<KartoScanMatcher>("KartoScanMatcherCpp",
00083 init<LaserScan, Pose2D, double, double>())
00084 .def("scan_match", &KartoScanMatcher::scanMatch)
00085 ;
00086
00087 class_<Header>("Header", init<>())
00088 .def_readwrite("seq", &Header::seq)
00089 .def_readwrite("stamp", &Header::stamp)
00090 .def_readwrite("frame_id", &Header::frame_id)
00091 ;
00092
00093 class_<Time>("Time", init<>())
00094 .def_readwrite("sec", &Time::sec)
00095 .def_readwrite("nsec", &Time::nsec)
00096 ;
00097
00098
00099 }
00100
00101 }